No change in behaviour, the new arg is not yet used in any module.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
return -1;
}
-static int skel_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
+static int skel_sys_acl_set_fd(vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
errno = ENOSYS;
acltype, theacl);
}
-static int skel_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
+static int skel_sys_acl_set_fd(vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
- return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
+ return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl);
}
static int skel_sys_acl_delete_def_file(vfs_handle_struct *handle,
* Version 44 - Add dirfsp arg to SMB_VFS_READDIR()
* Version 44 - Remove SMB_VFS_GET_DOS_ATTRIBUTES()
* Version 44 - Replace SMB_VFS_GET_COMPRESSION() with SMB_VFS_FGET_COMPRESSION()
+ * Version 44 - Add type argument to SMB_VFS_SYS_ACL_SET_FD()
*/
#define SMB_VFS_INTERFACE_VERSION 44
const struct smb_filename *smb_fname,
SMB_ACL_TYPE_T acltype,
SMB_ACL_T theacl);
- int (*sys_acl_set_fd_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_ACL_T theacl);
+ int (*sys_acl_set_fd_fn)(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ SMB_ACL_TYPE_T type,
+ SMB_ACL_T theacl);
int (*sys_acl_delete_def_file_fn)(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname);
SMB_ACL_TYPE_T acltype,
SMB_ACL_T theacl);
int smb_vfs_call_sys_acl_set_fd(struct vfs_handle_struct *handle,
- struct files_struct *fsp, SMB_ACL_T theacl);
+ struct files_struct *fsp,
+ SMB_ACL_TYPE_T type,
+ SMB_ACL_T theacl);
int smb_vfs_call_sys_acl_delete_def_file(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname);
ssize_t smb_vfs_call_getxattr(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
SMB_ACL_TYPE_T acltype,
SMB_ACL_T theacl);
-int vfs_not_implemented_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
+int vfs_not_implemented_sys_acl_set_fd(vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl);
int vfs_not_implemented_sys_acl_delete_def_file(vfs_handle_struct *handle,
const struct smb_filename *smb_fname);
#define SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname, acltype, theacl) \
smb_vfs_call_sys_acl_set_file((handle)->next, (smb_fname), (acltype), (theacl))
-#define SMB_VFS_SYS_ACL_SET_FD(fsp, theacl) \
- smb_vfs_call_sys_acl_set_fd((fsp)->conn->vfs_handles, (fsp), (theacl))
-#define SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl) \
- smb_vfs_call_sys_acl_set_fd((handle)->next, (fsp), (theacl))
+#define SMB_VFS_SYS_ACL_SET_FD(fsp, type, theacl) \
+ smb_vfs_call_sys_acl_set_fd((fsp)->conn->vfs_handles, (fsp), (type), (theacl))
+#define SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl) \
+ smb_vfs_call_sys_acl_set_fd((handle)->next, (fsp), (type), (theacl))
#define SMB_VFS_SYS_ACL_DELETE_DEF_FILE(conn, smb_fname) \
smb_vfs_call_sys_acl_delete_def_file((conn)->vfs_handles, (smb_fname))
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
SMB_ACL_T acl_d)
{
- return posixacl_sys_acl_set_fd(handle, fsp, acl_d);
+ return posixacl_sys_acl_set_fd(handle, fsp, SMB_ACL_TYPE_ACCESS, acl_d);
}
int sys_acl_delete_def_file(vfs_handle_struct *handle,
}
int posixacl_xattr_acl_set_fd(vfs_handle_struct *handle,
- files_struct *fsp, SMB_ACL_T theacl)
+ files_struct *fsp,
+ SMB_ACL_TYPE_T type,
+ SMB_ACL_T theacl)
{
char *buf;
ssize_t size;
int posixacl_xattr_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl);
int posixacl_xattr_acl_delete_def_file(vfs_handle_struct *handle,
static int sys_acl_set_fd_tdb(vfs_handle_struct *handle,
files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
struct db_context *db = acl_db;
}
ret = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle,
- fsp,
- theacl);
+ fsp,
+ type,
+ theacl);
if (ret == -1) {
return -1;
}
static int sys_acl_set_fd_xattr(vfs_handle_struct *handle,
files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
int ret = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle,
fsp,
+ type,
theacl);
if (ret == -1) {
return -1;
int aixacl_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
struct acl *file_acl = NULL;
int aixjfs2_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
struct acl *acl_aixc;
static int catia_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
struct catia_cache *cc = NULL;
return ret;
}
- ret = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
+ ret = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl);
CATIA_FETCH_FSP_POST_NEXT(&cc, fsp);
return sys_acl_set_file(handle, smb_fname, acltype, theacl);
}
-static int vfswrap_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_T theacl)
+static int vfswrap_sys_acl_set_fd(vfs_handle_struct *handle,
+ files_struct *fsp,
+ SMB_ACL_TYPE_T type,
+ SMB_ACL_T theacl)
{
return sys_acl_set_fd(handle, fsp, theacl);
}
return ret;
}
-static int fake_acls_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_T theacl)
+static int fake_acls_sys_acl_set_fd(vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ SMB_ACL_TYPE_T type,
+ SMB_ACL_T theacl)
{
int ret;
const char *name = FAKE_ACL_ACCESS_XATTR;
}
ret = fake_acls_sys_acl_set_fd(handle,
fsp,
+ SMB_ACL_TYPE_ACCESS,
the_acl);
TALLOC_FREE(frame);
return ret;
return result;
}
-static int smb_full_audit_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
- SMB_ACL_T theacl)
+static int smb_full_audit_sys_acl_set_fd(vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ SMB_ACL_TYPE_T type,
+ SMB_ACL_T theacl)
{
int result;
- result = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
+ result = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl);
do_log(SMB_VFS_OP_SYS_ACL_SET_FD, (result >= 0), handle,
"%s", fsp_str_do_log(fsp));
static int gpfsacl_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
struct gpfs_config_data *config;
return -1);
if (!config->acl) {
- return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
+ return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl);
}
return gpfsacl_sys_acl_set_file(handle, fsp->fsp_name,
static int nfs4acl_xattr_fail__sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
return -1;
return -1;
}
-int vfs_not_implemented_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
+int vfs_not_implemented_sys_acl_set_fd(vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
errno = ENOSYS;
int posixacl_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
int res;
int posixacl_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl);
int posixacl_sys_acl_delete_def_file(vfs_handle_struct *handle,
*/
int solarisacl_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
SOLARIS_ACL_T solaris_acl = NULL;
static int streams_xattr_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
struct stream_io *sio =
(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
if (sio == NULL) {
- return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
+ return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl);
}
return 0;
static int smb_time_audit_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
int result;
double timediff;
clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
+ result = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl);
clock_gettime_mono(&ts2);
timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
int tru64acl_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
int res;
return ret;
}
-static int vxfs_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
+static int vxfs_sys_acl_set_fd(vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
return 0;
}
- return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
+ return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl);
}
static int vxfs_sys_acl_set_file(vfs_handle_struct *handle,
static int zfsacl_fail__sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
return -1;
}
}
} else {
- if (SMB_VFS_SYS_ACL_SET_FD(fsp, the_acl) == -1) {
+ if (SMB_VFS_SYS_ACL_SET_FD(fsp, SMB_ACL_TYPE_ACCESS, the_acl) == -1) {
/*
* Some systems allow all the above calls and only fail with no ACL support
* when attempting to apply the acl. HPUX with HFS is an example of this. JRA.
fsp_str_dbg(fsp)));
become_root();
- sret = SMB_VFS_SYS_ACL_SET_FD(fsp, the_acl);
+ sret = SMB_VFS_SYS_ACL_SET_FD(fsp,
+ SMB_ACL_TYPE_ACCESS,
+ the_acl);
unbecome_root();
if (sret == 0) {
ret = True;
}
/* Set the new empty file ACL. */
- ret = SMB_VFS_SYS_ACL_SET_FD(fsp, new_file_acl);
+ ret = SMB_VFS_SYS_ACL_SET_FD(fsp, SMB_ACL_TYPE_ACCESS, new_file_acl);
if (ret == -1) {
status = map_nt_error_from_unix(errno);
DBG_INFO("acl_set_file failed on %s (%s)\n",
return map_nt_error_from_unix(errno);
}
- ret = SMB_VFS_SYS_ACL_SET_FD(fsp, file_acl);
+ ret = SMB_VFS_SYS_ACL_SET_FD(fsp, SMB_ACL_TYPE_ACCESS, file_acl);
if (ret == -1) {
status = map_nt_error_from_unix(errno);
DBG_INFO("acl_set_file failed on %s (%s)\n",
}
int smb_vfs_call_sys_acl_set_fd(struct vfs_handle_struct *handle,
- struct files_struct *fsp, SMB_ACL_T theacl)
+ struct files_struct *fsp,
+ SMB_ACL_TYPE_T type,
+ SMB_ACL_T theacl)
{
VFS_FIND(sys_acl_set_fd);
- return handle->fns->sys_acl_set_fd_fn(handle, fsp, theacl);
+ return handle->fns->sys_acl_set_fd_fn(handle, fsp, type, theacl);
}
int smb_vfs_call_sys_acl_delete_def_file(struct vfs_handle_struct *handle,