summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-07-25 20:26:50 +0000
committerAndrew Tridgell <tridge@samba.org>2000-07-25 20:26:50 +0000
commit5a98f9cb35835efdfe384b82e31e319276496ef4 (patch)
tree64d2361ed0f41d53c7b46310e3fd02e6151d6883 /source3
parentfcbf69495784000861d432c13217702cc28884f8 (diff)
downloadsamba-5a98f9cb35835efdfe384b82e31e319276496ef4.tar.gz
samba-5a98f9cb35835efdfe384b82e31e319276496ef4.tar.bz2
samba-5a98f9cb35835efdfe384b82e31e319276496ef4.zip
if the sids are not the same pointer and either of the sids are NULL
then the two sids are not equal (This used to be commit 9ccf3b1dc5baf0e00d032d8b932ab0fb5b1e11b1)
Diffstat (limited to 'source3')
-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 42fdfb15fe..3572f2c775 100644
--- a/source3/lib/util_sid.c
+++ b/source3/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])