Skip to content

Commit d753687

Browse files
committed
nss: Adjust tests to use nss_files only
1 parent 9a1b267 commit d753687

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2018-01-30 Florian Weimer <[email protected]>
2+
3+
* nss/bug17079.c (do_test): Use nss_files only for reading passwd
4+
data.
5+
* nss/tst-nss-getpwent.c (do_test): Likewise.
6+
17
2018-01-30 Rafal Luzynski <[email protected]>
28

39
[BZ #10871]

nss/bug17079.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<http://www.gnu.org/licenses/>. */
1818

1919
#include <errno.h>
20+
#include <nss.h>
2021
#include <pwd.h>
2122
#include <stdbool.h>
2223
#include <stdio.h>
@@ -213,6 +214,8 @@ test_buffer_size (size_t buffer_size)
213214
int
214215
do_test (void)
215216
{
217+
__nss_configure_lookup ("passwd", "files");
218+
216219
if (!init_test_items ())
217220
return 1;
218221
printf ("info: %d test items\n", test_count);

nss/tst-nss-getpwent.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
License along with the GNU C Library; if not, see
1616
<http://www.gnu.org/licenses/>. */
1717

18+
#include <nss.h>
1819
#include <pwd.h>
1920
#include <stdbool.h>
2021
#include <stdio.h>
@@ -26,6 +27,8 @@
2627
int
2728
do_test (void)
2829
{
30+
__nss_configure_lookup ("passwd", "files");
31+
2932
/* Count the number of entries in the password database, and fetch
3033
data from the first and last entries. */
3134
size_t count = 0;

0 commit comments

Comments
 (0)