Move function completely within #ifdef just like all the code where this
function is used.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
return 0;
}
+#if defined(WITH_PAM)
int cron_start_pam(struct passwd *pw) {
int retcode = 0;
-#if defined(WITH_PAM)
retcode = pam_start("crond", pw->pw_name, &conv, &pamh);
PAM_FAIL_CHECK;
retcode = pam_set_item(pamh, PAM_TTY, "cron");
PAM_FAIL_CHECK;
retcode = pam_setcred(pamh, PAM_ESTABLISH_CRED | PAM_SILENT);
PAM_FAIL_CHECK;
-#endif
return retcode;
}
+#endif
#if defined(WITH_PAM)
static int cron_open_pam_session(struct passwd *pw) {