Skip to content

Commit

Permalink
Revert "token_util.c: prefer capabilities over become_root"
Browse files Browse the repository at this point in the history
This reverts commit 944cb51.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15583
Signed-off-by: Bjoern Jacke <[email protected]>
Reviewed-by: Ralph Boehme <[email protected]>

Autobuild-User(master): Ralph Böhme <[email protected]>
Autobuild-Date(master): Wed Mar 27 10:47:23 UTC 2024 on atb-devel-224
  • Loading branch information
Björn Jacke authored and slowfranklin committed Mar 27, 2024
1 parent 32aa11e commit 0dec2ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source3/auth/token_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,15 +699,15 @@ 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;
} else {
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) {
Expand Down

0 comments on commit 0dec2ef

Please sign in to comment.