From 33e88911ee7a8974d52021632ca25c1ddfcb6f45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= Date: Mon, 25 Mar 2024 17:04:23 +0100 Subject: [PATCH] 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 --- source3/modules/nfs4_acls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);