Sun Jun 11 20:38:17 2017 UTC ()
Do not partially initialize a static variable.


(joerg)
diff -r1.1 -r1.2 src/external/bsd/cron/dist/pam_auth.c

cvs diff -r1.1 -r1.2 src/external/bsd/cron/dist/pam_auth.c (expand / switch to unified diff)

--- src/external/bsd/cron/dist/pam_auth.c 2017/06/09 17:36:30 1.1
+++ src/external/bsd/cron/dist/pam_auth.c 2017/06/11 20:38:17 1.2
@@ -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
7static pam_handle_t *pamh = NULL; 7static pam_handle_t *pamh = NULL;
8static const struct pam_conv cron_conv = { 0 }; 8static const struct pam_conv cron_conv;
9 9
10int 10int
11cron_pam_start (const char *username) 11cron_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 {