mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
s3: Avoid adding a domain twice
If we found a match with sid==NULL, we ended up adding the domain twice
This commit is contained in:
parent
22a4a000ce
commit
92345f49e3
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user