summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNathaniel McCallum <npmccallum@redhat.com>2014-02-05 10:59:46 -0500
committerGreg Hudson <ghudson@mit.edu>2014-02-06 16:17:27 -0500
commit1e4bdcfed2c7bda94d5c135cc32a5993ca032501 (patch)
treed4a0a8ee96b73ad78152e1219183eb2787493897 /src
parent53cfb8327c452bd72a8e915338fb5ec838079cd3 (diff)
downloadkrb5-1e4bdcfed2c7bda94d5c135cc32a5993ca032501.tar.gz
krb5-1e4bdcfed2c7bda94d5c135cc32a5993ca032501.tar.xz
krb5-1e4bdcfed2c7bda94d5c135cc32a5993ca032501.zip
Move OTP sockets to KDC_RUN_DIR
Some system configurations expect Unix-domain sockets to live under /run or /var/run, and not other parts of /var where persistent application state lives. Define a new directory KDC_RUN_DIR using $runstatedir (new in autoconf 2.70, so fall back to $localstatedir/run if it's not set) and use that for the default socket path. [ghudson@mit.edu: commit message, otp.rst formatting fix] ticket: 7859 (new)
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in1
-rw-r--r--src/configure.in6
-rw-r--r--src/doc/Makefile.in2
-rw-r--r--src/include/Makefile.in2
-rw-r--r--src/include/osconf.hin1
-rw-r--r--src/man/Makefile.in2
-rw-r--r--src/plugins/preauth/otp/otp_state.c2
7 files changed, 15 insertions, 1 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index a8bc990a17..1725093071 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -64,6 +64,7 @@ INSTALLMKDIRS = $(KRB5ROOT) $(KRB5MANROOT) $(KRB5OTHERMKDIRS) \
$(KRB5_AD_MODULE_DIR) \
$(KRB5_LIBKRB5_MODULE_DIR) \
@localstatedir@ @localstatedir@/krb5kdc \
+ @runstatedir@ @runstatedir@/krb5kdc \
$(KRB5_INCSUBDIRS) $(datadir) $(EXAMPLEDIR) \
$(PKGCONFIG_DIR)
diff --git a/src/configure.in b/src/configure.in
index 2145d54476..c2eaf78d83 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -1,5 +1,11 @@
K5_AC_INIT([aclocal.m4])
+# If $runstatedir isn't set by autoconf (<2.70), set it manually.
+if test x"$runstatedir" == x; then
+ runstatedir=$localstatedir/run
+fi
+AC_SUBST(runstatedir)
+
CONFIG_RULES
KRB5_VERSION=K5_VERSION
AC_SUBST(KRB5_VERSION)
diff --git a/src/doc/Makefile.in b/src/doc/Makefile.in
index a6bb7c539e..b07e16a672 100644
--- a/src/doc/Makefile.in
+++ b/src/doc/Makefile.in
@@ -7,6 +7,7 @@ DOXYGEN=doxygen
docsrc=$(top_srcdir)/../doc
localstatedir=@localstatedir@
+runstatedir=@runstatedir@
sysconfdir=@sysconfdir@
DEFCCNAME=@DEFCCNAME@
DEFKTNAME=@DEFKTNAME@
@@ -113,6 +114,7 @@ paths.py:
echo 'sbindir = "``$(SERVER_BINDIR)``"' >> $@
echo 'libdir = "``$(KRB5_LIBDIR)``"' >> $@
echo 'localstatedir = "``$(localstatedir)``"' >> $@
+ echo 'runstatedir = "``$(runstatedir)``"' >> $@
echo 'sysconfdir = "``$(sysconfdir)``"' >> $@
echo 'ccache = "``$(DEFCCNAME)``"' >> $@
echo 'keytab = "``$(DEFKTNAME)``"' >> $@
diff --git a/src/include/Makefile.in b/src/include/Makefile.in
index e13042a856..f83ff4eaa7 100644
--- a/src/include/Makefile.in
+++ b/src/include/Makefile.in
@@ -53,6 +53,7 @@ autoconf.stamp: $(srcdir)/autoconf.h.in $(BUILDTOP)/config.status
SYSCONFDIR = @sysconfdir@
LOCALSTATEDIR = @localstatedir@
+RUNSTATEDIR = @runstatedir@
BINDIR = @bindir@
SBINDIR = @sbindir@
LIBDIR = @libdir@
@@ -66,6 +67,7 @@ PROCESS_REPLACE = -e "s+@KRB5RCTMPDIR+$(KRB5RCTMPDIR)+" \
-e "s+@MODULEDIR+$(MODULE_DIR)+" \
-e "s+@GSSMODULEDIR+$(GSS_MODULE_DIR)+" \
-e 's+@LOCALSTATEDIR+$(LOCALSTATEDIR)+' \
+ -e 's+@RUNSTATEDIR+$(RUNSTATEDIR)+' \
-e 's+@SYSCONFDIR+$(SYSCONFDIR)+' \
-e 's+@DYNOBJEXT+$(DYNOBJEXT)+'
diff --git a/src/include/osconf.hin b/src/include/osconf.hin
index 90ab86d129..871503ab1b 100644
--- a/src/include/osconf.hin
+++ b/src/include/osconf.hin
@@ -59,6 +59,7 @@
#define PLUGIN_EXT "@DYNOBJEXT"
#define KDC_DIR "@LOCALSTATEDIR/krb5kdc"
+#define KDC_RUN_DIR "@RUNSTATEDIR/krb5kdc"
#define DEFAULT_KDB_FILE KDC_DIR "/principal"
#define DEFAULT_KEYFILE_STUB KDC_DIR "/.k5."
#define KRB5_DEFAULT_ADMIN_ACL KDC_DIR "/krb5_adm.acl"
diff --git a/src/man/Makefile.in b/src/man/Makefile.in
index 4dd2448814..2b9c8929cc 100644
--- a/src/man/Makefile.in
+++ b/src/man/Makefile.in
@@ -5,6 +5,7 @@ SPHINX_BUILD=sphinx-build
GROFF=@GROFF@
GROFF_MAN=$(GROFF) -mtty-char -Tascii -mandoc -c
localstatedir=@localstatedir@
+runstatedir=@runstatedir@
sysconfdir=@sysconfdir@
DEFCCNAME=@DEFCCNAME@
DEFKTNAME=@DEFKTNAME@
@@ -44,6 +45,7 @@ $(docsrc)/version.py: $(top_srcdir)/patchlevel.h
-e 's|@SBINDIR@|$(SERVER_BINDIR)|g' \
-e 's|@LIBDIR@|$(KRB5_LIBDIR)|g' \
-e 's|@LOCALSTATEDIR@|$(localstatedir)|g' \
+ -e 's|@RUNSTATEDIR@|$(runstatedir)|g' \
-e 's|@SYSCONFDIR@|$(sysconfdir)|g' \
-e 's|@CCNAME@|$(DEFCCNAME)|g' \
-e 's|@KTNAME@|$(DEFKTNAME)|g' \
diff --git a/src/plugins/preauth/otp/otp_state.c b/src/plugins/preauth/otp/otp_state.c
index a4d7e3b5ec..4643dff9a2 100644
--- a/src/plugins/preauth/otp/otp_state.c
+++ b/src/plugins/preauth/otp/otp_state.c
@@ -40,7 +40,7 @@
#endif
#define DEFAULT_TYPE_NAME "DEFAULT"
-#define DEFAULT_SOCKET_FMT KDC_DIR "/%s.socket"
+#define DEFAULT_SOCKET_FMT KDC_RUN_DIR "/%s.socket"
#define DEFAULT_TIMEOUT 5
#define DEFAULT_RETRIES 3
#define MAX_SECRET_LEN 1024