summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2017-08-18 13:52:31 +0200
committerJeremy Allison <jra@samba.org>2017-08-24 01:46:07 +0200
commitce8a22d2963a989a9a0cf730c15a8f3cb6f0c3d7 (patch)
tree5d4fffd53d077d1783e25602e7c30924e2e2ecb3 /source3
parent81a46c0abfc6bbcbea0e417611a3984452e180b8 (diff)
downloadsamba-ce8a22d2963a989a9a0cf730c15a8f3cb6f0c3d7.tar.gz
acl_common: Pass store_acl_blob_fsp through store_v3_blob
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_acl_common.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 9638e618c17..3f5f0c8ac0f 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -1087,10 +1087,14 @@ static NTSTATUS set_underlying_acl(vfs_handle_struct *handle, files_struct *fsp,
/*********************************************************************
Store a v3 security descriptor
*********************************************************************/
-static NTSTATUS store_v3_blob(vfs_handle_struct *handle, files_struct *fsp,
- struct security_descriptor *psd,
- struct security_descriptor *pdesc_next,
- uint8_t hash[XATTR_SD_HASH_SIZE])
+static NTSTATUS store_v3_blob(
+ NTSTATUS (*store_acl_blob_fsp_fn)(vfs_handle_struct *handle,
+ files_struct *fsp,
+ DATA_BLOB *pblob),
+ vfs_handle_struct *handle, files_struct *fsp,
+ struct security_descriptor *psd,
+ struct security_descriptor *pdesc_next,
+ uint8_t hash[XATTR_SD_HASH_SIZE])
{
NTSTATUS status;
DATA_BLOB blob;
@@ -1118,7 +1122,7 @@ static NTSTATUS store_v3_blob(vfs_handle_struct *handle, files_struct *fsp,
return status;
}
- status = store_acl_blob_fsp(handle, fsp, &blob);
+ status = store_acl_blob_fsp_fn(handle, fsp, &blob);
return status;
}
@@ -1207,7 +1211,8 @@ static NTSTATUS fset_nt_acl_common(vfs_handle_struct *handle, files_struct *fsp,
}
}
ZERO_ARRAY(hash);
- status = store_v3_blob(handle, fsp, psd, NULL, hash);
+ status = store_v3_blob(store_acl_blob_fsp, handle, fsp, psd,
+ NULL, hash);
TALLOC_FREE(frame);
return status;
@@ -1248,7 +1253,8 @@ static NTSTATUS fset_nt_acl_common(vfs_handle_struct *handle, files_struct *fsp,
/* If we fail to get the ACL blob (for some reason) then this
* is not fatal, we just work based on the NT ACL only */
if (ret != 0) {
- status = store_v3_blob(handle, fsp, psd, pdesc_next, hash);
+ status = store_v3_blob(store_acl_blob_fsp, handle, fsp, psd,
+ pdesc_next, hash);
TALLOC_FREE(frame);
return status;