Browse Source

Re-enable -s and -S parameters

master
Pekka Helenius 3 years ago
parent
commit
c136903aa2
3 changed files with 44 additions and 2 deletions
  1. +1
    -0
      README.md
  2. +4
    -2
      arch/openntpd-git/PKGBUILD
  3. +39
    -0
      patches/13-patch_re-enable-inittime.patch

+ 1
- 0
README.md View File

@ -34,6 +34,7 @@ See also [my blog post on fjordtek.com](https://fjordtek.com/categories/news/202
| [10-patch_peer-constraint-logs.patch](patches/10-patch_peer-constraint-logs.patch) | Improve constraint & NTP peer log entries; update conf & man |
| [11-patch_fix-constraint-time-overflow-32bit.patch](patches/11-patch_fix-constraint-time-overflow-32bit.patch) | Cast constraint median time value to unsigned long. Fixes overflow on 32-bit systems. |
| [12-patch_fix-adjtime.patch](patches/12-patch_fix-adjtime.patch) | Assume system clock is synced when time offset is in specific range limits (quick hotfix). |
| [13-patch_re-enable-inittime.patch](patches/13-patch_re-enable-inittime.patch) | Re-enable initial time synchronization setting (-s and -S parameters). |
## Usage


+ 4
- 2
arch/openntpd-git/PKGBUILD View File

@ -45,13 +45,14 @@ patches=(
10-patch_peer-constraint-logs.patch
11-patch_fix-constraint-time-overflow-32bit.patch
12-patch_fix-adjtime.patch
13-patch_re-enable-inittime.patch
)
source=(${source[@]} ${patches[@]})
sha512sums=('SKIP'
'b6bb4f39eb435ce6c3314ea4a31430a1f8b70898d17d1fe07fa487bec0e79c022b004d3c11366f0f994546f454e5418caf5b3d7e6e1a205598d2bc8140417f7a'
'c58d48de67cd1ce0df7ea60def26db38b9d7409b64d097639a4cde3f4774a4bcc1159f993f37c5c61781cab1e2d1b8a35005030b28b0c9f0f6e0f81053586dfa'
'15c1a510fa8f43217b6a3fc3ba287176d04fbe0c4bbea616ab08d1c679ed9da6734233b70b4858093992a3fbf4346642353eb2626fd8e5668cda3712d5ea43b7'
'51a4f3d4ea39019f3b64aa187060c5d19e838245f5880d27cadf98794198e45222b1aaa51d54de959fa264a25c5a1129c366837ead4c1de884d5a85308a96e8e'
'fdbdaf6becdc592fcb086dfa2b8d79b05c05d5791893808c31751053f12da16df0336cd3d30829dfc91c81f9c1d89416115865a0298f4b002a0b2ae1f11f2e0d'
'82724d80c1f110eea2dc807dc5af7b2329cfc5a4656d2cc8752979ee23d70677fe3c039cb7bc327a43a4a6cd8d4c55ac47ba38c38e8090b71c2e6348403d736b'
@ -63,7 +64,8 @@ sha512sums=('SKIP'
'26a2aadc40472d854b8ad1c454c5689c0703ace7836498dbf3f52664610820e2747e22307929446354a973b79dea236c73196ab30deeaa8ffdfde4286e10d3c9'
'3ae3501a41ee50519b19074bf9e532718e365e6b45a9af4a9fba81d4276df98244cd5aac7acc9f6cd7d7a2bf460b4714e79e2676f826859fe4ad43b67046c709'
'62f99efe913598fad09e6d9ca418813beeff01c4cd22861296f998b3ef87bf0b2b5c7fd018976929b4a0d8f485b2afa4a0c62c00aeb2b738d08a944ef8fa0d19'
'08c6ee834d98d9897eb00023364f285fc0515b33a04c1593595a9d3a96a894f2be08a5665ac72fee65e1dab66e4c4b43f7414abd1ef97f483e7e2dcba948c49a')
'08c6ee834d98d9897eb00023364f285fc0515b33a04c1593595a9d3a96a894f2be08a5665ac72fee65e1dab66e4c4b43f7414abd1ef97f483e7e2dcba948c49a'
'18afd61a67b071a7824b6f58e5be4e05cad01283a42dc20ff34b93164eb3c7132086b6a56ca61012218eab6dd485412d402fd529832141e58450466d7b9e1d25')
validpgpkeys=('A1EB079B8D3EB92B4EBD3139663AF51BD5E4D8D5') # Brent Cook <bcook@openbsd.org>
pkgver() {


+ 39
- 0
patches/13-patch_re-enable-inittime.patch View File

@ -0,0 +1,39 @@
From: Pekka Helenius <fincer89@hotmail.com>
Date: Mon, 15 Feb 2021 22:20:14 +0300
Subject: Re-enable initial time synchronization setting (-s and -S parameters).
--- a/src/ntpd.c 2021-01-20 23:00:53.946365898 +0200
+++ b/src/ntpd.c 2021-02-15 22:18:58.517431728 +0200
@@ -167,7 +167,6 @@ main(int argc, char *argv[])
char **argv0 = argv;
char *pname = NULL;
time_t settime_deadline = 0;
- int sopt = 0;
__progname = get_progname(argv[0]);
@@ -213,8 +212,10 @@ main(int argc, char *argv[])
lconf.pid_file = optarg;
break;
case 's':
+ lconf.settime = 1;
+ break;
case 'S':
- sopt = ch;
+ lconf.settime = 0;
break;
case 'v':
lconf.verbose++;
@@ -232,12 +233,6 @@ main(int argc, char *argv[])
log_init(logdest, lconf.verbose, LOG_DAEMON);
- if (sopt) {
- log_warnx("-%c option no longer works and will be removed soon.",
- sopt);
- log_warnx("Please reconfigure to use constraints or trusted servers.");
- }
-
argc -= optind;
argv += optind;
if (argc > 0)

Loading…
Cancel
Save