From: Björn Jacke Date: Mon, 25 Mar 2024 16:04:23 +0000 (+0100) Subject: Revert "nfs4_acls.c: prefer capabilities over become_root" X-Git-Tag: tdb-1.4.11~1359 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33e88911ee7a8974d52021632ca25c1ddfcb6f45;p=thirdparty%2Fsamba.git Revert "nfs4_acls.c: prefer capabilities over become_root" This reverts commit 06e5c1e32ea7907523cc19f021225e7541e2075f. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15583 Signed-off-by: Bjoern Jacke Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index 0cc2b6cf364..c80f8390170 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -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) { - set_effective_capability(DAC_OVERRIDE_CAPABILITY); + become_root(); } result = set_nfs4_native(handle, fsp, theacl); saved_errno = errno; if (set_acl_as_root) { - drop_effective_capability(DAC_OVERRIDE_CAPABILITY); + unbecome_root(); } TALLOC_FREE(frame);