git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bd88d3
)
if the sids are not the same pointer and either of the sids are NULL
author
Andrew Tridgell
<tridge@samba.org>
Tue, 25 Jul 2000 20:26:50 +0000
(20:26 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Tue, 25 Jul 2000 20:26:50 +0000
(20:26 +0000)
then the two sids are not equal
source/lib/util_sid.c
patch
|
blob
|
history
diff --git
a/source/lib/util_sid.c
b/source/lib/util_sid.c
index 42fdfb15fe7158e367c4441f0aab771463bccb0f..3572f2c775d4a94ffc96fa95f30596fdc59df82e 100644
(file)
--- 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])