diff options
author | Andreas Schneider <asn@samba.org> | 2012-09-04 14:30:38 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2012-09-04 18:16:06 +0200 |
commit | 3390d9902a4e0b74e3437594f9f20d621b18305b (patch) | |
tree | 576a125c4746424a0f55858e8359f29c18a176c4 /source3/winbindd | |
parent | 4def1c1780c98d6595b778a6647818b79dea797a (diff) | |
download | samba-3390d9902a4e0b74e3437594f9f20d621b18305b.tar.gz samba-3390d9902a4e0b74e3437594f9f20d621b18305b.tar.bz2 samba-3390d9902a4e0b74e3437594f9f20d621b18305b.zip |
s3-winbind: DON'T PANIC if we couldn't find the domain.
If we don't have a connection to a trusted domain but still try to do a
lookup we shouldn't segfault.
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Sep 4 18:16:06 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_group.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd_group.c b/source3/winbindd/winbindd_group.c index 2f8ba6a023..ae461bf374 100644 --- a/source3/winbindd/winbindd_group.c +++ b/source3/winbindd/winbindd_group.c @@ -35,9 +35,17 @@ bool fill_grent(TALLOC_CTX *mem_ctx, struct winbindd_gr *gr, { fstring full_group_name; char *mapped_name = NULL; - struct winbindd_domain *domain = find_domain_from_name_noinit(dom_name); + struct winbindd_domain *domain; NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; + domain = find_domain_from_name_noinit(dom_name); + if (domain == NULL) { + DEBUG(0, ("Failed to find domain '%s'. " + "Check connection to trusted domains!\n", + dom_name)); + return false; + } + nt_status = normalize_name_map(mem_ctx, domain, gr_name, &mapped_name); |