diff options
author | Jeremy Allison <jra@samba.org> | 2011-10-31 12:38:36 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-11-02 02:13:51 +0100 |
commit | cde73e2ecec75f0b068555203962b43a4438d349 (patch) | |
tree | 85b2681e92dc8a9d4ace780f8fcfa827d1265cd1 | |
parent | a763edaf9c76afe2546c035fc090370301dd347b (diff) | |
download | samba-cde73e2ecec75f0b068555203962b43a4438d349.tar.gz samba-cde73e2ecec75f0b068555203962b43a4438d349.tar.bz2 samba-cde73e2ecec75f0b068555203962b43a4438d349.zip |
Remove opendir() VFS code from ACL modules.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Nov 2 02:13:51 CET 2011 on sn-devel-104
-rw-r--r-- | source3/modules/vfs_acl_common.c | 48 | ||||
-rw-r--r-- | source3/modules/vfs_acl_tdb.c | 1 | ||||
-rw-r--r-- | source3/modules/vfs_acl_xattr.c | 1 |
3 files changed, 0 insertions, 50 deletions
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c index 14ac6f7a0b..aebf0aeedd 100644 --- a/source3/modules/vfs_acl_common.c +++ b/source3/modules/vfs_acl_common.c @@ -564,41 +564,6 @@ static NTSTATUS get_parent_acl_common(vfs_handle_struct *handle, return status; } -static NTSTATUS check_parent_acl_common(vfs_handle_struct *handle, - const char *path, - uint32_t access_mask, - struct security_descriptor **pp_parent_desc) -{ - char *parent_name = NULL; - struct security_descriptor *parent_desc = NULL; - uint32_t access_granted = 0; - NTSTATUS status; - - status = get_parent_acl_common(handle, path, &parent_desc); - if (!NT_STATUS_IS_OK(status)) { - return status; - } - if (pp_parent_desc) { - *pp_parent_desc = parent_desc; - } - status = smb1_file_se_access_check(handle->conn, - parent_desc, - get_current_nttok(handle->conn), - access_mask, - &access_granted); - if(!NT_STATUS_IS_OK(status)) { - DEBUG(10,("check_parent_acl_common: access check " - "on directory %s for " - "path %s for mask 0x%x returned %s\n", - parent_name, - path, - access_mask, - nt_errstr(status) )); - return status; - } - return NT_STATUS_OK; -} - /********************************************************************* Fetch a security descriptor given an fsp. *********************************************************************/ @@ -701,19 +666,6 @@ static NTSTATUS fset_nt_acl_common(vfs_handle_struct *handle, files_struct *fsp, return NT_STATUS_OK; } -static SMB_STRUCT_DIR *opendir_acl_common(vfs_handle_struct *handle, - const char *fname, const char *mask, uint32 attr) -{ - NTSTATUS status = check_parent_acl_common(handle, fname, - SEC_DIR_LIST, NULL); - - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - return NULL; - } - return SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr); -} - static int acl_common_remove_object(vfs_handle_struct *handle, const char *path, bool is_directory) diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c index a4869c0a83..647d133d39 100644 --- a/source3/modules/vfs_acl_tdb.c +++ b/source3/modules/vfs_acl_tdb.c @@ -400,7 +400,6 @@ static int sys_acl_set_fd_tdb(vfs_handle_struct *handle, static struct vfs_fn_pointers vfs_acl_tdb_fns = { .connect_fn = connect_acl_tdb, .disconnect = disconnect_acl_tdb, - .opendir = opendir_acl_common, .rmdir = rmdir_acl_tdb, .create_file = create_file_acl_common, .unlink = unlink_acl_tdb, diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c index 473c2fcdee..f1a2e897e7 100644 --- a/source3/modules/vfs_acl_xattr.c +++ b/source3/modules/vfs_acl_xattr.c @@ -201,7 +201,6 @@ static int connect_acl_xattr(struct vfs_handle_struct *handle, static struct vfs_fn_pointers vfs_acl_xattr_fns = { .connect_fn = connect_acl_xattr, - .opendir = opendir_acl_common, .rmdir = rmdir_acl_common, .create_file = create_file_acl_common, .unlink = unlink_acl_common, |