winbind: It's legitmate to have 0 groups in info3
authorVolker Lendecke <vl@samba.org>
Sun, 25 Dec 2016 10:12:59 +0000 (10:12 +0000)
committerVolker Lendecke <vl@samba.org>
Mon, 2 Jan 2017 17:04:13 +0000 (18:04 +0100)
At least a Samba DC can send an info3 struct with base.groups.count==0. We
should not fail with that and just return 0 groups.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/winbindd/winbindd_util.c

index c98b3ef5584a1954555cbf5c608e681b80bd4cd2..bd9403f0a958495b5cab0af459ba4ee5b7740d21 100644 (file)
@@ -1295,11 +1295,6 @@ NTSTATUS lookup_usergroups_cached(TALLOC_CTX *mem_ctx,
                return NT_STATUS_OBJECT_NAME_NOT_FOUND;
        }
 
-       if (info3->base.groups.count == 0) {
-               TALLOC_FREE(info3);
-               return NT_STATUS_UNSUCCESSFUL;
-       }
-
        /*
         * Before bug #7843 the "Domain Local" groups were added with a
         * lookupuseraliases call, but this isn't done anymore for our domain