aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2016-05-13 12:05:23 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2016-05-13 12:05:23 -0500
commit3b5a8b331e81ecd9a9362553c16f4527291d5528 (patch)
treeb07b349da7a31a83463f75829d00d0b77a2e4a98 /src
parentb3a04e797e5e459842c2c239886ab6ea08a8dc29 (diff)
supervise-daemon: add pam service file
Diffstat (limited to 'src')
-rw-r--r--src/rc/Makefile1
-rw-r--r--src/rc/supervise-daemon.c2
-rw-r--r--src/rc/supervise-daemon.pam6
3 files changed, 8 insertions, 1 deletions
diff --git a/src/rc/Makefile b/src/rc/Makefile
index d4759e76..74d74a08 100644
--- a/src/rc/Makefile
+++ b/src/rc/Makefile
@@ -75,6 +75,7 @@ install: all
if test "${MKPAM}" = pam; then \
${INSTALL} -d ${DESTDIR}${PAMDIR}; \
${INSTALL} -m ${PAMMODE} start-stop-daemon.pam ${DESTDIR}${PAMDIR}/start-stop-daemon; \
+ ${INSTALL} -m ${PAMMODE} supervise-daemon.pam ${DESTDIR}${PAMDIR}/supervise-daemon; \
fi
check test::
diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c
index 6bb75f3d..2d8287fd 100644
--- a/src/rc/supervise-daemon.c
+++ b/src/rc/supervise-daemon.c
@@ -202,7 +202,7 @@ static void child_process(char *exec, char **argv)
#ifdef HAVE_PAM
if (changeuser != NULL) {
- pamr = pam_start("start-stop-daemon",
+ pamr = pam_start("supervise-daemon",
changeuser, &conv, &pamh);
if (pamr == PAM_SUCCESS)
diff --git a/src/rc/supervise-daemon.pam b/src/rc/supervise-daemon.pam
new file mode 100644
index 00000000..a1bada22
--- /dev/null
+++ b/src/rc/supervise-daemon.pam
@@ -0,0 +1,6 @@
+#%PAM-1.0
+
+auth required pam_permit.so
+account required pam_permit.so
+password required pam_deny.so
+session optional pam_limits.so