| @@ -1,21 +1,21 @@ | | | @@ -1,21 +1,21 @@ |
1 | #include "cron.h" | | 1 | #include "cron.h" |
2 | | | 2 | |
3 | #ifdef USE_PAM | | 3 | #ifdef USE_PAM |
4 | | | 4 | |
5 | #include <security/pam_appl.h> | | 5 | #include <security/pam_appl.h> |
6 | | | 6 | |
7 | static pam_handle_t *pamh = NULL; | | 7 | static pam_handle_t *pamh = NULL; |
8 | static const struct pam_conv cron_conv = { 0 }; | | 8 | static const struct pam_conv cron_conv; |
9 | | | 9 | |
10 | int | | 10 | int |
11 | cron_pam_start (const char *username) | | 11 | cron_pam_start (const char *username) |
12 | { | | 12 | { |
13 | int retval; | | 13 | int retval; |
14 | | | 14 | |
15 | if (pamh) | | 15 | if (pamh) |
16 | return 0; | | 16 | return 0; |
17 | | | 17 | |
18 | retval = pam_start ("cron", username, &cron_conv, &pamh); | | 18 | retval = pam_start ("cron", username, &cron_conv, &pamh); |
19 | log_close (); | | 19 | log_close (); |
20 | if (retval != PAM_SUCCESS) | | 20 | if (retval != PAM_SUCCESS) |
21 | { | | 21 | { |