summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-05-09 09:33:51 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-05-09 09:33:51 +0000
commitcfe8b79c779f313c45c213621f8c5fc48148fc7d (patch)
tree1008d17da4dd1bcf433ebfe8bd4dc9a335e853ac
parentc3cad25e5e34fda12b4ccfad7c2aa32b171581b6 (diff)
downloadsamba-cfe8b79c779f313c45c213621f8c5fc48148fc7d.tar.gz
samba-cfe8b79c779f313c45c213621f8c5fc48148fc7d.tar.bz2
samba-cfe8b79c779f313c45c213621f8c5fc48148fc7d.zip
When checking if a SID is in a domain, make sure that indeed the user RID is
one element longer than the domain sid. Andrew Bartlett (This used to be commit c61e5e38776d2de53d120b592a6685158e79ebb8)
-rw-r--r--source3/lib/util_sid.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index e239ef56c7..00f14d7d26 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -391,6 +391,9 @@ BOOL sid_peek_check_rid(const DOM_SID *exp_dom_sid, const DOM_SID *sid, uint32 *
if (!exp_dom_sid || !sid || !rid)
return False;
+ if (sid->num_auths != (exp_dom_sid->num_auths+1)) {
+ return False;
+ }
if (sid_compare_domain(exp_dom_sid, sid)!=0){
*rid=(-1);