[systemd-devel] [PATCH] build: allow specifying a custom pam session name

Marc-Antoine Perennou Marc-Antoine at Perennou.com
Thu Jul 25 15:28:58 PDT 2013


for distribution now wanting to use "systemd-shared"

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine at Perennou.com>
---
 Makefile.am            |  1 +
 configure.ac           | 10 ++++++++++
 units/user at .service.in |  2 +-
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index d013dfd..8030c5f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4072,6 +4072,7 @@ substitutions = \
        '|udevlibexecdir=$(udevlibexecdir)|' \
        '|SUSHELL=$(SUSHELL)|' \
        '|DEBUGTTY=$(DEBUGTTY)|' \
+       '|PAM_NAME=$(PAM_NAME)|' \
        '|KILL=$(KILL)|' \
        '|KMOD=$(KMOD)|' \
        '|MKDIR_P=$(MKDIR_P)|' \
diff --git a/configure.ac b/configure.ac
index 759073a..c1d2dac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -404,6 +404,15 @@ AC_SUBST(PAM_LIBS)
 AM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
 
 # ------------------------------------------------------------------------------
+AC_ARG_WITH([pam-name],
+        AS_HELP_STRING([--with-pam-name=NAME],
+                [Specify the PAM session name to set up a session as]),
+        [PAM_NAME="$withval"],
+        [PAM_NAME=systemd-shared])
+
+AC_SUBST(PAM_NAME)
+
+# ------------------------------------------------------------------------------
 AC_ARG_ENABLE([acl],
         AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
                 [case "${enableval}" in
@@ -1027,6 +1036,7 @@ AC_MSG_RESULT([
         Installation Python:     ${PYTHON_BINARY}
         firmware path:           ${FIRMWARE_PATH}
         PAM modules dir:         ${with_pamlibdir}
+        PAM session name:        ${with_pam_name}
         D-Bus policy dir:        ${with_dbuspolicydir}
         D-Bus session dir:       ${with_dbussessionservicedir}
         D-Bus system dir:        ${with_dbussystemservicedir}
diff --git a/units/user at .service.in b/units/user at .service.in
index 8f9a3b3..ce53d31 100644
--- a/units/user at .service.in
+++ b/units/user at .service.in
@@ -11,7 +11,7 @@ After=systemd-user-sessions.service
 
 [Service]
 User=%I
-PAMName=systemd-shared
+PAMName=@PAM_NAME@
 Type=notify
 ExecStart=- at rootlibexecdir@/systemd --user
 Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%I/dbus/user_bus_socket
-- 
1.8.3.3



More information about the systemd-devel mailing list