summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-11-11 00:48:42 +0000
committerAndrew Tridgell <tridge@samba.org>1997-11-11 00:48:42 +0000
commit5c3f9f4e2c7ab8e2190e2089dccfa01d1fd44f5e (patch)
tree067f5e1e7497cbc3153c23baee93fe42a3689976 /source3
parentc2d2a17fbd3b66e7e52569bb0c0a23144c2b87a9 (diff)
downloadsamba-5c3f9f4e2c7ab8e2190e2089dccfa01d1fd44f5e.tar.gz
samba-5c3f9f4e2c7ab8e2190e2089dccfa01d1fd44f5e.tar.bz2
samba-5c3f9f4e2c7ab8e2190e2089dccfa01d1fd44f5e.zip
auto-create the locks directory on startup
(This used to be commit a0ab8fe54c27d9f25266c5abfd60458827500dfd)
Diffstat (limited to 'source3')
-rw-r--r--source3/nmbd/nmbd.c4
-rw-r--r--source3/smbd/server.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 696889c484..5067a7efc8 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -594,6 +594,10 @@ static void usage(char *pname)
become_daemon();
}
+ if (!directory_exist(lp_lockdir(), NULL)) {
+ mkdir(lp_lockdir(), 0755);
+ }
+
if (*pidFile)
{
int fd;
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 908cf984b8..278087b60a 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -5138,6 +5138,10 @@ static void usage(char *pname)
become_daemon();
}
+ if (!directory_exist(lp_lockdir(), NULL)) {
+ mkdir(lp_lockdir(), 0755);
+ }
+
if (*pidFile)
{
int fd;