From 3b5a8b331e81ecd9a9362553c16f4527291d5528 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Fri, 13 May 2016 12:05:23 -0500 Subject: supervise-daemon: add pam service file --- src/rc/Makefile | 1 + src/rc/supervise-daemon.c | 2 +- src/rc/supervise-daemon.pam | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 src/rc/supervise-daemon.pam 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 -- cgit v1.2.3