s3:winbind: Include local groups in _wbint_QueryGroupList
authorPavel Filipenský <pfilipensky@samba.org>
Mon, 27 Feb 2023 16:03:32 +0000 (17:03 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 13 Jun 2023 12:15:32 +0000 (12:15 +0000)
This is needed for GETGRENT to show also e.g. BUILTIN/users.
Otherwise the test_membership_user (local.nss.membership) would fail.

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/winbindd/winbindd_dual_srv.c

index ab0eb6c44cffae01f808fc9b696f2a5567c9b7a3..f0fd18a8fa65116cf84f60fe387be566b0335418 100644 (file)
@@ -541,6 +541,21 @@ NTSTATUS _wbint_QueryGroupList(struct pipes_struct *p,
                        include_local_groups = true;
                }
                break;
+       case ROLE_DOMAIN_MEMBER:
+               /*
+                * This is needed for GETGRENT to show also e.g. BUILTIN/users.
+                * Otherwise the test_membership_user (smbtorture
+                * local.nss.membership) would fail (getgrouplist() would
+                * reports BUILTIN/users).
+                */
+               if (domain->internal) {
+                       /*
+                        * we want to include local groups
+                        * for BUILTIN and LOCALSAM
+                        */
+                       include_local_groups = true;
+               }
+               break;
        default:
                /*
                 * We might include local groups in more