1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

Revert "token_util.c: prefer capabilities over become_root"

This reverts commit 944cb51506.

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>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Mar 27 10:47:23 UTC 2024 on atb-devel-224
This commit is contained in:
Björn Jacke 2024-01-25 00:46:38 +01:00 committed by Ralph Boehme
parent 32aa11e9b5
commit 0dec2ef188

View File

@ -699,7 +699,7 @@ NTSTATUS finalize_local_nt_token(struct security_token *result,
/* Add in BUILTIN sids */
set_effective_capability(DAC_OVERRIDE_CAPABILITY);
become_root();
ok = secrets_fetch_domain_sid(lp_workgroup(), &_dom_sid);
if (ok) {
domain_sid = &_dom_sid;
@ -707,7 +707,7 @@ NTSTATUS finalize_local_nt_token(struct security_token *result,
DEBUG(3, ("Failed to fetch domain sid for %s\n",
lp_workgroup()));
}
drop_effective_capability(DAC_OVERRIDE_CAPABILITY);
unbecome_root();
info = talloc_zero(talloc_tos(), struct acct_info);
if (info == NULL) {