diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-07-25 20:26:50 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-07-25 20:26:50 +0000 |
commit | 9ccf3b1dc5baf0e00d032d8b932ab0fb5b1e11b1 (patch) | |
tree | 7c0a58e3384732503d3d02a76f24a1c5e2cd28df /source/lib/util_sid.c | |
parent | 0bd88d304cd773e0bbf3e6f7fedcb3b544d41cbe (diff) | |
download | samba-9ccf3b1dc5baf0e00d032d8b932ab0fb5b1e11b1.tar.gz samba-9ccf3b1dc5baf0e00d032d8b932ab0fb5b1e11b1.tar.xz samba-9ccf3b1dc5baf0e00d032d8b932ab0fb5b1e11b1.zip |
if the sids are not the same pointer and either of the sids are NULL
then the two sids are not equal
Diffstat (limited to 'source/lib/util_sid.c')
-rw-r--r-- | source/lib/util_sid.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/lib/util_sid.c b/source/lib/util_sid.c index 42fdfb15fe7..3572f2c775d 100644 --- a/source/lib/util_sid.c +++ b/source/lib/util_sid.c @@ -404,6 +404,9 @@ BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2) { int i; + if (sid1 == sid2) return True; + if (!sid1 || !sid2) return False; + /* compare most likely different rids, first: i.e start at end */ for (i = sid1->num_auths-1; i >= 0; --i) if (sid1->sub_auths[i] != sid2->sub_auths[i]) |