]> granicus.if.org Git - fcron/commitdiff
Initialize fcrontab's PAM with runas and not user so as things works fine when user...
authorthib <thib@berseker.(none)>
Mon, 5 Apr 2010 12:37:27 +0000 (13:37 +0100)
committerthib <thib@berseker.(none)>
Mon, 5 Apr 2010 12:37:27 +0000 (13:37 +0100)
fcrontab.c

index 2e6561d1d98b367c280d842357bb07735a5cc32f..346362f4093f66935473b36b65a84260fac50899 100644 (file)
@@ -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)