s3: Fix MIT trusts
authorVolker Lendecke <vl@samba.org>
Mon, 25 Jul 2011 10:38:27 +0000 (12:38 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 27 Jul 2011 14:20:14 +0000 (16:20 +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.

source3/winbindd/winbindd_misc.c

index 7d2516770bc1859a1cb0da876964aeaf2550731b..16042fb45a90039ec4b61c1df77f9725390dd301 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,