nwrap: Fix endpwent and setgrent to call the functions
authorPavel Filipenský <pfilipen@redhat.com>
Thu, 23 Jun 2022 17:29:29 +0000 (19:29 +0200)
committerAndreas Schneider <asn@samba.org>
Fri, 24 Jun 2022 07:48:21 +0000 (09:48 +0200)
Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
src/nss_wrapper.c

index d43c296f817fefb7f65c1605792000fb0ec04107..88e81d9c652bb87d02daa87ba73e6f27f8894adc 100644 (file)
@@ -4487,7 +4487,7 @@ static int nwrap_module_getpwent_r(struct nwrap_backend *b,
 
 static void nwrap_module_endpwent(struct nwrap_backend *b)
 {
-       if (b->symbols->_nss_endpwent.f) {
+       if (b->symbols->_nss_endpwent.f == NULL) {
                return;
        }
 
@@ -4659,7 +4659,7 @@ static int nwrap_module_getgrgid_r(struct nwrap_backend *b,
 
 static void nwrap_module_setgrent(struct nwrap_backend *b)
 {
-       if (b->symbols->_nss_setgrent.f) {
+       if (b->symbols->_nss_setgrent.f == NULL) {
                return;
        }