]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
nss: Adjust tests to use nss_files only
authorFlorian Weimer <fweimer@redhat.com>
Tue, 30 Jan 2018 05:28:49 +0000 (06:28 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 30 Jan 2018 13:26:31 +0000 (14:26 +0100)
ChangeLog
nss/bug17079.c
nss/tst-nss-getpwent.c

index d1a380432743c6d0b7639c761f31e0016f4f04f9..7772fd3b658ed0c70bc841546b0db8b10eb8204c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-01-30  Florian Weimer  <fweimer@redhat.com>
+
+       * nss/bug17079.c (do_test): Use nss_files only for reading passwd
+       data.
+       * nss/tst-nss-getpwent.c (do_test): Likewise.
+
 2018-01-30  Rafal Luzynski  <digitalfreak@lingonborough.com>
 
        [BZ #10871]
index f3e88b349d9d2084981a2e4ea1f8476ed1269a00..5f358f815ac63d430058d443257fb10cac663a3e 100644 (file)
@@ -17,6 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <errno.h>
+#include <nss.h>
 #include <pwd.h>
 #include <stdbool.h>
 #include <stdio.h>
@@ -213,6 +214,8 @@ test_buffer_size (size_t buffer_size)
 int
 do_test (void)
 {
+  __nss_configure_lookup ("passwd", "files");
+
   if (!init_test_items ())
     return 1;
   printf ("info: %d test items\n", test_count);
index cdaef767fe237fb3ebcbc4e5c6d9a59d19787c63..ff9c3d062ecbb832e727e789e8d93e5be016f060 100644 (file)
@@ -15,6 +15,7 @@
    License along with the GNU C Library; if not, see
    <http://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;