nwrap: Fix mutex unlocking in nwrap_init()
authorAndreas Schneider <asn@cryptomilk.org>
Fri, 4 Nov 2022 12:19:55 +0000 (13:19 +0100)
committerAndreas Schneider <asn@samba.org>
Fri, 4 Nov 2022 13:41:50 +0000 (14:41 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
src/nss_wrapper.c

index 88e81d9c652bb87d02daa87ba73e6f27f8894adc..9541365caf47c718847ea47860fe609c817653cf 100644 (file)
@@ -1977,7 +1977,12 @@ static void nwrap_init(void)
        nwrap_he_global.cache->unload = nwrap_he_unload;
 
        /* We hold all locks here so we can use NWRAP_UNLOCK_ALL. */
-       NWRAP_UNLOCK_ALL;
+       NWRAP_UNLOCK(nwrap_sp_global);
+       NWRAP_UNLOCK(nwrap_pw_global);
+       NWRAP_UNLOCK(nwrap_he_global);
+       NWRAP_UNLOCK(nwrap_gr_global);
+       NWRAP_UNLOCK(nwrap_global);
+       NWRAP_UNLOCK(nwrap_initialized);
 }
 
 bool nss_wrapper_enabled(void)