s4-loadparm: call reload_charcnv() also for a missing smb.conf
authorAndrew Tridgell <tridge@samba.org>
Mon, 14 Dec 2009 06:54:04 +0000 (17:54 +1100)
committerAndrew Tridgell <tridge@samba.org>
Mon, 14 Dec 2009 11:29:58 +0000 (22:29 +1100)
bin/net vampire with a missing smb.conf would segfault as the iconv
convenience pointer had not been setup.

source4/param/loadparm.c

index d65c3f9b16f31f74a0fbf4961fdf71ebb9af942c..f31d216e09eb9da507b43477fcc84ca24d52f172 100644 (file)
@@ -2552,6 +2552,10 @@ bool lp_load(struct loadparm_context *lp_ctx, const char *filename)
 
        bRetval = bRetval && lp_update(lp_ctx);
 
+       /* we do this unconditionally, so that it happens even
+          for a missing smb.conf */
+       reload_charcnv(lp_ctx);
+
        return bRetval;
 }