nwrap: Remove incorrect implementation of nwrap_initgroups()
authorPavel Filipenský <pfilipensky@samba.org>
Tue, 17 Jan 2023 08:43:45 +0000 (09:43 +0100)
committerAndreas Schneider <asn@samba.org>
Tue, 24 Jan 2023 08:56:35 +0000 (09:56 +0100)
This will be correctly implemented later. The backends actually don't have an
initgroups() function but initgroups_dyn().

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

index 0b2066cabe4a34a4d422ea6e629ca9ee4c8b041b..1c81fc904bdb1d2bcf14f7c799e5ab25fb764622 100644 (file)
@@ -5305,20 +5305,7 @@ void endpwent(void)
 
 static int nwrap_initgroups(const char *user, gid_t group)
 {
-       size_t i;
-
-       for (i=0; i < nwrap_main_global->num_backends; i++) {
-               struct nwrap_backend *b = &nwrap_main_global->backends[i];
-               int rc;
-
-               rc = b->ops->nw_initgroups(b, user, group);
-               if (rc == 0) {
-                       return 0;
-               }
-       }
-
-       errno = ENOENT;
-       return -1;
+       return 0;
 }
 
 int initgroups(const char *user, gid_t group)