summaryrefslogtreecommitdiffstats
path: root/sss_client
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-08-05 14:45:14 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-08-11 12:29:34 -0400
commitb3b55f167063417c285524ba35bd9298965b834a (patch)
tree4c918ec839222dd55d0090d03d27b9b932491c57 /sss_client
parent28bbb2ec4c5f29339488f07f63f55e5c6657e9a1 (diff)
downloadsssd-b3b55f167063417c285524ba35bd9298965b834a.tar.gz
sssd-b3b55f167063417c285524ba35bd9298965b834a.tar.xz
sssd-b3b55f167063417c285524ba35bd9298965b834a.zip
Make socket paths a compile-time option
Previously, we had hardcoded the paths for the NSS, PAM and private PAM sockets to /var/lib/sss/pipes. With this patch, we will specify the sockets with --with-pipe-path.
Diffstat (limited to 'sss_client')
-rw-r--r--sss_client/Makefile.am7
-rw-r--r--sss_client/configure.ac19
-rw-r--r--sss_client/sss_cli.h6
3 files changed, 25 insertions, 7 deletions
diff --git a/sss_client/Makefile.am b/sss_client/Makefile.am
index 4552720ed..7333e4c39 100644
--- a/sss_client/Makefile.am
+++ b/sss_client/Makefile.am
@@ -1,9 +1,14 @@
SUBDIRS = po
+pipepath=@pipepath@
+
topdir=.
AM_CPPFLAGS = \
-I$(topdir) \
- -DLOCALEDIR=\"\$(localedir)\"
+ -DLOCALEDIR=\"\$(localedir)\" \
+ -DSSS_NSS_SOCKET_NAME=\"$(pipepath)/nss\" \
+ -DSSS_PAM_SOCKET_NAME=\"$(pipepath)/pam\" \
+ -DSSS_PAM_PRIV_SOCKET_NAME=\"$(pipepath)/private/pam\"
ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS =
diff --git a/sss_client/configure.ac b/sss_client/configure.ac
index 97fc83def..7d443ed2d 100644
--- a/sss_client/configure.ac
+++ b/sss_client/configure.ac
@@ -37,6 +37,25 @@ AC_DEFUN([BUILD_WITH_AUX_INFO],
[Build with -aux-info output])])
])
AM_CONDITIONAL([WANT_AUX_INFO], [test x$with_aux_info = xyes])
+BUILD_WITH_AUX_INFO
+
+AC_DEFUN([WITH_PIPE_PATH],
+ [ AC_ARG_WITH([pipe-path],
+ [AC_HELP_STRING([--with-pipe-path=PATH],
+ [Where to store pipe files for the SSSD interconnects [/var/lib/sss/pipes]]
+ )
+ ]
+ )
+ config_pipepath="\"VARDIR\"/lib/sss/pipes"
+ pipepath="${localstatedir}/lib/sss/pipes"
+ if test x"$with_pipe_path" != x; then
+ config_pipepath=$with_pipe_path
+ pipepath=$with_pipe_path
+ fi
+ AC_SUBST(pipepath)
+ AC_DEFINE_UNQUOTED(PIPE_PATH, "$config_pipepath", [Where to store pipe files for the SSSD interconnects])
+ ])
+WITH_PIPE_PATH
AC_CONFIG_FILES([Makefile po/Makefile.in])
AC_OUTPUT
diff --git a/sss_client/sss_cli.h b/sss_client/sss_cli.h
index 63daf7bca..f1ccba9f2 100644
--- a/sss_client/sss_cli.h
+++ b/sss_client/sss_cli.h
@@ -15,12 +15,6 @@
#include <pwd.h>
#include <grp.h>
-/* SELinux will have a better way to regulate access if they are seprate
- * Also a change in one of the pipes will not affect the others */
-#define SSS_NSS_SOCKET_NAME "/var/lib/sss/pipes/nss"
-#define SSS_PAM_SOCKET_NAME "/var/lib/sss/pipes/pam"
-#define SSS_PAM_PRIV_SOCKET_NAME "/var/lib/sss/pipes/private/pam"
-
#define SSS_NSS_PROTOCOL_VERSION 1
#define SSS_PAM_PROTOCOL_VERSION 2