diff options
author | Günther Deschner <gd@samba.org> | 2008-07-29 12:08:47 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-07-30 17:09:58 +0200 |
commit | 3bdfcbac5c1a6c571a4299467a7993da46a921a5 (patch) | |
tree | 446127d35882970bf69f2a6f81c7c434703c9750 /source3/winbindd/winbindd_cache.c | |
parent | 4356a456822914c5a4c98c903b5ade3b0a3a909d (diff) | |
download | samba-3bdfcbac5c1a6c571a4299467a7993da46a921a5.tar.gz samba-3bdfcbac5c1a6c571a4299467a7993da46a921a5.tar.bz2 samba-3bdfcbac5c1a6c571a4299467a7993da46a921a5.zip |
winbindd: handle trusted domains without sid.
Guenther
(This used to be commit 0c1efc6c89b1a51a94d10971bf0fc515416709b3)
Diffstat (limited to 'source3/winbindd/winbindd_cache.c')
-rw-r--r-- | source3/winbindd/winbindd_cache.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index 60403717c1..c9d857c2ec 100644 --- a/source3/winbindd/winbindd_cache.c +++ b/source3/winbindd/winbindd_cache.c @@ -2072,7 +2072,9 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain, for (i=0; i<(*num_domains); i++) { (*names)[i] = centry_string(centry, mem_ctx); (*alt_names)[i] = centry_string(centry, mem_ctx); - centry_sid(centry, mem_ctx, &(*dom_sids)[i]); + if (!centry_sid(centry, mem_ctx, &(*dom_sids)[i])) { + sid_copy(&(*dom_sids)[i], &global_sid_NULL); + } } status = centry->status; @@ -3543,8 +3545,11 @@ static bool add_wbdomain_to_tdc_array( struct winbindd_domain *new_dom, list[idx].domain_name = talloc_strdup( list, new_dom->name ); list[idx].dns_name = talloc_strdup( list, new_dom->alt_name ); - if ( !is_null_sid( &new_dom->sid ) ) + if ( !is_null_sid( &new_dom->sid ) ) { sid_copy( &list[idx].sid, &new_dom->sid ); + } else { + sid_copy(&list[idx].sid, &global_sid_NULL); + } if ( new_dom->domain_flags != 0x0 ) list[idx].trust_flags = new_dom->domain_flags; |