Remove the char[1024] strings from dynconfig. Replace
[nivanova/samba-autobuild/.git] / source3 / winbindd / winbindd.c
index 53571d60026f7beb572e7036108e1a29dc4aea5e..598ec8e42856c465bb0517686b33589db0604a57 100644 (file)
@@ -63,13 +63,13 @@ static bool reload_services_file(void)
        if (lp_loaded()) {
                const char *fname = lp_configfile();
 
-               if (file_exist(fname,NULL) && !strcsequal(fname,dyn_CONFIGFILE)) {
-                       strlcpy(dyn_CONFIGFILE,fname,sizeof(dyn_CONFIGFILE));
+               if (file_exist(fname,NULL) && !strcsequal(fname,get_dyn_CONFIGFILE())) {
+                       set_dyn_CONFIGFILE(fname);
                }
        }
 
        reopen_logs();
-       ret = lp_load(dyn_CONFIGFILE,False,False,True,True);
+       ret = lp_load(get_dyn_CONFIGFILE(),False,False,True,True);
 
        reopen_logs();
        load_interfaces();
@@ -1088,7 +1088,7 @@ int main(int argc, char **argv, char **envp)
        if (!override_logfile) {
                char *logfile = NULL;
                if (asprintf(&logfile,"%s/log.winbindd",
-                               dyn_LOGFILEBASE) > 0) {
+                               get_dyn_LOGFILEBASE()) > 0) {
                        lp_set_logfile(logfile);
                        SAFE_FREE(logfile);
                }