]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: Change rmdir_acl_common() to take a files_struct *dirfsp pointer.
authorJeremy Allison <jra@samba.org>
Fri, 4 Oct 2019 21:34:41 +0000 (14:34 -0700)
committerRalph Boehme <slow@samba.org>
Thu, 10 Oct 2019 06:09:39 +0000 (06:09 +0000)
Pass in the passed dirfsp if available, else handle->conn->cwd_fsp.

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_acl_common.c
source3/modules/vfs_acl_common.h
source3/modules/vfs_acl_tdb.c
source3/modules/vfs_acl_xattr.c

index b583ee571a1e7d24b2cdff071a2f96883c938f3b..c7b6fea5702c0a84ef7d8ecb073cdab9fe7b4c78 100644 (file)
@@ -1186,7 +1186,8 @@ static int acl_common_remove_object(vfs_handle_struct *handle,
 }
 
 int rmdir_acl_common(struct vfs_handle_struct *handle,
-                    const struct smb_filename *smb_fname)
+               struct files_struct *dirfsp,
+               const struct smb_filename *smb_fname)
 {
        int ret;
 
index d36e68c161b7e41c22c4d2da68258e8421cef0ee..bc2177349d3619cef8110e3503ad062bd59a0a00 100644 (file)
@@ -33,7 +33,8 @@ bool init_acl_common_config(vfs_handle_struct *handle,
                            const char *module_name);
 
 int rmdir_acl_common(struct vfs_handle_struct *handle,
-                    const struct smb_filename *smb_fname);
+                       struct files_struct *dirfsp,
+                       const struct smb_filename *smb_fname);
 int unlink_acl_common(struct vfs_handle_struct *handle,
                        struct files_struct *dirfsp,
                        const struct smb_filename *smb_fname,
index 1c58b59f2441e0cdbcb74e8cafd477787b8ee189..267e7883e3f69edadad7aede3faf5d74489bb412 100644 (file)
@@ -263,7 +263,9 @@ static int unlinkat_acl_tdb(vfs_handle_struct *handle,
        }
 
        if (flags & AT_REMOVEDIR) {
-               ret = rmdir_acl_common(handle, smb_fname_tmp);
+               ret = rmdir_acl_common(handle,
+                               dirfsp,
+                               smb_fname_tmp);
        } else {
                ret = unlink_acl_common(handle,
                                dirfsp,
@@ -297,7 +299,9 @@ static int rmdir_acl_tdb(vfs_handle_struct *handle,
                return -1;
        }
 
-       ret = rmdir_acl_common(handle, smb_fname);
+       ret = rmdir_acl_common(handle,
+                       handle->conn->cwd_fsp,
+                       smb_fname);
        if (ret == -1) {
                return -1;
        }
index 91f52d32443641e0fad456c1eb7ddf3df0e77979..10314fc3089203e52c8ab14e72b0cfe917f59b57 100644 (file)
@@ -286,7 +286,9 @@ static int acl_xattr_unlinkat(vfs_handle_struct *handle,
        int ret;
 
        if (flags & AT_REMOVEDIR) {
-               ret = rmdir_acl_common(handle, smb_fname);
+               ret = rmdir_acl_common(handle,
+                               dirfsp,
+                               smb_fname);
        } else {
                ret = unlink_acl_common(handle,
                                dirfsp,
@@ -299,7 +301,9 @@ static int acl_xattr_unlinkat(vfs_handle_struct *handle,
 static int acl_xattr_rmdir(vfs_handle_struct *handle,
                        const struct smb_filename *smb_dname)
 {
-       return rmdir_acl_common(handle, smb_dname);
+       return rmdir_acl_common(handle,
+                               handle->conn->cwd_fsp,
+                               smb_dname);
 }
 
 static NTSTATUS acl_xattr_fget_nt_acl(vfs_handle_struct *handle,