summaryrefslogtreecommitdiff
path: root/source4/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-08-14 13:30:51 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-08-18 09:50:38 +1000
commit7c6ca95bec5141707d4f19e802062731d6789cc5 (patch)
treed6ee504cf0f98ff62b5bac6b19a869f8378c3757 /source4/auth
parent60086dcf9a58525d400b39e9464847d73cbce6d2 (diff)
downloadsamba-7c6ca95bec5141707d4f19e802062731d6789cc5.tar.gz
samba-7c6ca95bec5141707d4f19e802062731d6789cc5.tar.bz2
samba-7c6ca95bec5141707d4f19e802062731d6789cc5.zip
s4:security Remove use of user_sid and group_sid from struct security_token
This makes the structure more like Samba3's NT_USER_TOKEN
Diffstat (limited to 'source4/auth')
-rw-r--r--source4/auth/system_session.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/source4/auth/system_session.c b/source4/auth/system_session.c
index 386f066de4..08ddb68f5d 100644
--- a/source4/auth/system_session.c
+++ b/source4/auth/system_session.c
@@ -51,13 +51,10 @@ static NTSTATUS create_token(TALLOC_CTX *mem_ctx,
ptoken->sids = talloc_array(ptoken, struct dom_sid *, n_groupSIDs + 5);
NT_STATUS_HAVE_NO_MEMORY(ptoken->sids);
- ptoken->user_sid = talloc_reference(ptoken, user_sid);
- ptoken->group_sid = talloc_reference(ptoken, group_sid);
+ ptoken->sids[PRIMARY_USER_SID_INDEX] = talloc_reference(ptoken, user_sid);
+ ptoken->sids[PRIMARY_GROUP_SID_INDEX] = talloc_reference(ptoken, group_sid);
ptoken->privilege_mask = 0;
- ptoken->sids[0] = ptoken->user_sid;
- ptoken->sids[1] = ptoken->group_sid;
-
/*
* Finally add the "standard" SIDs.
* The only difference between guest and "anonymous"
@@ -93,7 +90,7 @@ static NTSTATUS create_token(TALLOC_CTX *mem_ctx,
*token = ptoken;
/* Shortcuts to prevent recursion and avoid lookups */
- if (ptoken->user_sid == NULL) {
+ if (ptoken->sids == NULL) {
ptoken->privilege_mask = 0;
return NT_STATUS_OK;
}
@@ -337,12 +334,10 @@ static NTSTATUS create_admin_token(TALLOC_CTX *mem_ctx,
ptoken->sids = talloc_array(ptoken, struct dom_sid *, n_groupSIDs + 3);
NT_STATUS_HAVE_NO_MEMORY(ptoken->sids);
- ptoken->user_sid = talloc_reference(ptoken, user_sid);
- ptoken->group_sid = talloc_reference(ptoken, group_sid);
ptoken->privilege_mask = 0;
+ ptoken->sids[PRIMARY_USER_SID_INDEX] = talloc_reference(ptoken, user_sid);
+ ptoken->sids[PRIMARY_GROUP_SID_INDEX] = talloc_reference(ptoken, group_sid);
- ptoken->sids[0] = ptoken->user_sid;
- ptoken->sids[1] = ptoken->group_sid;
ptoken->sids[2] = dom_sid_parse_talloc(ptoken->sids, SID_NT_AUTHENTICATED_USERS);
NT_STATUS_HAVE_NO_MEMORY(ptoken->sids[2]);
ptoken->num_sids = 3;