s3: Fix MIT trusts
authorVolker Lendecke <vl@samba.org>
Mon, 25 Jul 2011 10:38:27 +0000 (12:38 +0200)
committerVolker Lendecke <vlendec@samba.org>
Tue, 26 Jul 2011 09:39:53 +0000 (11:39 +0200)
Winbind can't really cope with trusts that don't have a SID associated. This
happens with external MIT trusts for example. This filters them out when
sending the trust list from child to parent.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jul 26 11:39:53 CEST 2011 on sn-devel-104

source3/winbindd/winbindd_misc.c

index 3fb14368209e225ee7c80897f398d8fb9a8e9df9..d2259bef73e9edaa623aa15c98b65aed49937fcb 100644 (file)
@@ -171,6 +171,11 @@ enum winbindd_result winbindd_dual_list_trusted_domains(struct winbindd_domain *
        extra_data = talloc_strdup(state->mem_ctx, "");
 
        for (i=0; i<trusts.count; i++) {
+
+               if (trusts.array[i].sid == NULL) {
+                       continue;
+               }
+
                extra_data = talloc_asprintf_append_buffer(
                        extra_data, "%s\\%s\\%s\n",
                        trusts.array[i].netbios_name,