]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - nss/getXXent_r.c
Allow for unpriviledged nested containers
[thirdparty/glibc.git] / nss / getXXent_r.c
index f1036058ff68d313f209547ebc1431529424642f..18546378f920ac4239dbb26cfd7e6b041d67ca6c 100644 (file)
@@ -1,6 +1,5 @@
-/* Copyright (C) 1996-2000,2002,2004,2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2022 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
 
    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 <errno.h>
-#include <bits/libc-lock.h>
+#include <libc-lock.h>
 
 #include "nsswitch.h"
 
 
 /* This handle for the NSS data base is shared between all
    set/get/endXXXent functions.  */
-static service_user *nip;
+static nss_action_list nip;
 /* Remember the last service used since the last call to  `endXXent'.  */
-static service_user *last_nip;
-/* Remember the first service_entry, it's always the same.  */
-static service_user *startp;
+static nss_action_list last_nip;
+/* Remember the first service_entry across set/get/endent.  */
+static nss_action_list startp;
 
 #ifdef STAYOPEN_TMP
 /* We need to remember the last `stayopen' flag given by the user
@@ -112,9 +111,8 @@ static STAYOPEN_TMP;
 __libc_lock_define_initialized (static, lock)
 
 /* The lookup function for the first entry of this service.  */
-extern int DB_LOOKUP_FCT (service_user **nip, const char *name,
-                         const char *name2, void **fctp)
-     internal_function;
+extern int DB_LOOKUP_FCT (nss_action_list *nip, const char *name,
+                         const char *name2, void **fctp);
 libc_hidden_proto (DB_LOOKUP_FCT)
 \f
 void
@@ -207,6 +205,6 @@ do_default_symbol_version (NEW (REENTRANT_GETNAME),
                           REENTRANT_GETNAME, GLIBC_2_1_2);
 #endif
 
-static_link_warning (SETFUNC_NAME)
-static_link_warning (ENDFUNC_NAME)
-static_link_warning (REENTRANT_GETNAME)
+nss_interface_function (SETFUNC_NAME)
+nss_interface_function (ENDFUNC_NAME)
+nss_interface_function (REENTRANT_GETNAME)