summaryrefslogtreecommitdiffstats
path: root/src/conf_macros.m4
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2014-10-01 14:47:09 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-10-07 13:48:05 +0200
commit3af0e875791779fbf3a300f5eb376b6a731d5729 (patch)
tree6560be94fd02d3902d38bde43cfde779027728ca /src/conf_macros.m4
parent934cb3541ccf22f3334b8f5f5768a23bf8ea1d52 (diff)
downloadsssd-3af0e875791779fbf3a300f5eb376b6a731d5729.tar.gz
sssd-3af0e875791779fbf3a300f5eb376b6a731d5729.tar.xz
sssd-3af0e875791779fbf3a300f5eb376b6a731d5729.zip
BUILD: Add a config option for sssd user, own private directories as the user
Adds two new configure-time options that let you select the user to run SSSD as. The default is 'root' for backwards compatibility. The directories the deamon stores its private data at are also created as owned by this user during install time.
Diffstat (limited to 'src/conf_macros.m4')
-rw-r--r--src/conf_macros.m434
1 files changed, 34 insertions, 0 deletions
diff --git a/src/conf_macros.m4 b/src/conf_macros.m4
index 4aa58138c..0ab929acc 100644
--- a/src/conf_macros.m4
+++ b/src/conf_macros.m4
@@ -737,3 +737,37 @@ AC_DEFUN([WITH_NFS_LIB_PATH],
fi
AC_SUBST(nfslibpath)
])
+
+AC_DEFUN([WITH_SSSD_USER],
+ [ AC_ARG_WITH([sssd-user],
+ [AS_HELP_STRING([--with-sssd-user=<user>],
+ [User for running SSSD (root)]
+ )
+ ]
+ )
+
+ AC_ARG_WITH([sssd-group],
+ [AS_HELP_STRING([--with-sssd-group=<group>],
+ [Group for running SSSD (root)]
+ )
+ ]
+ )
+
+ SSSD_USER=root
+ SSSD_GROUP=root
+
+ if test x"$with_sssd_user" != x; then
+ SSSD_USER=$with_sssd_user
+ if test -z "$with_sssd_group"; then
+ SSSD_GROUP=$with_sssd_user
+ else
+ SSSD_GROUP=$with_sssd_group
+ fi
+ fi
+
+ AC_SUBST(SSSD_USER)
+ AC_SUBST(SSSD_GROUP)
+ AC_DEFINE_UNQUOTED(SSSD_USER, "$SSSD_USER", ["The default user to run SSSD as"])
+ AC_DEFINE_UNQUOTED(SSSD_GROUP, "$SSSD_GROUP", ["The default group to run SSSD as"])
+ AM_CONDITIONAL([SSSD_USER], [test x"$with_sssd_user" != x])
+ ])