Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/ntp (4.2.8p10-win-beta1) 2017/03/21 Released by...



details:   https://anonhg.NetBSD.org/src/rev/a61964cfa014
branches:  trunk
changeset: 823147:a61964cfa014
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Apr 13 20:17:41 2017 +0000

description:
(4.2.8p10-win-beta1) 2017/03/21 Released by Harlan Stenn <stenn%ntp.org@localhost>
(4.2.8p10)

* [Sec 3389] NTP-01-016: Denial of Service via Malformed Config
  (Pentest report 01.2017) <perlinger%ntp.org@localhost>
* [Sec 3388] NTP-01-014: Buffer Overflow in DPTS Clock
  (Pentest report 01.2017) <perlinger%ntp.org@localhost>
* [Sec 3387] NTP-01-012: Authenticated DoS via Malicious Config Option
  (Pentest report 01.2017) <perlinger%ntp.org@localhost>
* [Sec 3386] NTP-01-011: ntpq_stripquotes() returns incorrect Value
  (Pentest report 01.2017) <perlinger%ntp.org@localhost>
* [Sec 3385] NTP-01-010: ereallocarray()/eallocarray() underused. HStenn
* [Sec 3384] NTP-01-009: Privileged execution of User Library code
  (Pentest report 01.2017) <perlinger%ntp.org@localhost>
* [Sec 3383] NTP-01-008: Stack Buffer Overflow from Command Line
  (Pentest report 01.2017) <perlinger%ntp.org@localhost>
* [Sec 3382] NTP-01-007: Data Structure terminated insufficiently
  (Pentest report 01.2017) <perlinger%ntp.org@localhost>
* [Sec 3380] NTP-01-005: Off-by-one in Oncore GPS Receiver
  (Pentest report 01.2017) <perlinger%ntp.org@localhost>
* [Sec 3379] NTP-01-004: Potential Overflows in ctl_put() functions
  (Pentest report 01.2017) <perlinger%ntp.org@localhost>
* [Sec 3378] NTP-01-003: Improper use of snprintf() in mx4200_send()
  (Pentest report 01.2017) <perlinger%ntp.org@localhost>
* [Sec 3377] NTP-01-002: Buffer Overflow in ntpq when fetching reslist
  (Pentest report 01.2017) <perlinger%ntp.org@localhost
* [Sec 3376] Support build "hardening" flags.  stenn%ntp.org@localhost
* [Sec 3361] 0rigin (zero origin) DoS.  HStenn.
* [Bug 3393] clang scan-build findings <perlinger%ntp.org@localhost>
* [Bug 3363] Support for openssl-1.1.0 without compatibility modes
  - rework of patch set from <ntp.org%eroen.eu@localhost>. <perlinger%ntp.org@localhost>
* [Bug 3356] Bugfix 3072 breaks multicastclient <perlinger%ntp.org@localhost>
* [Bug 3216] libntp audio ioctl() args incorrectly cast to int
  on 4.4BSD-Lite derived platforms <perlinger%ntp.org@localhost>
  - original patch by Majdi S. Abbas
* [Bug 3215] 'make distcheck' fails with new BK repo format <perlinger%ntp.org@localhost>
* [Bug 3173] forking async worker: interrupted pipe I/O <perlinger%ntp.org@localhost>
  - initial patch by Christos Zoulas
* [Bug 3139] (...) time_pps_create: Exec format error <perlinger%ntp.org@localhost>
  - move loader API from 'inline' to proper source
  - augment pathless dlls with absolute path to NTPD
  - use 'msyslog()' instead of 'printf() 'for reporting trouble
* [Bug 3107] Incorrect Logic for Peer Event Limiting <perlinger%ntp.org@localhost>
  - applied patch by Matthew Van Gundy
* [Bug 3065] Quiet warnings on NetBSD <perlinger%ntp.org@localhost>
  - applied some of the patches provided by Havard. Not all of them
    still match the current code base, and I did not touch libopt.
* [Bug 3062] Change the process name of forked DNS worker <perlinger%ntp.org@localhost>
  - applied patch by Reinhard Max. See bugzilla for limitations.
* [Bug 2923] Trap Configuration Fail <perlinger%ntp.org@localhost>
  - fixed dependency inversion from [Bug 2837]
* [Bug 2896] Nothing happens if minsane < maxclock < minclock
  - produce ERROR log message about dysfunctional daemon. <perlinger%ntp.org@localhost>
* [Bug 2851] allow -4/-6 on restrict line with mask <perlinger%ntp.org@localhost>
  - applied patch by Miroslav Lichvar for ntp4.2.6 compat
* [Bug 2645] out-of-bound pointers in ctl_putsys and decode_bitflags
  - Fixed these and some more locations of this pattern.
    Probably din't get them all, though. <perlinger%ntp.org@localhost>
* Update copyright year.
* bk-7 trigger updates

diffstat:

 external/bsd/ntp/dist/include/ntp_crypto.h             |    3 +-
 external/bsd/ntp/dist/include/ntp_fp.h                 |    4 +-
 external/bsd/ntp/dist/include/ntp_md5.h                |    8 +-
 external/bsd/ntp/dist/include/ntp_stdlib.h             |   22 +-
 external/bsd/ntp/dist/include/ntpd.h                   |    7 +-
 external/bsd/ntp/dist/include/ssl_applink.c            |   32 +-
 external/bsd/ntp/dist/lib/isc/inet_pton.c              |    8 +-
 external/bsd/ntp/dist/libntp/a_md5encrypt.c            |    3 +-
 external/bsd/ntp/dist/libntp/audio.c                   |   38 +-
 external/bsd/ntp/dist/libntp/authkeys.c                |    4 +-
 external/bsd/ntp/dist/libntp/emalloc.c                 |   11 +-
 external/bsd/ntp/dist/libntp/ntp_intres.c              |    4 +-
 external/bsd/ntp/dist/libntp/recvbuff.c                |    4 +-
 external/bsd/ntp/dist/libntp/ssl_init.c                |   57 +-
 external/bsd/ntp/dist/libntp/statestr.c                |   11 +-
 external/bsd/ntp/dist/libntp/work_fork.c               |  179 +++---
 external/bsd/ntp/dist/libparse/clk_trimtsip.c          |   10 +-
 external/bsd/ntp/dist/libparse/gpstolfp.c              |    7 +-
 external/bsd/ntp/dist/ntpd/ntp_config.c                |  232 ++++--
 external/bsd/ntp/dist/ntpd/ntp_control.c               |  305 +++------
 external/bsd/ntp/dist/ntpd/ntp_crypto.c                |   21 +-
 external/bsd/ntp/dist/ntpd/ntp_io.c                    |   23 +-
 external/bsd/ntp/dist/ntpd/ntp_loopfilter.c            |    5 +-
 external/bsd/ntp/dist/ntpd/ntp_parser.y                |   12 +-
 external/bsd/ntp/dist/ntpd/ntp_peer.c                  |    7 +-
 external/bsd/ntp/dist/ntpd/ntp_proto.c                 |   31 +-
 external/bsd/ntp/dist/ntpd/ntp_restrict.c              |    6 +-
 external/bsd/ntp/dist/ntpd/ntp_scanner.c               |    3 +-
 external/bsd/ntp/dist/ntpd/ntpd-opts.c                 |  498 ++++++++--------
 external/bsd/ntp/dist/ntpd/ntpd-opts.h                 |   10 +-
 external/bsd/ntp/dist/ntpd/ntpd.c                      |    4 +-
 external/bsd/ntp/dist/ntpd/refclock_datum.c            |   20 +-
 external/bsd/ntp/dist/ntpd/refclock_gpsdjson.c         |   16 +-
 external/bsd/ntp/dist/ntpd/refclock_jjy.c              |    8 +-
 external/bsd/ntp/dist/ntpd/refclock_mx4200.c           |   36 +-
 external/bsd/ntp/dist/ntpd/refclock_nmea.c             |    5 +-
 external/bsd/ntp/dist/ntpd/refclock_oncore.c           |   10 +-
 external/bsd/ntp/dist/ntpd/refclock_parse.c            |   34 +-
 external/bsd/ntp/dist/ntpdate/ntpdate.c                |    4 +-
 external/bsd/ntp/dist/ntpdc/ntpdc-opts.c               |  222 +++---
 external/bsd/ntp/dist/ntpdc/ntpdc-opts.h               |   10 +-
 external/bsd/ntp/dist/ntpdc/ntpdc.c                    |    4 +-
 external/bsd/ntp/dist/ntpdc/ntpdc_ops.c                |    4 +-
 external/bsd/ntp/dist/ntpq/libntpq.c                   |   71 +-
 external/bsd/ntp/dist/ntpq/ntpq-opts.c                 |  236 ++++----
 external/bsd/ntp/dist/ntpq/ntpq-opts.h                 |   10 +-
 external/bsd/ntp/dist/ntpq/ntpq-subs.c                 |    8 +-
 external/bsd/ntp/dist/ntpq/ntpq.c                      |   72 +-
 external/bsd/ntp/dist/ntpsnmpd/ntpsnmpd-opts.c         |  144 ++--
 external/bsd/ntp/dist/ntpsnmpd/ntpsnmpd-opts.h         |   10 +-
 external/bsd/ntp/dist/sntp/crypto.c                    |    4 +-
 external/bsd/ntp/dist/sntp/kod_management.c            |    6 +-
 external/bsd/ntp/dist/sntp/libevent/test/regress_ssl.c |   24 +-
 external/bsd/ntp/dist/sntp/sntp-opts.c                 |  326 +++++-----
 external/bsd/ntp/dist/sntp/sntp-opts.h                 |   10 +-
 external/bsd/ntp/dist/util/ntp-keygen-opts.c           |  354 ++++++------
 external/bsd/ntp/dist/util/ntp-keygen-opts.h           |   10 +-
 external/bsd/ntp/dist/util/ntp-keygen.c                |   24 +-
 external/bsd/ntp/importdate                            |    2 +-
 external/bsd/ntp/scripts/mkver                         |    2 +-
 60 files changed, 1689 insertions(+), 1566 deletions(-)

diffs (truncated from 6491 to 300 lines):

diff -r f8c494b04719 -r a61964cfa014 external/bsd/ntp/dist/include/ntp_crypto.h
--- a/external/bsd/ntp/dist/include/ntp_crypto.h        Thu Apr 13 19:54:22 2017 +0000
+++ b/external/bsd/ntp/dist/include/ntp_crypto.h        Thu Apr 13 20:17:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ntp_crypto.h,v 1.4 2016/01/08 21:35:35 christos Exp $  */
+/*     $NetBSD: ntp_crypto.h,v 1.5 2017/04/13 20:17:41 christos Exp $  */
 
 /*
  * ntp_crypto.h - definitions for cryptographic operations
@@ -26,6 +26,7 @@
 invalidsyntax: AUTOKEY should be defined only if OPENSSL is.
 #endif
 
+#include "openssl/bn.h"
 #include "openssl/evp.h"
 #include "ntp_calendar.h"      /* for fields in the cert_info structure */
 
diff -r f8c494b04719 -r a61964cfa014 external/bsd/ntp/dist/include/ntp_fp.h
--- a/external/bsd/ntp/dist/include/ntp_fp.h    Thu Apr 13 19:54:22 2017 +0000
+++ b/external/bsd/ntp/dist/include/ntp_fp.h    Thu Apr 13 20:17:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ntp_fp.h,v 1.8 2016/01/08 21:35:35 christos Exp $      */
+/*     $NetBSD: ntp_fp.h,v 1.9 2017/04/13 20:17:41 christos Exp $      */
 
 /*
  * ntp_fp.h - definitions for NTP fixed/floating-point arithmetic
@@ -354,7 +354,7 @@
 extern char *  fptoa           (s_fp, short);
 extern char *  fptoms          (s_fp, short);
 extern int     hextolfp        (const char *, l_fp *);
-extern  void   gpstolfp        (int, int, unsigned long, l_fp *);
+extern  void   gpstolfp        (u_int, u_int, unsigned long, l_fp *);
 extern int     mstolfp         (const char *, l_fp *);
 extern char *  prettydate      (l_fp *);
 extern char *  gmprettydate    (l_fp *);
diff -r f8c494b04719 -r a61964cfa014 external/bsd/ntp/dist/include/ntp_md5.h
--- a/external/bsd/ntp/dist/include/ntp_md5.h   Thu Apr 13 19:54:22 2017 +0000
+++ b/external/bsd/ntp/dist/include/ntp_md5.h   Thu Apr 13 20:17:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ntp_md5.h,v 1.6 2016/06/29 18:42:17 christos Exp $     */
+/*     $NetBSD: ntp_md5.h,v 1.7 2017/04/13 20:17:41 christos Exp $     */
 
 /*
  * ntp_md5.h: deal with md5.h headers
@@ -10,6 +10,7 @@
 
 #ifdef OPENSSL
 # include "openssl/evp.h"
+# include "libssl_compat.h"
 #else  /* !OPENSSL follows */
 /*
  * Provide OpenSSL-alike MD5 API if we're not using OpenSSL
@@ -25,7 +26,10 @@
 # endif
 
   typedef MD5_CTX                      EVP_MD_CTX;
-# define EVP_get_digestbynid(t)                ((t) ? NULL : NULL)
+
+# define EVP_MD_CTX_free(c)            free(c)
+# define EVP_MD_CTX_new()              calloc(1, sizeof(MD5_CTX))
+# define EVP_get_digestbynid(t)                NULL
 # define EVP_md5()                     NULL
 # define EVP_MD_CTX_init(c)
 # define EVP_MD_CTX_set_flags(c, f)
diff -r f8c494b04719 -r a61964cfa014 external/bsd/ntp/dist/include/ntp_stdlib.h
--- a/external/bsd/ntp/dist/include/ntp_stdlib.h        Thu Apr 13 19:54:22 2017 +0000
+++ b/external/bsd/ntp/dist/include/ntp_stdlib.h        Thu Apr 13 20:17:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ntp_stdlib.h,v 1.13 2016/05/01 23:32:00 christos Exp $ */
+/*     $NetBSD: ntp_stdlib.h,v 1.14 2017/04/13 20:17:41 christos Exp $ */
 
 /*
  * ntp_stdlib.h - Prototypes for NTP lib.
@@ -109,21 +109,23 @@
 /* emalloc.c */
 #ifndef EREALLOC_CALLSITE      /* ntp_malloc.h defines */
 extern void *  ereallocz       (void *, size_t, size_t, int);
-extern void *  oreallocarray   (void *optr, size_t nmemb, size_t size);
+extern void *  oreallocarrayxz (void *optr, size_t nmemb, size_t size, size_t extra);
 #define        erealloczsite(p, n, o, z, f, l) ereallocz((p), (n), (o), (z))
 #define        emalloc(n)              ereallocz(NULL, (n), 0, FALSE)
 #define        emalloc_zero(c)         ereallocz(NULL, (c), 0, TRUE)
 #define        erealloc(p, c)          ereallocz((p), (c), 0, FALSE)
 #define erealloc_zero(p, n, o) ereallocz((p), (n), (o), TRUE)
-#define ereallocarray(p, n, s) oreallocarray((p), (n), (s))
-#define eallocarray(n, s)      oreallocarray(NULL, (n), (s))
+#define ereallocarray(p, n, s) oreallocarrayxz((p), (n), (s), 0)
+#define eallocarray(n, s)      oreallocarrayxz(NULL, (n), (s), 0)
+#define ereallocarrayxz(p, n, s, x)    oreallocarrayxz((p), (n), (s), (x))
+#define eallocarrayxz(n, s, x) oreallocarrayxz(NULL, (n), (s), (x))
 extern char *  estrdup_impl(const char *);
 #define        estrdup(s)              estrdup_impl(s)
 #else
 extern void *  ereallocz       (void *, size_t, size_t, int,
                                 const char *, int);
-extern void *  oreallocarray   (void *optr, size_t nmemb, size_t size,
-                                const char *, int);
+extern void *  oreallocarrayxz (void *optr, size_t nmemb, size_t size,
+                                size_t extra, const char *, int);
 #define erealloczsite          ereallocz
 #define        emalloc(c)              ereallocz(NULL, (c), 0, FALSE, \
                                          __FILE__, __LINE__)
@@ -133,9 +135,13 @@
                                          __FILE__, __LINE__)
 #define        erealloc_zero(p, n, o)  ereallocz((p), (n), (o), TRUE, \
                                          __FILE__, __LINE__)
-#define ereallocarray(p, n, s) oreallocarray((p), (n), (s), \
+#define ereallocarray(p, n, s) oreallocarrayxz((p), (n), (s), 0, \
+                                         __FILE__, __LINE__)
+#define eallocarray(n, s)      oreallocarrayxz(NULL, (n), (s), 0, \
                                          __FILE__, __LINE__)
-#define eallocarray(n, s)      oreallocarray(NULL, (n), (s), \
+#define ereallocarrayxz(p, n, s, x)    oreallocarrayxz((p), (n), (s), (x), \
+                                         __FILE__, __LINE__)
+#define eallocarrayxz(n, s, x) oreallocarrayxz(NULL, (n), (s), (x), \
                                          __FILE__, __LINE__)
 extern char *  estrdup_impl(const char *, const char *, int);
 #define        estrdup(s) estrdup_impl((s), __FILE__, __LINE__)
diff -r f8c494b04719 -r a61964cfa014 external/bsd/ntp/dist/include/ntpd.h
--- a/external/bsd/ntp/dist/include/ntpd.h      Thu Apr 13 19:54:22 2017 +0000
+++ b/external/bsd/ntp/dist/include/ntpd.h      Thu Apr 13 20:17:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ntpd.h,v 1.9 2016/11/22 03:09:30 christos Exp $        */
+/*     $NetBSD: ntpd.h,v 1.10 2017/04/13 20:17:41 christos Exp $       */
 
 /*
  * ntpd.h - Prototypes and external variables for ntpd.
@@ -323,6 +323,8 @@
 
 /* ntp_config.c */
 extern char const *    progname;
+extern int saved_argc;
+extern char **saved_argv;
 extern char    *sys_phone[];           /* ACTS phone numbers */
 #if defined(HAVE_SCHED_SETSCHEDULER)
 extern int     config_priority_override;
@@ -489,12 +491,13 @@
 extern u_long  sys_epoch;              /* last clock update time */
 extern keyid_t sys_private;            /* private value for session seed */
 extern int     sys_manycastserver;     /* respond to manycast client pkts */
+extern int     sys_maxclock;           /* maximum survivors */
 extern int     sys_minclock;           /* minimum survivors */
 extern int     sys_minsane;            /* minimum candidates */
 extern int     sys_floor;              /* cluster stratum floor */
 extern int     sys_ceiling;            /* cluster stratum ceiling */
 extern u_char  sys_ttl[MAX_TTL];       /* ttl mapping vector */
-extern int     sys_ttlmax;             /* max ttl mapping vector index */
+extern u_int   sys_ttlmax;             /* max ttl mapping vector index */
 
 /*
  * Statistics counters
diff -r f8c494b04719 -r a61964cfa014 external/bsd/ntp/dist/include/ssl_applink.c
--- a/external/bsd/ntp/dist/include/ssl_applink.c       Thu Apr 13 19:54:22 2017 +0000
+++ b/external/bsd/ntp/dist/include/ssl_applink.c       Thu Apr 13 20:17:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ssl_applink.c,v 1.4 2016/01/08 21:35:35 christos Exp $ */
+/*     $NetBSD: ssl_applink.c,v 1.5 2017/04/13 20:17:41 christos Exp $ */
 
 /*
  * include/ssl_applink.c -- common NTP code for openssl/applink.c
@@ -12,8 +12,13 @@
 # ifdef _MSC_VER
 #  pragma warning(push)
 #  pragma warning(disable: 4152)
+#  ifndef OPENSSL_NO_AUTOLINK
+#   include "msvc_ssl_autolib.h"
+#  endif
 # endif
-# include <openssl/applink.c>
+# if OPENSSL_VERSION_NUMBER < 0x10100000L
+#  include <openssl/applink.c>
+# endif
 # ifdef _MSC_VER
 #  pragma warning(pop)
 # endif
@@ -27,20 +32,30 @@
 void *wrap_dbg_malloc(size_t s, const char *f, int l);
 void *wrap_dbg_realloc(void *p, size_t s, const char *f, int l);
 void wrap_dbg_free(void *p);
+void wrap_dbg_free_ex(void *p, const char *f, int l);
 #endif
 
 
 #if defined(OPENSSL) && defined(SYS_WINNT)
+
 void ssl_applink(void);
 
 void
 ssl_applink(void)
 {
-#ifdef WRAP_DBG_MALLOC
-       CRYPTO_set_mem_ex_functions(wrap_dbg_malloc, wrap_dbg_realloc, wrap_dbg_free);
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#   ifdef WRAP_DBG_MALLOC
+       CRYPTO_set_mem_functions(wrap_dbg_malloc, wrap_dbg_realloc, wrap_dbg_free_ex);
+#   else
+       OPENSSL_malloc_init();
+#   endif
 #else
+#   ifdef WRAP_DBG_MALLOC
+       CRYPTO_set_mem_ex_functions(wrap_dbg_malloc, wrap_dbg_realloc, wrap_dbg_free);
+#   else
        CRYPTO_malloc_init();
-#endif
+#   endif
+#endif /* OpenSSL version cascade */
 }
 #else  /* !OPENSSL || !SYS_WINNT */
 #define ssl_applink()  do {} while (0)
@@ -73,4 +88,11 @@
 {
        _free_dbg(p, _NORMAL_BLOCK);
 }
+
+void wrap_dbg_free_ex(void *p, const char *f, int l)
+{
+       (void)f;
+       (void)l;
+       _free_dbg(p, _NORMAL_BLOCK);
+}
 #endif /* WRAP_DBG_MALLOC */
diff -r f8c494b04719 -r a61964cfa014 external/bsd/ntp/dist/lib/isc/inet_pton.c
--- a/external/bsd/ntp/dist/lib/isc/inet_pton.c Thu Apr 13 19:54:22 2017 +0000
+++ b/external/bsd/ntp/dist/lib/isc/inet_pton.c Thu Apr 13 20:17:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: inet_pton.c,v 1.7 2016/01/08 21:35:36 christos Exp $   */
+/*     $NetBSD: inet_pton.c,v 1.8 2017/04/13 20:17:41 christos Exp $   */
 
 /*
  * Copyright (C) 2004, 2005, 2007  Internet Systems Consortium, Inc. ("ISC")
@@ -173,7 +173,7 @@
                                colonp = tp;
                                continue;
                        }
-                       if (tp + NS_INT16SZ > endp)
+                       if (NS_INT16SZ > endp - tp)
                                return (0);
                        *tp++ = (unsigned char) (val >> 8) & 0xff;
                        *tp++ = (unsigned char) val & 0xff;
@@ -181,7 +181,7 @@
                        val = 0;
                        continue;
                }
-               if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) &&
+               if (ch == '.' && (NS_INADDRSZ <= endp - tp) &&
                    inet_pton4(curtok, tp) > 0) {
                        tp += NS_INADDRSZ;
                        seen_xdigits = 0;
@@ -190,7 +190,7 @@
                return (0);
        }
        if (seen_xdigits) {
-               if (tp + NS_INT16SZ > endp)
+               if (NS_INT16SZ > endp - tp)
                        return (0);
                *tp++ = (unsigned char) (val >> 8) & 0xff;
                *tp++ = (unsigned char) val & 0xff;
diff -r f8c494b04719 -r a61964cfa014 external/bsd/ntp/dist/libntp/a_md5encrypt.c
--- a/external/bsd/ntp/dist/libntp/a_md5encrypt.c       Thu Apr 13 19:54:22 2017 +0000
+++ b/external/bsd/ntp/dist/libntp/a_md5encrypt.c       Thu Apr 13 20:17:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: a_md5encrypt.c,v 1.7 2016/11/22 03:09:30 christos Exp $        */
+/*     $NetBSD: a_md5encrypt.c,v 1.8 2017/04/13 20:17:41 christos Exp $        */
 
 /*
  *     digest support for NTP, MD5 and with OpenSSL more
@@ -13,7 +13,6 @@
 #include "ntp.h"
 #include "ntp_md5.h"   /* provides OpenSSL digest API */
 #include "isc/string.h"
-#include "libssl_compat.h"
 /*
  * MD5authencrypt - generate message digest
  *
diff -r f8c494b04719 -r a61964cfa014 external/bsd/ntp/dist/libntp/audio.c
--- a/external/bsd/ntp/dist/libntp/audio.c      Thu Apr 13 19:54:22 2017 +0000
+++ b/external/bsd/ntp/dist/libntp/audio.c      Thu Apr 13 20:17:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.11 2016/11/22 03:09:30 christos Exp $      */
+/*     $NetBSD: audio.c,v 1.12 2017/04/13 20:17:42 christos Exp $      */
 
 /*
  * audio.c - audio interface for reference clock audio drivers
@@ -48,6 +48,19 @@
 # include <ctype.h>
 #endif
 
+
+/* 
+ * 4.4BSD-Lite switched to an unsigned long ioctl arg.  Detect common
+ * derivatives here, and apply that type. To make the following code
+ * less verbose we make a proper typedef.
+ * The joy of IOCTL programming...
+ */
+# if defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__) || defined __OpenBSD__
+typedef unsigned long ioctl_arg_T;
+#else
+typedef int ioctl_arg_T;
+#endif
+



Home | Main Index | Thread Index | Old Index