summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/samdb.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-08-14 20:33:36 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-08-18 09:50:45 +1000
commit23dc2e4244a99f1e955d54c22516a7a8c108d989 (patch)
tree86547834a98a7ba2183b778c0b95dc017e56dbb5 /source4/dsdb/samdb/samdb.c
parent2ceb3d8d35b87926d0ffc933782321598457fc11 (diff)
downloadsamba-23dc2e4244a99f1e955d54c22516a7a8c108d989.tar.gz
samba-23dc2e4244a99f1e955d54c22516a7a8c108d989.tar.bz2
samba-23dc2e4244a99f1e955d54c22516a7a8c108d989.zip
s4:auth Change {anonymous,system}_session to use common session_info generation
This also changes the primary group for anonymous to be the anonymous SID, and adds code to detect and ignore this when constructing the token. Andrew Bartlett
Diffstat (limited to 'source4/dsdb/samdb/samdb.c')
-rw-r--r--source4/dsdb/samdb/samdb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c
index 2d64cc1b85..0a2d5c3c7c 100644
--- a/source4/dsdb/samdb/samdb.c
+++ b/source4/dsdb/samdb/samdb.c
@@ -168,8 +168,10 @@ NTSTATUS security_token_create(TALLOC_CTX *mem_ctx,
NT_STATUS_HAVE_NO_MEMORY(ptoken->sids);
ptoken->sids[PRIMARY_USER_SID_INDEX] = talloc_reference(ptoken, user_sid);
- ptoken->sids[PRIMARY_GROUP_SID_INDEX] = talloc_reference(ptoken, group_sid);
- ptoken->num_sids++;
+ if (!dom_sid_equal(user_sid, group_sid)) {
+ ptoken->sids[PRIMARY_GROUP_SID_INDEX] = talloc_reference(ptoken, group_sid);
+ ptoken->num_sids++;
+ }
/*
* Finally add the "standard" SIDs.