]> granicus.if.org Git - cronie/commitdiff
Added missing #ifdef WITH_PAM.
authormmaslano <mmaslano@redhat.com>
Mon, 27 Aug 2007 12:46:32 +0000 (14:46 +0200)
committerTomas Janousek <tomi@nomi.cz>
Mon, 27 Aug 2007 16:19:51 +0000 (18:19 +0200)
src/security.c

index e83010efd240f3ab4d3a3c55b5a57c534dede027..7530bbc4561d87118660c69e581b1fac4a1ca5d8 100644 (file)
@@ -58,10 +58,13 @@ int cron_set_job_security_context(entry *e, user *u, char ***jobenv) {
                Debug(DSCH, ("Minute-ly job. Recording time %lu\n", minutely_time))
     }
 
+#ifdef WITH_PAM
     if (cron_start_pam(e->pwd) != 0) {
                syslog(LOG_INFO, "CRON (%s): failed to open PAM security session: %s", e->pwd->pw_name, pam_strerror(pamh,cron_start_pam(e->pwd)));
                return -1;
     }
+#endif
+
     *jobenv = build_env( e->envp );
 
 #ifdef WITH_SELINUX