git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22a4a00
)
s3: Avoid adding a domain twice
author
Volker Lendecke
<vl@samba.org>
Mon, 28 Dec 2009 17:11:34 +0000
(18:11 +0100)
committer
Volker Lendecke
<vl@samba.org>
Sat, 2 Jan 2010 11:09:05 +0000
(12:09 +0100)
If we found a match with sid==NULL, we ended up adding the domain twice
source3/winbindd/winbindd_util.c
patch
|
blob
|
history
diff --git
a/source3/winbindd/winbindd_util.c
b/source3/winbindd/winbindd_util.c
index e56efa4c8c42bdffdab27317a37073962d054aee..01440b678fed0f3214bbf12b8c41f9adb80e35d4 100644
(file)
--- a/
source3/winbindd/winbindd_util.c
+++ b/
source3/winbindd/winbindd_util.c
@@
-143,13
+143,14
@@
static struct winbindd_domain *add_trusted_domain(const char *domain_name, const
}
}
- /* See if we found a match. Check if we need to update the
- SID. */
-
- if ( domain && sid) {
- if ( sid_equal( &domain->sid, &global_sid_NULL ) )
+ if (domain != NULL) {
+ /*
+ * We found a match. Possibly update the SID
+ */
+ if ((sid != NULL)
+ && sid_equal(&domain->sid, &global_sid_NULL)) {
sid_copy( &domain->sid, sid );
-
+ }
return domain;
}