Browse Source

resync patch set

OPENBSD_5_7
Brent Cook 9 years ago
committed by Brent Cook
parent
commit
132ece510b
16 changed files with 49 additions and 36 deletions
  1. +4
    -2
      patches/0001-include-time.h-for-strftime-clock_gettime.patch
  2. +4
    -2
      patches/0002-removed-unused-libevent-header-and-structures-in-ntp.patch
  3. +3
    -1
      patches/0003-remove-unused-dns_pid.patch
  4. +4
    -2
      patches/0004-add-MAX-macro-used-in-a-few-places-in-ntpd.patch
  5. +4
    -3
      patches/0005-rename-the-s_un-socket-to-avoid-a-variable-called-su.patch
  6. +2
    -2
      patches/0006-be-more-verbose-when-logging-privsep-errors.patch
  7. +2
    -2
      patches/0007-do-not-allow-privsep-user-to-be-a-privileged-user.patch
  8. +2
    -2
      patches/0008-Handle-IPv6-DNS-records-on-IPv4-networks-more-libera.patch
  9. +1
    -1
      patches/0009-Fix-DNS-timeout-lookup.patch
  10. +11
    -5
      patches/0010-EAI_NODATA-does-not-exist-everywhere.patch
  11. +2
    -2
      patches/0011-Use-LOG_NTP-syslog-facility.patch
  12. +6
    -8
      patches/0012-conditionally-fill-in-sin_len-sin6_len-if-they-exist.patch
  13. +1
    -1
      patches/0013-check-if-rdomain-support-is-available.patch
  14. +1
    -1
      patches/0014-update-ntpd.conf-to-indicate-OS-dependent-options.patch
  15. +1
    -1
      patches/0015-allow-overriding-default-user-and-file-locations.patch
  16. +1
    -1
      patches/0016-add-p-option-to-create-a-pid-file.patch.disabled

patches/0001-include-time.h-for-clock_gettime.patch → patches/0001-include-time.h-for-strftime-clock_gettime.patch View File

@ -1,8 +1,10 @@
From 53006c85af7c8b69afa3847e12107588c1460c5a Mon Sep 17 00:00:00 2001
From 27f9b15fed29f671606ce6f5322c6407c0456615 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 08:58:26 -0600
Subject: [PATCH 01/16] include time.h for clock_gettime
Subject: [PATCH 01/16] include time.h for strftime, clock_gettime
Add a missing include for time.h to get the definitions of
clock_gettime and strftime.
---
src/usr.sbin/ntpd/ntpd.c | 1 +
src/usr.sbin/ntpd/util.c | 2 ++

patches/0002-removed-unused-libevent-header-and-structures.patch → patches/0002-removed-unused-libevent-header-and-structures-in-ntp.patch View File

@ -1,8 +1,10 @@
From da6f7a99e25c9fa0fca75576eaf29f0e8fe67441 Mon Sep 17 00:00:00 2001
From 0d94976a5b804c445cb8c34d2d0665c379e86ee5 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 08:59:19 -0600
Subject: [PATCH 02/16] removed unused libevent header and structures
Subject: [PATCH 02/16] removed unused libevent header and structures in ntpd.h
It does not appear anything actually uses libevent in ntpd, so remove
the libevent-using structures from ntpd.h
---
src/usr.sbin/ntpd/ntpd.h | 10 ----------
1 file changed, 10 deletions(-)

+ 3
- 1
patches/0003-remove-unused-dns_pid.patch View File

@ -1,8 +1,10 @@
From be678b846a8bbeede06d66a630a64a19c589c45f Mon Sep 17 00:00:00 2001
From 8d9e3d91cfb94f11873d9bed1d7e877572bb5579 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:01:57 -0600
Subject: [PATCH 03/16] remove unused dns_pid
dns_pid is returned, but nothing is done with it. Was then intent to do
some extra error handling here?
---
src/usr.sbin/ntpd/ntp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)


patches/0004-add-MAX-macro.patch → patches/0004-add-MAX-macro-used-in-a-few-places-in-ntpd.patch View File

@ -1,8 +1,10 @@
From 06c8339b3a1bde6f71d437d792ae01d118832fb4 Mon Sep 17 00:00:00 2001
From a74e51f0e68d0d437c340a197ef7fcba8ab3b3aa Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Wed, 31 Dec 2014 22:39:58 -0600
Subject: [PATCH 04/16] add MAX macro
Subject: [PATCH 04/16] add MAX macro, used in a few places in ntpd
Do not assume that the system #includes happen to include a MAX macro
somewhere along the way.
---
src/usr.sbin/ntpd/ntpd.h | 4 ++++
1 file changed, 4 insertions(+)

patches/0008-rename-socket-to-avoid-a-variable-called-sun.patch → patches/0005-rename-the-s_un-socket-to-avoid-a-variable-called-su.patch View File

@ -1,9 +1,10 @@
From 8c872d895d50214a23aad90a7cb31a7a51a08e29 Mon Sep 17 00:00:00 2001
From 0a52220f114d2134d0e6180aa1c9fccdb6050700 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Wed, 31 Dec 2014 22:08:09 -0600
Subject: [PATCH 08/16] rename socket to avoid a variable called 'sun'
Subject: [PATCH 05/16] rename the s_un socket to avoid a variable called 'sun'
Solaris defines 'sun' as a constant.
Solaris build environments seem to define 'sun' as a constant.
Hilarity ensues.
---
src/usr.sbin/ntpd/control.c | 18 +++++++++---------
src/usr.sbin/ntpd/ntpd.c | 12 ++++++------

patches/0005-be-more-verbose-when-logging-privsep-errors.patch → patches/0006-be-more-verbose-when-logging-privsep-errors.patch View File

@ -1,7 +1,7 @@
From b0d68d365d6b4512a5a07d14e56f0c51cdeae0c3 Mon Sep 17 00:00:00 2001
From 0b2940a2ba2e04fe876b7e8828d05e2d6b750797 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Thu, 1 Jan 2015 13:06:38 -0600
Subject: [PATCH 05/16] be more verbose when logging privsep errors
Subject: [PATCH 06/16] be more verbose when logging privsep errors
Make it easy for a sysadmin to diagnose a privilege separation path
problem without looking at the source code.

patches/0006-do-not-allow-privsep-user-to-be-a-privileged-user.patch → patches/0007-do-not-allow-privsep-user-to-be-a-privileged-user.patch View File

@ -1,7 +1,7 @@
From 555e4346d4a441e2385b91c3188edbe9b093cfd5 Mon Sep 17 00:00:00 2001
From f478e7be28896cd6e42622a72c691b0f56b01aa9 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Thu, 1 Jan 2015 13:26:29 -0600
Subject: [PATCH 06/16] do not allow privsep user to be a privileged user
Subject: [PATCH 07/16] do not allow privsep user to be a privileged user
This may need to be a function call for different platforms with
different capability / privilege mechanisms.

patches/0007-Handle-IPv6-DNS-records-on-IPv4-networks-more-libera.patch → patches/0008-Handle-IPv6-DNS-records-on-IPv4-networks-more-libera.patch View File

@ -1,7 +1,7 @@
From 42535b62e78e5869fd6fef0f075eb17fb0148559 Mon Sep 17 00:00:00 2001
From abc0fb186de14dae5cacae4d1a8352c7f78106f6 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:10:22 -0600
Subject: [PATCH 07/16] Handle IPv6 DNS records on IPv4 networks more liberally
Subject: [PATCH 08/16] Handle IPv6 DNS records on IPv4 networks more liberally
Rather than fail on IPv4 only networks when seeing an IPv6 DNS record,
just give a warning.

+ 1
- 1
patches/0009-Fix-DNS-timeout-lookup.patch View File

@ -1,4 +1,4 @@
From b3c2b2c8c9c4e59ad3518d10d3765cf35934d76c Mon Sep 17 00:00:00 2001
From e181bffce739affc7261ddd4c659311e09858fe2 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Wed, 31 Dec 2014 08:31:20 -0600
Subject: [PATCH 09/16] Fix DNS timeout lookup


patches/0012-EAI_NODATA-does-not-exist-everywhere.patch → patches/0010-EAI_NODATA-does-not-exist-everywhere.patch View File

@ -1,18 +1,24 @@
From d874a2d6c44f3656289437b49002ba0f19ca63a2 Mon Sep 17 00:00:00 2001
From 9404e4f538cde156e08393f7a88a62c631a5ab42 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:04:08 -0600
Subject: [PATCH 12/16] EAI_NODATA does not exist everywhere
Subject: [PATCH 10/16] EAI_NODATA does not exist everywhere
FreeBSD says it is deprecated and should be removed.
FreeBSD says it is deprecated #ifdef's it out.
Linux glibc hides it and many other return codes behind __USE_GNU.
What is that supposed to mean?
It seems the only effect of 'deprecating' this value has been that all
portable software now has to have a special check instead.
---
src/usr.sbin/ntpd/config.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/usr.sbin/ntpd/config.c b/src/usr.sbin/ntpd/config.c
index b651c62..d571dd7 100644
index d660750..22b692b 100644
--- a/src/usr.sbin/ntpd/config.c
+++ b/src/usr.sbin/ntpd/config.c
@@ -128,8 +128,14 @@ host_dns(const char *s, struct ntp_addr **hn)
@@ -124,8 +124,14 @@ host_dns(const char *s, struct ntp_addr **hn)
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM; /* DUMMY */
error = getaddrinfo(s, NULL, &hints, &res0);

patches/0010-Use-LOG_NTP-syslog-facility.patch → patches/0011-Use-LOG_NTP-syslog-facility.patch View File

@ -1,7 +1,7 @@
From 204f212fd5905b8af28f22c49254be4a29923c94 Mon Sep 17 00:00:00 2001
From 48f06e1fee38cd2dafffe55bd94d14f23863c4ef Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:00:12 -0600
Subject: [PATCH 10/16] Use LOG_NTP syslog facility.
Subject: [PATCH 11/16] Use LOG_NTP syslog facility.
FreeBSD PR: 114191
Submitted by: Robert Archer <freebsd@deathbeforedecaf.net>

patches/0011-conditionally-fill-in-sin_len-sin6_len-if-they-exist.patch → patches/0012-conditionally-fill-in-sin_len-sin6_len-if-they-exist.patch View File

@ -1,23 +1,21 @@
From e6c8f113fb20f3768e3c35b2f23c694a61c7c5f2 Mon Sep 17 00:00:00 2001
From 48574bd8957c1f824a03f866c448dd9b19e060ea Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:02:50 -0600
Subject: [PATCH 11/16] conditionally fill in sin_len/sin6_len if they exist
Subject: [PATCH 12/16] conditionally fill in sin_len/sin6_len if they exist
Should we even be setting these at all? Does anything really rely in
this anymore?
---
src/usr.sbin/ntpd/config.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/usr.sbin/ntpd/config.c b/src/usr.sbin/ntpd/config.c
index d660750..b651c62 100644
index 22b692b..c01df83 100644
--- a/src/usr.sbin/ntpd/config.c
+++ b/src/usr.sbin/ntpd/config.c
@@ -75,7 +75,9 @@ host_v4(const char *s)
if ((h = calloc(1, sizeof(struct ntp_addr))) == NULL)
fatal(NULL);
sa_in = (struct sockaddr_in *)&h->ss;
+#ifdef SIN_LEN
+#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
sa_in->sin_len = sizeof(struct sockaddr_in);
+#endif
sa_in->sin_family = AF_INET;
@ -33,11 +31,11 @@ index d660750..b651c62 100644
sa_in6->sin6_family = AF_INET6;
memcpy(&sa_in6->sin6_addr,
&((struct sockaddr_in6 *)res->ai_addr)->sin6_addr,
@@ -141,12 +145,16 @@ host_dns(const char *s, struct ntp_addr **hn)
@@ -147,12 +151,16 @@ host_dns(const char *s, struct ntp_addr **hn)
h->ss.ss_family = res->ai_family;
if (res->ai_family == AF_INET) {
sa_in = (struct sockaddr_in *)&h->ss;
+#ifdef SIN_LEN
+#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
sa_in->sin_len = sizeof(struct sockaddr_in);
+#endif
sa_in->sin_addr.s_addr = ((struct sockaddr_in *)

+ 1
- 1
patches/0013-check-if-rdomain-support-is-available.patch View File

@ -1,4 +1,4 @@
From 7774d16dece25b907809a2cba3ede6195798a641 Mon Sep 17 00:00:00 2001
From fb2f9a8e680d63de0c2e389522e31d0592836a0b Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:05:46 -0600
Subject: [PATCH 13/16] check if rdomain support is available


+ 1
- 1
patches/0014-update-ntpd.conf-to-indicate-OS-dependent-options.patch View File

@ -1,4 +1,4 @@
From edb43d28257d62671d7b364a55375bcf1332a1b9 Mon Sep 17 00:00:00 2001
From d11c0ce3878fdc86624c1ee6b0e45764c8915dab Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:20:03 -0600
Subject: [PATCH 14/16] update ntpd.conf to indicate OS-dependent options


+ 1
- 1
patches/0015-allow-overriding-default-user-and-file-locations.patch View File

@ -1,4 +1,4 @@
From 6f9277a636cdd1c1a69d609f99b5c6ce00f1581b Mon Sep 17 00:00:00 2001
From e76ff433a73cf9a6dc1f24db3500c5139e031601 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Thu, 1 Jan 2015 07:18:11 -0600
Subject: [PATCH 15/16] allow overriding default user and file locations


+ 1
- 1
patches/0016-add-p-option-to-create-a-pid-file.patch.disabled View File

@ -1,4 +1,4 @@
From 4bf1b65f3ca244e47e9a7d6f0c475f402aea0d44 Mon Sep 17 00:00:00 2001
From 510fd86ed75868a82be55f3b16040ea02fb06fc4 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Wed, 31 Dec 2014 08:26:41 -0600
Subject: [PATCH 16/16] add -p option to create a pid file


Loading…
Cancel
Save