nss: Unnest nested function add_key
[platform/upstream/glibc.git] / nss / tst-nss-getpwent.c
index cdaef76..58ff744 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2015-2018 Free Software Foundation, Inc.
+/* Copyright (C) 2015-2021 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,8 +13,9 @@
 
    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 <nss.h>
 #include <pwd.h>
 #include <stdbool.h>
 #include <stdio.h>
@@ -26,6 +27,8 @@
 int
 do_test (void)
 {
+  __nss_configure_lookup ("passwd", "files");
+
   /* Count the number of entries in the password database, and fetch
      data from the first and last entries.  */
   size_t count = 0;