From 4c4a9c7d6a715fc2a081d346858c85998316f72c Mon Sep 17 00:00:00 2001 From: thib Date: Mon, 5 Apr 2010 13:37:27 +0100 Subject: [PATCH] Initialize fcrontab's PAM with runas and not user so as things works fine when user=systab (pseudo-user) --- fcrontab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fcrontab.c b/fcrontab.c index 2e6561d..346362f 100644 --- a/fcrontab.c +++ b/fcrontab.c @@ -1038,8 +1038,8 @@ main(int argc, char **argv) /* Open PAM session for the user and obtain any security credentials we might need */ - debug("username: %s", user); - retcode = pam_start("fcrontab", user, &apamconv, &pamh); + debug("username: %s, runas: %s", user, runas); + retcode = pam_start("fcrontab", runas, &apamconv, &pamh); if (retcode != PAM_SUCCESS) die_pame(pamh, retcode, "Could not start PAM"); retcode = pam_authenticate(pamh, 0); /* is user really user? */ if (retcode != PAM_SUCCESS) -- 2.50.1