s3: VFS: ACLs. Switch fset_nt_acl_common() over to using fget_acl_blob_fn().
authorJeremy Allison <jra@samba.org>
Mon, 13 Apr 2020 19:29:22 +0000 (12:29 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 7 May 2020 19:27:34 +0000 (19:27 +0000)
Removes passing in smb_fname to fsp functions.

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 5a2fc81bc43ad0e9292d3cc048c384f1e51b368d..67c3f9f9f282aace99bc90ded4743fa9315be7ff 100644 (file)
@@ -1054,10 +1054,9 @@ static NTSTATUS store_v3_blob(
 *********************************************************************/
 
 NTSTATUS fset_nt_acl_common(
-       NTSTATUS (*get_acl_blob_fn)(TALLOC_CTX *ctx,
+       NTSTATUS (*fget_acl_blob_fn)(TALLOC_CTX *ctx,
                                    vfs_handle_struct *handle,
                                    files_struct *fsp,
-                                   const struct smb_filename *smb_fname,
                                    DATA_BLOB *pblob),
        NTSTATUS (*store_acl_blob_fsp_fn)(vfs_handle_struct *handle,
                                          files_struct *fsp,
@@ -1086,8 +1085,7 @@ NTSTATUS fset_nt_acl_common(
                        discard_const_p(struct security_descriptor, orig_psd));
        }
 
-       status = get_nt_acl_common(get_acl_blob_fn, handle, fsp,
-                       NULL,
+       status = fget_nt_acl_common(fget_acl_blob_fn, handle, fsp,
                        SECINFO_OWNER|SECINFO_GROUP|SECINFO_DACL|SECINFO_SACL,
                                     frame,
                        &psd);
index 3fc5c2bf1048bf4f9a4bbce89318c1535381792a..fb3dfef304ed59a38a01469e6a3d5c04c4a7d9a3 100644 (file)
@@ -72,10 +72,9 @@ NTSTATUS fget_nt_acl_common(
        struct security_descriptor **ppdesc);
 
 NTSTATUS fset_nt_acl_common(
-       NTSTATUS (*get_acl_blob_fn)(TALLOC_CTX *ctx,
+       NTSTATUS (*fget_acl_blob_fn)(TALLOC_CTX *ctx,
                                    vfs_handle_struct *handle,
                                    files_struct *fsp,
-                                   const struct smb_filename *smb_fname,
                                    DATA_BLOB *pblob),
        NTSTATUS (*store_acl_blob_fsp_fn)(vfs_handle_struct *handle,
                                          files_struct *fsp,
index 3f855549774cb2f23f25062c6eec9588abe1b451..61c865c39f1908a35def7b63ede4b4a4d4b01a7d 100644 (file)
@@ -108,7 +108,6 @@ static NTSTATUS acl_tdb_delete(vfs_handle_struct *handle,
        return status;
 }
 
-#if 0
 /*******************************************************************
  Pull a security descriptor from an fsp into a DATA_BLOB from a tdb store.
 *******************************************************************/
@@ -154,7 +153,6 @@ static NTSTATUS fget_acl_blob(TALLOC_CTX *ctx,
        }
        return NT_STATUS_OK;
 }
-#endif
 
 /*******************************************************************
  Pull a security descriptor into a DATA_BLOB from a tdb store.
@@ -479,7 +477,7 @@ static NTSTATUS acl_tdb_fset_nt_acl(vfs_handle_struct *handle,
                                    const struct security_descriptor *psd)
 {
        NTSTATUS status;
-       status = fset_nt_acl_common(get_acl_blob, store_acl_blob_fsp,
+       status = fset_nt_acl_common(fget_acl_blob, store_acl_blob_fsp,
                                    ACL_MODULE_NAME,
                                    handle, fsp, security_info_sent, psd);
        return status;
index d6005cead72312e1564224ca71737928a8e0d1b8..db7ceef6d8c4e272c06e72bca8e86af755d378fd 100644 (file)
@@ -64,7 +64,6 @@ static ssize_t getxattr_do(vfs_handle_struct *handle,
        return sizeret;
 }
 
-#if 0
 static NTSTATUS fget_acl_blob(TALLOC_CTX *ctx,
                        vfs_handle_struct *handle,
                        files_struct *fsp,
@@ -122,7 +121,6 @@ static NTSTATUS fget_acl_blob(TALLOC_CTX *ctx,
        TALLOC_FREE(val);
        return map_nt_error_from_unix(errno);
 }
-#endif
 
 static NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
                        vfs_handle_struct *handle,
@@ -388,7 +386,7 @@ static NTSTATUS acl_xattr_fset_nt_acl(vfs_handle_struct *handle,
                                      const struct security_descriptor *psd)
 {
        NTSTATUS status;
-       status = fset_nt_acl_common(get_acl_blob, store_acl_blob_fsp,
+       status = fset_nt_acl_common(fget_acl_blob, store_acl_blob_fsp,
                                    ACL_MODULE_NAME,
                                    handle, fsp, security_info_sent, psd);
        return status;