From: Jeremy Allison Date: Thu, 15 Mar 2018 16:54:41 +0000 (-0700) Subject: s3: smbd: vfs_fruit: Replace code in check_ms_nfs() with remove_virtual_nfs_aces(). X-Git-Tag: talloc-2.1.12~142 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a3c925d80433e3d4fe1b1b315edf6520cacf0a9e;p=thirdparty%2Fsamba.git s3: smbd: vfs_fruit: Replace code in check_ms_nfs() with remove_virtual_nfs_aces(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=13319 Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 67af69843ed..38f421c337d 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -3006,9 +3006,6 @@ static NTSTATUS check_ms_nfs(vfs_handle_struct *handle, { uint32_t i; struct fruit_config_data *config = NULL; - struct dom_sid sid; - NTSTATUS status = NT_STATUS_OK; - bool remove_ok = false; *pdo_chmod = false; @@ -3042,40 +3039,7 @@ static NTSTATUS check_ms_nfs(vfs_handle_struct *handle, * fruit_fget_nt_acl(). */ - /* MS NFS style mode */ - sid_compose(&sid, &global_sid_Unix_NFS_Mode, - fsp->fsp_name->st.st_ex_mode); - status = security_descriptor_dacl_del(psd, &sid); - remove_ok = (NT_STATUS_IS_OK(status) || - NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)); - if (!remove_ok) { - DBG_WARNING("failed to remove MS NFS_mode style ACE\n"); - return status; - } - - /* MS NFS style uid */ - sid_compose(&sid, &global_sid_Unix_NFS_Users, - fsp->fsp_name->st.st_ex_uid); - status = security_descriptor_dacl_del(psd, &sid); - remove_ok = (NT_STATUS_IS_OK(status) || - NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)); - if (!remove_ok) { - DBG_WARNING("failed to remove MS NFS_users style ACE\n"); - return status; - } - - /* MS NFS style gid */ - sid_compose(&sid, &global_sid_Unix_NFS_Groups, - fsp->fsp_name->st.st_ex_gid); - status = security_descriptor_dacl_del(psd, &sid); - remove_ok = (NT_STATUS_IS_OK(status) || - NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)); - if (!remove_ok) { - DBG_WARNING("failed to remove MS NFS_groups style ACE\n"); - return status; - } - - return NT_STATUS_OK; + return remove_virtual_nfs_aces(psd); } /****************************************************************************