summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/Makefile.in6
-rw-r--r--source3/dynconfig.c1
-rw-r--r--source3/include/dynconfig.h4
-rw-r--r--source3/libsmb/unexpected.c3
-rw-r--r--source3/m4/check_path.m418
5 files changed, 31 insertions, 1 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 7151df90f2..7c52f04dee 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -177,6 +177,9 @@ CODEPAGEDIR = @codepagedir@
# the directory where pid files go
PIDDIR = @piddir@
+# the directory where nmbd listens on the unexpected socket
+NMBDSOCKETDIR = @nmbdsocketdir@
+
FLAGS = -I. \
-I$(srcdir) \
@FLAGS1@ \
@@ -206,6 +209,7 @@ PATH_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \
-DCODEPAGEDIR=\"$(CODEPAGEDIR)\" \
-DCACHEDIR=\"$(CACHEDIR)\" \
-DSTATEDIR=\"$(STATEDIR)\" \
+ -DNMBDSOCKETDIR=\"$(NMBDSOCKETDIR)\" \
-DLOCALEDIR=\"$(LOCALEDIR)\"
# Note that all executable programs now provide for an optional executable suffix.
@@ -3150,6 +3154,7 @@ installdirs::
@$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) \
$(DESTDIR) $(prefix) $(BINDIR) $(SBINDIR) $(LIBDIR) \
$(VARDIR) $(PRIVATEDIR) $(PIDDIR) $(LOCKDIR) $(STATEDIR) \
+ $(NMBDSOCKETDIR) \
$(CACHEDIR) $(MANDIR) $(CODEPAGEDIR) $(MODULESDIR) $(LOCALEDIR)
installservers:: all installdirs
@@ -3228,6 +3233,7 @@ showlayout::
@echo " statedir: $(STATEDIR)"
@echo " cachedir: $(CACHEDIR)"
@echo " piddir: $(PIDDIR)"
+ @echo " nmbdsocketdir: $(NMBSOCKETDIR)"
@echo " swatdir: $(SWATDIR)"
@echo " datadir: ${DATADIR}"
@echo " codepagedir: $(CODEPAGEDIR)"
diff --git a/source3/dynconfig.c b/source3/dynconfig.c
index dfec0c3baa..c3ecae503c 100644
--- a/source3/dynconfig.c
+++ b/source3/dynconfig.c
@@ -79,6 +79,7 @@ DEFINE_DYN_CONFIG_PARAM(LOCKDIR)
DEFINE_DYN_CONFIG_PARAM(STATEDIR) /** Persistent state files. Default LOCKDIR */
DEFINE_DYN_CONFIG_PARAM(CACHEDIR) /** Temporary cache files. Default LOCKDIR */
DEFINE_DYN_CONFIG_PARAM(PIDDIR)
+DEFINE_DYN_CONFIG_PARAM(NMBDSOCKETDIR)
DEFINE_DYN_CONFIG_PARAM(NCALRPCDIR)
DEFINE_DYN_CONFIG_PARAM(SMB_PASSWD_FILE)
DEFINE_DYN_CONFIG_PARAM(PRIVATE_DIR)
diff --git a/source3/include/dynconfig.h b/source3/include/dynconfig.h
index 850ef1edd5..cd6dcb78d1 100644
--- a/source3/include/dynconfig.h
+++ b/source3/include/dynconfig.h
@@ -79,6 +79,10 @@ const char *get_dyn_PIDDIR(void);
const char *set_dyn_PIDDIR(const char *newpath);
bool is_default_dyn_PIDDIR(void);
+const char *get_dyn_NMBDSOCKETDIR(void);
+const char *set_dyn_NMBDSOCKETDIR(const char *newpath);
+bool is_default_dyn_NMBDSOCKETDIR(void);
+
const char *get_dyn_NCALRPCDIR(void);
const char *set_dyn_NCALRPCDIR(const char *newpath);
bool is_default_dyn_NCALRPCDIR(void);
diff --git a/source3/libsmb/unexpected.c b/source3/libsmb/unexpected.c
index c05af9ba8a..12832f6953 100644
--- a/source3/libsmb/unexpected.c
+++ b/source3/libsmb/unexpected.c
@@ -23,7 +23,8 @@
static const char *nmbd_socket_dir(void)
{
- return lp_parm_const_string(-1, "nmbd", "socket dir", "/tmp/.nmbd");
+ return lp_parm_const_string(-1, "nmbd", "socket dir",
+ get_dyn_NMBDSOCKETDIR());
}
struct nb_packet_query {
diff --git a/source3/m4/check_path.m4 b/source3/m4/check_path.m4
index 3683802964..f04e6f89c0 100644
--- a/source3/m4/check_path.m4
+++ b/source3/m4/check_path.m4
@@ -19,6 +19,7 @@ rootsbindir="\${SBINDIR}"
lockdir="\${VARDIR}/locks"
piddir="\${VARDIR}/locks"
ncalrpcdir="\${VARDIR}/ncalrpc"
+nmbdsocketdir="${lockdir}/.nmbd"
test "${mandir}" || mandir="\${prefix}/man"
logfilebase="\${VARDIR}"
privatedir="\${prefix}/private"
@@ -166,6 +167,22 @@ AC_ARG_WITH(ncalrpcdir,
esac])
#################################################
+# set nmbd socket directory location
+AC_ARG_WITH(nmbdsocketdir,
+[AS_HELP_STRING([--with-nmbdsocketdir=DIR], [Where to put the nmbd socket directory (${lockdir}/.nmbd)])],
+[ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody calls it without argument
+ #
+ AC_MSG_WARN([--with-nmbdsocketdir called without argument - will use default])
+ ;;
+ * )
+ nmbdsocketdir="$withval"
+ ;;
+ esac])
+
+#################################################
# set SWAT directory location
AC_ARG_WITH(swatdir,
[AS_HELP_STRING([--with-swatdir=DIR], [Where to put SWAT files ($ac_default_prefix/swat)])],
@@ -298,6 +315,7 @@ AC_ARG_WITH(codepagedir,
AC_SUBST(configdir)
AC_SUBST(lockdir)
AC_SUBST(piddir)
+AC_SUBST(nmbdsocketdir)
AC_SUBST(ncalrpcdir)
AC_SUBST(logfilebase)
AC_SUBST(privatedir)