summaryrefslogtreecommitdiff
path: root/source3/lib/util_nttoken.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-08-30 13:14:40 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-09-11 18:46:10 +1000
commited6b4ddd71ebdcdbdea7949ecbef11f409766534 (patch)
tree06b402d6b114492f7c68b26e03246c9950b41e48 /source3/lib/util_nttoken.c
parent92efe9a86aae64d85323a9fcf6d20fd3f85bc22c (diff)
downloadsamba-ed6b4ddd71ebdcdbdea7949ecbef11f409766534.tar.gz
samba-ed6b4ddd71ebdcdbdea7949ecbef11f409766534.tar.bz2
samba-ed6b4ddd71ebdcdbdea7949ecbef11f409766534.zip
s3-privs Directly manipulate the privileges bitmap.
There is no longer any reason to go via the se_ functions to manipulate this bitmap. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3/lib/util_nttoken.c')
-rw-r--r--source3/lib/util_nttoken.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source3/lib/util_nttoken.c b/source3/lib/util_nttoken.c
index 8efebaf9eb..3130ed89fb 100644
--- a/source3/lib/util_nttoken.c
+++ b/source3/lib/util_nttoken.c
@@ -56,12 +56,7 @@ struct security_token *dup_nt_token(TALLOC_CTX *mem_ctx, const struct security_t
token->num_sids = ptoken->num_sids;
}
- /* copy the privileges; don't consider failure to be critical here */
-
- if ( !se_priv_copy( &token->privilege_mask, &ptoken->privilege_mask ) ) {
- DEBUG(0,("dup_nt_token: Failure to copy privilages!. "
- "Continuing with 0 privileges assigned.\n"));
- }
+ token->privilege_mask = ptoken->privilege_mask;
return token;
}
@@ -108,8 +103,8 @@ NTSTATUS merge_nt_token(TALLOC_CTX *mem_ctx,
}
}
- se_priv_add(&token->privilege_mask, &token_1->privilege_mask);
- se_priv_add(&token->privilege_mask, &token_2->privilege_mask);
+ token->privilege_mask |= token_1->privilege_mask;
+ token->privilege_mask |= token_2->privilege_mask;
*token_out = token;