Browse Source

refresh patches

OPENBSD_6_5
Brent Cook 5 years ago
parent
commit
1ef2552405
15 changed files with 85 additions and 46 deletions
  1. +3
    -3
      patches/0001-Handle-IPv6-DNS-records-on-IPv4-networks-more-libera.patch
  2. +3
    -3
      patches/0002-EAI_NODATA-does-not-exist-everywhere.patch
  3. +4
    -4
      patches/0003-conditionally-fill-in-sin_len-sin6_len-if-they-exist.patch
  4. +4
    -4
      patches/0004-check-if-rdomain-support-is-available.patch
  5. +3
    -3
      patches/0005-update-ntpd.conf-to-indicate-OS-dependent-options.patch
  6. +3
    -3
      patches/0006-allow-overriding-default-user-and-file-locations.patch
  7. +3
    -3
      patches/0007-add-p-option-to-create-a-pid-file.patch
  8. +3
    -3
      patches/0008-initialize-setproctitle-where-needed.patch
  9. +5
    -5
      patches/0009-Notify-the-user-when-constraint-support-is-disabled.patch
  10. +3
    -3
      patches/0010-add-a-method-for-updating-the-realtime-clock-on-sync.patch
  11. +3
    -3
      patches/0011-Deal-with-missing-SO_TIMESTAMP.patch
  12. +3
    -3
      patches/0012-check-result-of-ftello-ftruncate.patch
  13. +3
    -3
      patches/0013-set-IPV6_V6ONLY-if-we-are-binding-to-an-IPv6-address.patch
  14. +3
    -3
      patches/0014-use-adjtimex-over-adjtime-check-return-value-and-adj.patch
  15. +39
    -0
      patches/0015-increase-buffer-sizes-potential-truncation.patch

+ 3
- 3
patches/0001-Handle-IPv6-DNS-records-on-IPv4-networks-more-libera.patch View File

@ -1,7 +1,7 @@
From 641fc1e7220515456c33a8991890a91608a5b983 Mon Sep 17 00:00:00 2001
From 5ad3e4de4bedeeff0751b44a85032f48b9b6452c Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:10:22 -0600
Subject: [PATCH 01/14] Handle IPv6 DNS records on IPv4 networks more liberally
Subject: [PATCH 01/15] 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.
@ -37,5 +37,5 @@ index 3de52685b1..aa9fc24c68 100644
if (p->addr->ss.ss_family == qa4->sa_family) {
if (bind(p->query->fd, qa4, SA_LEN(qa4)) == -1)
--
2.20.1
2.21.0

+ 3
- 3
patches/0002-EAI_NODATA-does-not-exist-everywhere.patch View File

@ -1,7 +1,7 @@
From 683cb25dcb78b92c29c5148becece3cf4f0c6a28 Mon Sep 17 00:00:00 2001
From e0650ecaa5c93e3ed002d18be2ed4bc701d54fb9 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:04:08 -0600
Subject: [PATCH 02/14] EAI_NODATA does not exist everywhere
Subject: [PATCH 02/15] EAI_NODATA does not exist everywhere
FreeBSD says it is deprecated #ifdef's it out.
@ -36,5 +36,5 @@ index 25a92cf8ae..0208b8dfb4 100644
log_warnx("could not parse \"%s\": %s", s,
gai_strerror(error));
--
2.20.1
2.21.0

+ 4
- 4
patches/0003-conditionally-fill-in-sin_len-sin6_len-if-they-exist.patch View File

@ -1,14 +1,14 @@
From 5d2c25bfd0ff11d74ac912313d405247cbaf5ee2 Mon Sep 17 00:00:00 2001
From cf5f8571ae2d9855e351ab3add77814faccf560a Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:02:50 -0600
Subject: [PATCH 03/14] conditionally fill in sin_len/sin6_len if they exist
Subject: [PATCH 03/15] conditionally fill in sin_len/sin6_len if they exist
---
src/usr.sbin/ntpd/parse.y | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/usr.sbin/ntpd/parse.y b/src/usr.sbin/ntpd/parse.y
index be1a7b5369..dd9d75cda7 100644
index 6b436d55d4..34f07b68d2 100644
--- a/src/usr.sbin/ntpd/parse.y
+++ b/src/usr.sbin/ntpd/parse.y
@@ -138,15 +138,17 @@ main : LISTEN ON address listen_opts {
@ -33,5 +33,5 @@ index be1a7b5369..dd9d75cda7 100644
yyerror("invalid IPv4 or IPv6 address: %s\n",
$3);
--
2.20.1
2.21.0

+ 4
- 4
patches/0004-check-if-rdomain-support-is-available.patch View File

@ -1,7 +1,7 @@
From 546b4b7926dc14f0ea6a60182af23b865e0d18ad Mon Sep 17 00:00:00 2001
From 94d6576454297079c35c3680b7c0aca413237ebe Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:05:46 -0600
Subject: [PATCH 04/14] check if rdomain support is available.
Subject: [PATCH 04/15] check if rdomain support is available.
Handle FreeBSD's calling rdomain 'FIB'.
- from naddy@openbsd.org
@ -29,7 +29,7 @@ index 91d1e0fb9b..d438a6576d 100644
#define INTERVAL_QUERY_PATHETIC 60
#define INTERVAL_QUERY_AGGRESSIVE 5
diff --git a/src/usr.sbin/ntpd/parse.y b/src/usr.sbin/ntpd/parse.y
index dd9d75cda7..984beec7a5 100644
index 34f07b68d2..e20670242d 100644
--- a/src/usr.sbin/ntpd/parse.y
+++ b/src/usr.sbin/ntpd/parse.y
@@ -436,11 +436,13 @@ weight : WEIGHT NUMBER {
@ -112,5 +112,5 @@ index 123b6939a2..8c18eb7610 100644
if (bind(la->fd, (struct sockaddr *)&la->sa,
SA_LEN((struct sockaddr *)&la->sa)) == -1) {
--
2.20.1
2.21.0

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

@ -1,7 +1,7 @@
From 9395697554026abb8eb35dd6b268acb536b57d1d Mon Sep 17 00:00:00 2001
From d6ae8d21a3131655dc8bb36cebf6433b4f17242d Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:20:03 -0600
Subject: [PATCH 05/14] update ntpd.conf to indicate OS-dependent options
Subject: [PATCH 05/15] update ntpd.conf to indicate OS-dependent options
Also, clarify listening behavior based on a patch from
Dererk <dererk@debian.org>
@ -49,5 +49,5 @@ index 08062bcf28..eee239bf52 100644
.Xr ntpd 8
will use each given sensor that actually exists.
--
2.20.1
2.21.0

+ 3
- 3
patches/0006-allow-overriding-default-user-and-file-locations.patch View File

@ -1,7 +1,7 @@
From 00ee3b5aea27bc10b3ad6b732dd582b65c74c795 Mon Sep 17 00:00:00 2001
From 3bce366dca75d5dbb6f5f3c9feba638b45c28a02 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Thu, 1 Jan 2015 07:18:11 -0600
Subject: [PATCH 06/14] allow overriding default user and file locations
Subject: [PATCH 06/15] allow overriding default user and file locations
Allow the build process to override the default ntpd file paths and
default user.
@ -38,5 +38,5 @@ index d438a6576d..0f7313c78e 100644
#if defined(SO_SETFIB)
#define SO_RTABLE SO_SETFIB
--
2.20.1
2.21.0

+ 3
- 3
patches/0007-add-p-option-to-create-a-pid-file.patch View File

@ -1,7 +1,7 @@
From a9008bf22c4f706cf2a4ce12dac9eb282f295933 Mon Sep 17 00:00:00 2001
From e8dd7c12e49eabc469e48dde3da59ce743318d92 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Wed, 31 Dec 2014 08:26:41 -0600
Subject: [PATCH 07/14] add -p option to create a pid file
Subject: [PATCH 07/15] add -p option to create a pid file
This is used in both the Gentoo and Debian ports.
@ -146,5 +146,5 @@ index 0f7313c78e..7ee919dd09 100644
struct ctl_show_status {
--
2.20.1
2.21.0

+ 3
- 3
patches/0008-initialize-setproctitle-where-needed.patch View File

@ -1,7 +1,7 @@
From fb2c22a2d06541415f153e195ce577e475cdf26a Mon Sep 17 00:00:00 2001
From 9825a144612213491b7a4c6063407e0c08183384 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Mon, 12 Jan 2015 06:18:31 -0600
Subject: [PATCH 08/14] initialize setproctitle where needed
Subject: [PATCH 08/15] initialize setproctitle where needed
We need to save a copy of argv and __progname to avoid setproctitle
clobbering them.
@ -55,5 +55,5 @@ index 7c8eda5a1d..4e4efa45c8 100644
switch (ch) {
case 'd':
--
2.20.1
2.21.0

+ 5
- 5
patches/0009-Notify-the-user-when-constraint-support-is-disabled.patch View File

@ -1,7 +1,7 @@
From 1c8dc7b9bda86123ccc6744142a80520b75e0b9e Mon Sep 17 00:00:00 2001
From 521fd6f63f1b75b9a921d60f7dbb96da253418fd Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Fri, 27 Mar 2015 23:14:15 -0500
Subject: [PATCH 09/14] Notify the user when constraint support is disabled.
Subject: [PATCH 09/15] Notify the user when constraint support is disabled.
Update the manpage and warn if constraints are
configured but ntpd is built without libtls present.
@ -27,10 +27,10 @@ index 0208b8dfb4..c2f9422f38 100644
}
diff --git a/src/usr.sbin/ntpd/constraint.c b/src/usr.sbin/ntpd/constraint.c
index 76dc4f7bdf..ec7c38df68 100644
index 841a28829d..b537a42e57 100644
--- a/src/usr.sbin/ntpd/constraint.c
+++ b/src/usr.sbin/ntpd/constraint.c
@@ -336,12 +336,14 @@ priv_constraint_child(const char *pw_dir, uid_t pw_uid, gid_t pw_gid)
@@ -339,12 +339,14 @@ priv_constraint_child(const char *pw_dir, uid_t pw_uid, gid_t pw_gid)
if (setpriority(PRIO_PROCESS, 0, 0) == -1)
log_warn("could not set priority");
@ -68,5 +68,5 @@ index eee239bf52..5181a9c504 100644
.It Ic constraint from Ar url
Specify the URL, IP address or the hostname of an HTTPS server to
--
2.20.1
2.21.0

+ 3
- 3
patches/0010-add-a-method-for-updating-the-realtime-clock-on-sync.patch View File

@ -1,7 +1,7 @@
From 6f16675197729ad7cbcb03fa2f95b38a08e92679 Mon Sep 17 00:00:00 2001
From b750ccf4848683b40f8477cee584d80f5aaf94f7 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Mon, 4 May 2015 04:27:29 -0500
Subject: [PATCH 10/14] add a method for updating the realtime clock on sync
Subject: [PATCH 10/15] add a method for updating the realtime clock on sync
from Christian Weisgerber
---
@ -29,5 +29,5 @@ index 4e4efa45c8..a0b2ab339e 100644
}
--
2.20.1
2.21.0

+ 3
- 3
patches/0011-Deal-with-missing-SO_TIMESTAMP.patch View File

@ -1,7 +1,7 @@
From b6d55ddfe09268467fa7953037be7383bbab7154 Mon Sep 17 00:00:00 2001
From fcd0f185ff850a4766211ecbc3a65d01f7d16008 Mon Sep 17 00:00:00 2001
From: Brent Cook <bcook@openbsd.org>
Date: Sun, 6 Dec 2015 22:35:38 -0600
Subject: [PATCH 11/14] Deal with missing SO_TIMESTAMP
Subject: [PATCH 11/15] Deal with missing SO_TIMESTAMP
from Paul B. Henson" <henson@acm.org>
@ -65,5 +65,5 @@ index aa9fc24c68..bb5c4f4c0e 100644
if (T4 < JAN_1970) {
client_log_error(p, "recvmsg control format", EBADF);
--
2.20.1
2.21.0

+ 3
- 3
patches/0012-check-result-of-ftello-ftruncate.patch View File

@ -1,7 +1,7 @@
From b8220a87e4121bd764aa6bf092bd2a2a323c883c Mon Sep 17 00:00:00 2001
From 0e6b5facebc2561a99b04f8538d3dc61dab68196 Mon Sep 17 00:00:00 2001
From: Brent Cook <bcook@openbsd.org>
Date: Mon, 21 Dec 2015 05:53:20 -0600
Subject: [PATCH 12/14] check result of ftello/ftruncate
Subject: [PATCH 12/15] check result of ftello/ftruncate
---
src/usr.sbin/ntpd/ntpd.c | 7 +++++--
@ -33,5 +33,5 @@ index a0b2ab339e..c3b7ab07e1 100644
}
--
2.20.1
2.21.0

+ 3
- 3
patches/0013-set-IPV6_V6ONLY-if-we-are-binding-to-an-IPv6-address.patch View File

@ -1,7 +1,7 @@
From 4f01d08765ee2d031e703e3201a07793247fa323 Mon Sep 17 00:00:00 2001
From fc27d536a1ce4eec8b5cfc689d7b8671b5ae58ef Mon Sep 17 00:00:00 2001
From: Brent Cook <bcook@openbsd.org>
Date: Sat, 13 Aug 2016 14:22:02 -0500
Subject: [PATCH 13/14] set IPV6_V6ONLY if we are binding to an IPv6 address
Subject: [PATCH 13/15] set IPV6_V6ONLY if we are binding to an IPv6 address
---
src/usr.sbin/ntpd/server.c | 9 +++++++++
@ -35,5 +35,5 @@ index 8c18eb7610..9eab1a74bf 100644
if (la->rtable != -1 &&
setsockopt(la->fd, SOL_SOCKET, SO_RTABLE, &la->rtable,
--
2.20.1
2.21.0

+ 3
- 3
patches/0014-use-adjtimex-over-adjtime-check-return-value-and-adj.patch View File

@ -1,7 +1,7 @@
From 55c7e66449bed7f4eaa6cdc2f9a1c8f8ed95ec58 Mon Sep 17 00:00:00 2001
From fcf1d2a424913003fd28db171925858e043162aa Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Sat, 19 Jan 2019 04:25:44 -0600
Subject: [PATCH 14/14] use adjtimex over adjtime, check return value and
Subject: [PATCH 14/15] use adjtimex over adjtime, check return value and
adjust offset as needed
---
@ -70,5 +70,5 @@ index c3b7ab07e1..ddb2ee87d6 100644
update_time_sync_status(synced);
return (synced);
--
2.20.1
2.21.0

+ 39
- 0
patches/0015-increase-buffer-sizes-potential-truncation.patch View File

@ -0,0 +1,39 @@
From 48ef737a92b3f427d76b9e5c7803f72012c583ee Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Sat, 13 Apr 2019 04:45:22 -0500
Subject: [PATCH 15/15] increase buffer sizes potential truncation
---
src/usr.sbin/ntpd/ntpd.c | 2 +-
src/usr.sbin/ntpd/util.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/usr.sbin/ntpd/ntpd.c b/src/usr.sbin/ntpd/ntpd.c
index ddb2ee87d6..e98f322086 100644
--- a/src/usr.sbin/ntpd/ntpd.c
+++ b/src/usr.sbin/ntpd/ntpd.c
@@ -872,7 +872,7 @@ show_peer_msg(struct imsg *imsg, int calledfromshowall)
{
struct ctl_show_peer *cpeer;
int cnt;
- char stratum[3];
+ char stratum[4];
static int firsttime = 1;
if (imsg->hdr.type == IMSG_CTL_SHOW_PEERS_END) {
diff --git a/src/usr.sbin/ntpd/util.c b/src/usr.sbin/ntpd/util.c
index c7fd0e3324..a3abc53425 100644
--- a/src/usr.sbin/ntpd/util.c
+++ b/src/usr.sbin/ntpd/util.c
@@ -134,7 +134,7 @@ d_to_sfp(double d)
char *
print_rtable(int r)
{
- static char b[11];
+ static char b[18];
b[0] = 0;
if (r > 0)
--
2.21.0

Loading…
Cancel
Save