nss_wins: Use lp_global_no_reinit()
authorAndreas Schneider <asn@samba.org>
Fri, 23 Oct 2015 13:28:23 +0000 (15:28 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 20 Nov 2015 10:53:14 +0000 (11:53 +0100)
This avoids that we run into use after free issues when we access memory
allocated on the globals and the global being reinitialized.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11563

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 0abbfb2e4d5bcd847983ef7981840f1eab7b917c)

nsswitch/wins.c

index d63968b2bc5a3a055de016ad666a1800544f7576..6b5c3e2650d91d96d863a03b20c36fd120c2fe81 100644 (file)
@@ -53,7 +53,7 @@ static void nss_wins_init(void)
 
        TimeInit();
        setup_logging("nss_wins",False);
-       lp_load(get_dyn_CONFIGFILE(),True,False,False,True);
+       lp_load_global_no_reinit(get_dyn_CONFIGFILE());
        load_interfaces();
 }