]> granicus.if.org Git - cronie/commitdiff
Condtionalize pam functions.
authorMarcela Mašláňová <mmaslano@redhat.com>
Tue, 27 Nov 2012 09:23:41 +0000 (10:23 +0100)
committerMarcela Mašláňová <mmaslano@redhat.com>
Tue, 27 Nov 2012 09:23:41 +0000 (10:23 +0100)
src/crontab.c
src/do_command.c
src/funcs.h

index 2a9b3da894cb1bcfb9a8072d03760b998ae087d4..7eda894ce81afac1ee8925bd5d74be2d705d2772 100644 (file)
@@ -199,7 +199,9 @@ int main(int argc, char *argv[]) {
        default:
                abort();
        }
+#ifdef WITH_PAM
        cron_close_pam();
+#endif
        exit(exitstatus);
  /*NOTREACHED*/}
 
index 20f6116792d1031ed8887c7363ced4a8f4fc4b62..cb3d9e9d17211a93abcb3ec790c9e40aca0a179b 100644 (file)
@@ -72,7 +72,9 @@ void do_command(entry * e, user * u) {
                        _exit(ERROR_EXIT);
                }
                ev = child_process(e, jobenv);
+#ifdef WITH_PAM
                cron_close_pam();
+#endif
                env_free(jobenv);
                Debug(DPROC, ("[%ld] child process done, exiting\n", (long) getpid()));
                _exit(ev);
index efd58fbc4d66dcdeb846a4ae7c5d29991ccc9bea..4d95d220552642444f40f783c32b2948b74f229f 100644 (file)
@@ -121,7 +121,9 @@ void free_security_context( security_context_t *scontext );
 int crontab_security_access(void);
 
 /* PAM */
+#ifdef WITH_PAM
 int cron_start_pam(struct passwd *pw);
 void cron_close_pam(void);
+#endif
 
 #endif /* CRONIE_FUNCS_H */