Skip to content

Commit

Permalink
s3: smbd: vfs_fruit: Replace code in check_ms_nfs() with remove_virtu…
Browse files Browse the repository at this point in the history
…al_nfs_aces().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13319

Signed-off-by: Jeremy Allison <[email protected]>
Reviewed-by: Ralph Boehme <[email protected]>
  • Loading branch information
jrasamba committed Mar 16, 2018
1 parent ef091e2 commit a3c925d
Showing 1 changed file with 1 addition and 37 deletions.
38 changes: 1 addition & 37 deletions source3/modules/vfs_fruit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}

/****************************************************************************
Expand Down

0 comments on commit a3c925d

Please sign in to comment.