mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
Revert "token_util.c: prefer capabilities over become_root"
This reverts commit944cb51506
. 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 (cherry picked from commit0dec2ef188
) Autobuild-User(v4-20-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-20-test): Wed Mar 27 16:51:00 UTC 2024 on atb-devel-224
This commit is contained in:
parent
f7491b2994
commit
5cedf3b5eb
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user