From 99135114ba23c3110b7e4e650fabdc5e639746b7 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Fri, 28 Jun 2019 18:30:00 -0500 Subject: nss_db: fix endent wrt NULL mappings [BZ #24695] [BZ #24696] nss_db allows for getpwent et al to be called without a set*ent, but it only works once. After the last get*ent a set*ent is required to restart, because the end*ent did not properly reset the module. Resetting it to NULL allows for a proper restart. If the database doesn't exist, however, end*ent erroniously called munmap which set errno. The test case runs "makedb" inside the testroot, so needs selinux DSOs installed. --- nss/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nss/Makefile') diff --git a/nss/Makefile b/nss/Makefile index 95081bddc5..a15c3b7d90 100644 --- a/nss/Makefile +++ b/nss/Makefile @@ -61,7 +61,9 @@ xtests = bug-erange tests-container = \ tst-nss-test3 \ - tst-nss-files-hosts-long + tst-nss-files-hosts-long \ + tst-nss-db-endpwent \ + tst-nss-db-endgrent # Tests which need libdl ifeq (yes,$(build-shared)) -- cgit 1.4.1