mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
Revert "vfs_recycle.c: prefer capabilities over become_root"
This reverts commit4227b011f6
. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15583 Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit7f19afbd40
)
This commit is contained in:
parent
4f38859f5d
commit
d0c295e534
@ -401,10 +401,10 @@ static void recycle_do_touch(vfs_handle_struct *handle,
|
|||||||
/* mtime */
|
/* mtime */
|
||||||
ft.mtime = touch_mtime ? ft.atime : smb_fname_tmp->st.st_ex_mtime;
|
ft.mtime = touch_mtime ? ft.atime : smb_fname_tmp->st.st_ex_mtime;
|
||||||
|
|
||||||
set_effective_capability(DAC_OVERRIDE_CAPABILITY);
|
become_root();
|
||||||
ret = SMB_VFS_NEXT_FNTIMES(handle, smb_fname_tmp->fsp, &ft);
|
ret = SMB_VFS_NEXT_FNTIMES(handle, smb_fname_tmp->fsp, &ft);
|
||||||
err = errno;
|
err = errno;
|
||||||
drop_effective_capability(DAC_OVERRIDE_CAPABILITY);
|
unbecome_root();
|
||||||
if (ret == -1 ) {
|
if (ret == -1 ) {
|
||||||
DEBUG(0, ("recycle: touching %s failed, reason = %s\n",
|
DEBUG(0, ("recycle: touching %s failed, reason = %s\n",
|
||||||
smb_fname_str_dbg(smb_fname_tmp), strerror(err)));
|
smb_fname_str_dbg(smb_fname_tmp), strerror(err)));
|
||||||
|
Loading…
Reference in New Issue
Block a user