6 * initialize an smb process. Guaranteed to be called only once per
7 * smbd instance (so it can assume it is starting from scratch, and
8 * delete temporary files etc)
10 void smbd_process_init(void)
12 /* possibly reload the services file. */
13 reload_services(NULL, True);
16 if (sys_chroot(lp_rootdir()) == 0)
17 DEBUG(2,("Changed root to %s\n", lp_rootdir()));
20 service_cleanup_tmp_files();
23 void init_subsystems(void)
25 /* Do *not* remove this, until you have removed
26 * passdb/secrets.c, and proved that Samba still builds... */
28 /* Setup the SECRETS subsystem */
29 if (!secrets_init()) {
36 /****************************************************************************
37 Reload the services file.
38 **************************************************************************/
39 BOOL reload_services(struct smbsrv_connection *smb, BOOL test)
45 pstrcpy(fname,lp_configfile());
46 if (file_exist(fname, NULL) &&
47 !strcsequal(fname, dyn_CONFIGFILE)) {
48 pstrcpy(dyn_CONFIGFILE, fname);
55 if (test && !lp_file_list_changed())
58 ret = lp_load(dyn_CONFIGFILE, False, False, True);
60 /* perhaps the config filename is now set */
62 reload_services(smb, True);