diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-08-30 12:47:29 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-09-11 18:46:09 +1000 |
commit | 2387e3bcfeb4c2e54342a8fff4b157e9ba68024b (patch) | |
tree | 1bf331ee3d43535c558425b84a58b9e1d106c882 /source3/registry | |
parent | a02ae674dd6ffaa8ebc4017af6a644162c59a00d (diff) | |
download | samba-2387e3bcfeb4c2e54342a8fff4b157e9ba68024b.tar.gz samba-2387e3bcfeb4c2e54342a8fff4b157e9ba68024b.tar.xz samba-2387e3bcfeb4c2e54342a8fff4b157e9ba68024b.zip |
s3-privs Call security_token_set_privilege() rather than manual assignment
This avoids as much direct modifiction of the bitmask as possible.
Andrew Bartlett
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_util_token.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/registry/reg_util_token.c b/source3/registry/reg_util_token.c index 898b64b2a72..6373d48305b 100644 --- a/source3/registry/reg_util_token.c +++ b/source3/registry/reg_util_token.c @@ -43,7 +43,8 @@ NTSTATUS registry_create_admin_token(TALLOC_CTX *mem_ctx, status = NT_STATUS_NO_MEMORY; goto done; } - token->privilege_mask = se_disk_operators; + security_token_set_privilege(token, SEC_PRIV_DISK_OPERATOR); + status = add_sid_to_array(token, &global_sid_Builtin_Administrators, &token->sids, &token->num_sids); if (!NT_STATUS_IS_OK(status)) { |