[Git][NTPsec/ntpsec][master] 2 commits: Fix logfile date stamps in Classic compatibility mode.

Eric S. Raymond gitlab at mg.gitlab.com
Tue Aug 23 10:41:15 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
7e084196 by Eric S. Raymond at 2016-08-23T06:40:37-04:00
Fix logfile date stamps in Classic compatibility mode.

- - - - -
9064ed09 by Eric S. Raymond at 2016-08-23T06:40:37-04:00
Documentation polishing.

- - - - -


3 changed files:

- docs/index.txt
- include/ntp_calendar.h
- libntp/humandate.c


Changes:

=====================================
docs/index.txt
=====================================
--- a/docs/index.txt
+++ b/docs/index.txt
@@ -89,8 +89,9 @@ few will be user-visible.
 
 === Security changes ===
 
-* The deprecated ntpdc utility, long since replaced by {ntpq} and a
-  chronic locus of security vulnerabilities, has been removed.
+* The deprecated ntpdc utility, long a chronic locus of security
+  vulnerabilities, has been removed.  Its function has been merged
+  into +{ntpq}+.
 
 * As noted above, Autokey is not supported; that code has been
   removed, as it was chronically prone to security vulnerabilties.


=====================================
include/ntp_calendar.h
=====================================
--- a/include/ntp_calendar.h
+++ b/include/ntp_calendar.h
@@ -105,9 +105,6 @@ extern systime_func_ptr ntpcal_set_timefunc(systime_func_ptr);
 			+ ((val)<<4) + ((val)<<2) + (val))	/* *big* hack */
 
 
-extern	const char * const months[12];
-extern	const char * const daynames[7];
-
 extern	void	 calgregorian	(uint32_t, struct calendar *);
 extern	uint32_t caltontp	(const struct calendar *);
 


=====================================
libntp/humandate.c
=====================================
--- a/libntp/humandate.c
+++ b/libntp/humandate.c
@@ -28,6 +28,11 @@ humanlogtime(void)
 	LIB_GETBUF(bp);
 
 #ifdef ENABLE_CLASSIC_MODE
+	const char * const months[12] = {
+	    "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+	    "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
+	};
+
 	snprintf(bp, LIB_BUFLENGTH, "%2d %s %02d:%02d:%02d",
 		 tm->tm_mday, months[tm->tm_mon],
 		 tm->tm_hour, tm->tm_min, tm->tm_sec);



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/f80d098124f06b727f27ccf27629f12877330924...9064ed09c5709a0c7921b2d6ecc6115f3289d177
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160823/b89a5133/attachment.html>


More information about the vc mailing list