diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-05-09 09:33:51 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-05-09 09:33:51 +0000 |
commit | cfe8b79c779f313c45c213621f8c5fc48148fc7d (patch) | |
tree | 1008d17da4dd1bcf433ebfe8bd4dc9a335e853ac | |
parent | c3cad25e5e34fda12b4ccfad7c2aa32b171581b6 (diff) | |
download | samba-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.c | 3 |
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); |