]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - grp/initgroups.c
Remove --enable-obsolete-nsl configure flag
[thirdparty/glibc.git] / grp / initgroups.c
index b4c8633ea3aecf468f116cf90cbe62ccdc6e0870..0c17141117e6c3b33b20ed2950dc80f99b1ee663 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1989, 1991-2019 Free Software Foundation, Inc.
+/* Copyright (C) 1989, 1991-2020 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -13,7 +13,7 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
 #include <assert.h>
 #include <errno.h>
 #include "../nscd/nscd-client.h"
 #include "../nscd/nscd_proto.h"
 
-#ifdef LINK_OBSOLETE_NSL
-# define DEFAULT_CONFIG "compat [NOTFOUND=return] files"
-#else
-# define DEFAULT_CONFIG "files"
-#endif
-
 /* Type of the lookup function.  */
 typedef enum nss_status (*initgroups_dyn_function) (const char *, gid_t,
                                                    long int *, long int *,
@@ -79,12 +73,12 @@ internal_getgrouplist (const char *user, gid_t group, long int *size,
 
   if (__nss_initgroups_database == NULL)
     {
-      if (__nss_database_lookup ("initgroups", NULL, "",
-                                &__nss_initgroups_database) < 0)
+      if (__nss_database_lookup2 ("initgroups", NULL, "",
+                                 &__nss_initgroups_database) < 0)
        {
          if (__nss_group_database == NULL)
-           no_more = __nss_database_lookup ("group", NULL, DEFAULT_CONFIG,
-                                            &__nss_group_database);
+           no_more = __nss_database_lookup2 ("group", NULL, "files",
+                                             &__nss_group_database);
 
          __nss_initgroups_database = __nss_group_database;
        }