From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/394886-time-rfc822.diff | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 web/attachments/394886-time-rfc822.diff (limited to 'web/attachments/394886-time-rfc822.diff') diff --git a/web/attachments/394886-time-rfc822.diff b/web/attachments/394886-time-rfc822.diff new file mode 100644 index 0000000..e2e0d84 --- /dev/null +++ b/web/attachments/394886-time-rfc822.diff @@ -0,0 +1,25 @@ +--- nagios-plugins-1.4.15/plugins/sslutils.c 2010-07-27 20:47:16.000000000 +0000 ++++ nagios-plugins-1.4.15.new/plugins/sslutils.c 2010-11-30 21:37:29.616606174 +0000 +@@ -102,7 +102,7 @@ + struct tm stamp; + float time_left; + int days_left; +- char timestamp[17] = ""; ++ char timestamp[128] = ""; + + certificate=SSL_get_peer_certificate(s); + if(! certificate){ +@@ -149,10 +149,9 @@ + + time_left = difftime(timegm(&stamp), time(NULL)); + days_left = time_left / 86400; +- snprintf +- (timestamp, 17, "%02d/%02d/%04d %02d:%02d", +- stamp.tm_mon + 1, +- stamp.tm_mday, stamp.tm_year + 1900, stamp.tm_hour, stamp.tm_min); ++ ++ stamp.tm_mon++; ++ strftime (timestamp, sizeof (timestamp), "%a, %d %b %Y %H:%M:%S %z", &stamp); + + if (days_left > 0 && days_left <= days_till_exp) { + printf (_("WARNING - Certificate expires in %d day(s) (%s).\n"), days_left, timestamp); -- cgit v1.2.3-74-g34f1