/* Ok, we failed to chown and we have
SEC_STD_WRITE_OWNER access - override. */
- set_effective_capability(DAC_OVERRIDE_CAPABILITY);
+ become_root();
status = SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, security_info_sent, psd);
- drop_effective_capability(DAC_OVERRIDE_CAPABILITY);
+ unbecome_root();
return status;
}
goto out;
}
- set_effective_capability(DAC_OVERRIDE_CAPABILITY);
+ become_root();
if (is_directory) {
ret = SMB_VFS_NEXT_UNLINKAT(handle,
dirfsp,
smb_fname,
0);
}
- drop_effective_capability(DAC_OVERRIDE_CAPABILITY);
+ unbecome_root();
if (ret == -1) {
saved_errno = errno;