mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
nfs4_acls.c: prefer capabilities over become_root
Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
This commit is contained in:
parent
944cb51506
commit
06e5c1e32e
@ -1201,12 +1201,12 @@ NTSTATUS smb_set_nt_acl_nfs4(vfs_handle_struct *handle, files_struct *fsp,
|
||||
smbacl4_dump_nfs4acl(10, theacl);
|
||||
|
||||
if (set_acl_as_root) {
|
||||
become_root();
|
||||
set_effective_capability(DAC_OVERRIDE_CAPABILITY);
|
||||
}
|
||||
result = set_nfs4_native(handle, fsp, theacl);
|
||||
saved_errno = errno;
|
||||
if (set_acl_as_root) {
|
||||
unbecome_root();
|
||||
drop_effective_capability(DAC_OVERRIDE_CAPABILITY);
|
||||
}
|
||||
|
||||
TALLOC_FREE(frame);
|
||||
|
Loading…
Reference in New Issue
Block a user