From: thib Date: Mon, 5 Apr 2010 12:37:27 +0000 (+0100) Subject: Initialize fcrontab's PAM with runas and not user so as things works fine when user... X-Git-Tag: ver3_0_6~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c4a9c7d6a715fc2a081d346858c85998316f72c;p=fcron Initialize fcrontab's PAM with runas and not user so as things works fine when user=systab (pseudo-user) --- 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)