s3: piddir creation fix part 2. master
authorIra Cooper <ira@samba.org>
Wed, 7 Mar 2012 01:58:37 +0000 (20:58 -0500)
committerIra Cooper <ira@samba.org>
Wed, 7 Mar 2012 02:01:06 +0000 (21:01 -0500)
Since the piddir got moved from the lockdir by default, the default piddir
wasn't getting created, stopping some configurations from running.

source3/nmbd/nmbd.c
source3/winbindd/winbindd.c

index 7bd4facbb18f3dfead8c794e10f4d07c2d5a5d7f..52d7ed9e4e7d4a948711214f9c02efc1d86501b0 100644 (file)
@@ -937,6 +937,10 @@ static bool open_sockets(bool isdaemon, int port)
                mkdir(lp_lockdir(), 0755);
        }
 
+       if (!directory_exist(lp_piddir())) {
+               mkdir(lp_piddir(), 0755);
+       }
+
        pidfile_create("nmbd");
 
        status = reinit_after_fork(msg, nmbd_event_context(),
index 3806eb8b2badca6a5181d7095adfc98410b1081d..d1d36fd0073859c71104a6cfd775cf199678ce6f 100644 (file)
@@ -1404,6 +1404,10 @@ int main(int argc, char **argv, char **envp)
                mkdir(lp_lockdir(), 0755);
        }
 
+       if (!directory_exist(lp_piddir())) {
+               mkdir(lp_piddir(), 0755);
+       }
+
        /* Setup names. */
 
        if (!init_names())