mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
vfs_default.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
0e3836e396
commit
62464bd2db
@ -1891,14 +1891,14 @@ static void vfswrap_get_dos_attributes_getxattr_done(struct tevent_req *subreq)
|
||||
|
||||
state->as_root = true;
|
||||
|
||||
become_root();
|
||||
set_effective_capability(DAC_OVERRIDE_CAPABILITY);
|
||||
subreq = SMB_VFS_GETXATTRAT_SEND(state,
|
||||
state->ev,
|
||||
state->dir_fsp,
|
||||
state->smb_fname,
|
||||
SAMBA_XATTR_DOS_ATTRIB,
|
||||
sizeof(fstring));
|
||||
unbecome_root();
|
||||
drop_effective_capability(DAC_OVERRIDE_CAPABILITY);
|
||||
if (tevent_req_nomem(subreq, req)) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user