Update chrony to version 1.29. For a full list of changes since 1.24 see file NEWS in the distfile. Security fixes since 1.24: * Fix crash when processing crafted commands (CVE-2012-4502) (possible with IP addresses allowed by cmdallow and localhost) * Don't send uninitialized data in SUBNETS_ACCESSED and CLIENT_ACCESSES replies (CVE-2012-4503) (not used by chronyc) Reviewed by: Joerg Sonnenberger <joerg@netbsd.org>diff -r1.28 -r1.29 pkgsrc/net/chrony/Makefile
(hannken)
@@ -1,40 +1,41 @@ | @@ -1,40 +1,41 @@ | |||
1 | # $NetBSD: Makefile,v 1.28 2013/07/15 02:02:26 ryoon Exp $ | 1 | # $NetBSD: Makefile,v 1.29 2013/08/16 08:30:20 hannken Exp $ | |
2 | 2 | |||
3 | DISTNAME= chrony-1.24 | 3 | DISTNAME= chrony-1.29 | |
4 | CATEGORIES= net | 4 | CATEGORIES= net | |
5 | MASTER_SITES= http://download.tuxfamily.org/chrony/ | 5 | MASTER_SITES= http://download.tuxfamily.org/chrony/ | |
6 | 6 | |||
7 | MAINTAINER= hannken@NetBSD.org | 7 | MAINTAINER= hannken@NetBSD.org | |
8 | HOMEPAGE= http://chrony.tuxfamily.org/ | 8 | HOMEPAGE= http://chrony.tuxfamily.org/ | |
9 | COMMENT= Daemon for maintaining the accuracy of computer clocks | 9 | COMMENT= Daemon for maintaining the accuracy of computer clocks | |
10 | LICENSE= gnu-gpl-v2 | |||
10 | 11 | |||
11 | USE_TOOLS+= gmake | 12 | USE_TOOLS+= gmake | |
12 | HAS_CONFIGURE= YES | 13 | HAS_CONFIGURE= YES | |
13 | BUILD_DEFS+= VARBASE | 14 | BUILD_DEFS+= VARBASE | |
14 | CONFIGURE_ARGS+= --prefix=${PREFIX:Q} | 15 | CONFIGURE_ARGS+= --prefix=${PREFIX} | |
15 | CONFIGURE_ARGS+= --mandir=${PREFIX:Q}/${PKGMANDIR:Q} | 16 | CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR} | |
16 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} | 17 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} | |
18 | CONFIGURE_ARGS+= --localstatedir=${VARBASE} | |||
17 | AUTO_MKDIRS= yes | 19 | AUTO_MKDIRS= yes | |
18 | 20 | |||
21 | OWN_DIRS= ${VARBASE}/lib/chrony | |||
22 | ||||
19 | EGDIR= ${PREFIX}/share/examples/chrony | 23 | EGDIR= ${PREFIX}/share/examples/chrony | |
20 | EGFILES= chrony.conf.example chrony.keys.example | 24 | EGFILES= chrony.conf.example chrony.keys.example | |
21 | RCD_SCRIPTS= chronyd | 25 | RCD_SCRIPTS= chronyd | |
22 | 26 | |||
23 | SUBST_CLASSES+= paths | 27 | SUBST_CLASSES+= paths | |
24 | SUBST_FILES.paths= ${EGFILES:S/^/examples\//} conf.c chrony.conf.5 \ | 28 | SUBST_FILES.paths= ${EGFILES:S/^/examples\//} conf.c | |
25 | chronyd.8 | |||
26 | SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g' | |||
27 | SUBST_SED.paths+= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g' | 29 | SUBST_SED.paths+= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g' | |
28 | SUBST_SED.paths+= -e 's,@VARBASE@,${VARBASE},g' | 30 | SUBST_SED.paths+= -e 's,@VARBASE@,${VARBASE},g' | |
29 | SUBST_STAGE.paths= post-patch | 31 | SUBST_STAGE.paths= post-patch | |
30 | 32 | |||
31 | post-install: | 33 | post-install: | |
32 | ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR} | 34 | set -e; for file in ${EGFILES}; do \ | |
33 | for file in ${EGFILES}; do \ | |||
34 | ${INSTALL_DATA} ${WRKSRC}/examples/$${file} \ | 35 | ${INSTALL_DATA} ${WRKSRC}/examples/$${file} \ | |
35 | ${DESTDIR}${EGDIR}/$${file}; \ | 36 | ${DESTDIR}${EGDIR}/$${file}; \ | |
36 | done | 37 | done | |
37 | 38 | |||
38 | .include "../../mk/readline.buildlink3.mk" | 39 | .include "../../mk/readline.buildlink3.mk" | |
39 | .include "../../devel/ncurses/buildlink3.mk" | 40 | .include "../../devel/ncurses/buildlink3.mk" | |
40 | .include "../../mk/bsd.pkg.mk" | 41 | .include "../../mk/bsd.pkg.mk" |
@@ -1,13 +1,13 @@ | @@ -1,13 +1,13 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.4 2009/06/14 18:09:23 joerg Exp $ | 1 | @comment $NetBSD: PLIST,v 1.5 2013/08/16 08:30:20 hannken Exp $ | |
2 | bin/chronyc | 2 | bin/chronyc | |
3 | share/doc/chrony/COPYING | |||
4 | share/doc/chrony/README | |||
5 | share/doc/chrony/chrony.txt | |||
6 | share/examples/chrony/chrony.conf.example | |||
7 | share/examples/chrony/chrony.keys.example | |||
8 | man/man1/chrony.1 | 3 | man/man1/chrony.1 | |
9 | man/man1/chronyc.1 | 4 | man/man1/chronyc.1 | |
10 | man/man5/chrony.conf.5 | 5 | man/man5/chrony.conf.5 | |
11 | man/man8/chronyd.8 | 6 | man/man8/chronyd.8 | |
12 | sbin/chronyd | 7 | sbin/chronyd | |
8 | share/doc/chrony/COPYING | |||
9 | share/doc/chrony/README | |||
10 | share/doc/chrony/chrony.txt | |||
11 | share/examples/chrony/chrony.conf.example | |||
12 | share/examples/chrony/chrony.keys.example | |||
13 | share/examples/rc.d/chronyd | 13 | share/examples/rc.d/chronyd |
@@ -1,11 +1,12 @@ | @@ -1,11 +1,12 @@ | |||
1 | $NetBSD: distinfo,v 1.7 2010/02/26 09:27:43 hannken Exp $ | 1 | $NetBSD: distinfo,v 1.8 2013/08/16 08:30:20 hannken Exp $ | |
2 | 2 | |||
3 | SHA1 (chrony-1.24.tar.gz) = 6e17d7b8cdd3508751713bd2279202b75643e268 | 3 | SHA1 (chrony-1.29.tar.gz) = 442fb7d62a6f23bf1057864a3dbdfa55e1b6eb35 | |
4 | RMD160 (chrony-1.24.tar.gz) = a393c3f51d99a24a1aefd1653575de5a6c642191 | 4 | RMD160 (chrony-1.29.tar.gz) = 53518efdd90c4695005d7cc929077985f16887d7 | |
5 | Size (chrony-1.24.tar.gz) = 364311 bytes | 5 | Size (chrony-1.29.tar.gz) = 392880 bytes | |
6 | SHA1 (patch-aa) = 1fe34e98bcdf70686e3e38bf88bfdbbe9f27b42d | 6 | SHA1 (patch-aa) = c28f5b7ff6c3ebc67b68d574c1b10bd54334b6a3 | |
7 | SHA1 (patch-ab) = efec09e45ea46c7f700a507a565e27a3d9c38f78 | 7 | SHA1 (patch-ab) = 1af7c5699147d4c05165c4e1f90bf127814511ce | |
8 | SHA1 (patch-ac) = e6676efc4151b394451b7de64d44351789892561 | 8 | SHA1 (patch-ac) = 5830215f11573ca88541f661fffb17365e7d206c | |
9 | SHA1 (patch-ad) = 621626000457731ac89778d41200e9046a4edb25 | 9 | SHA1 (patch-ad) = df47df974995f9f947b731a4812fb7633fd874a4 | |
10 | SHA1 (patch-ae) = a1efbc23807fa74c5393946400fa2565af12e7c5 | 10 | SHA1 (patch-ae) = 133e90d0614ef5961305b952d9a7a4047a2edcc7 | |
11 | SHA1 (patch-af) = 3d09c0aba56bdce704a923ae7c15673cdb6a7489 | 11 | SHA1 (patch-af) = 43c5e0f14aa8a980af83ba4ea5691705a4738064 | |
12 | SHA1 (patch-ag) = 165daaab8507cca8b29a61af576711c0ec05a3a6 |
@@ -1,25 +1,25 @@ | @@ -1,25 +1,25 @@ | |||
1 | #!@RCD_SCRIPTS_SHELL@ | 1 | #!@RCD_SCRIPTS_SHELL@ | |
2 | # | 2 | # | |
3 | # $NetBSD: chronyd.sh,v 1.4 2002/09/23 07:04:39 grant Exp $ | 3 | # $NetBSD: chronyd.sh,v 1.5 2013/08/16 08:30:20 hannken Exp $ | |
4 | # | 4 | # | |
5 | # PROVIDE: chronyd | 5 | # PROVIDE: chronyd | |
6 | # REQUIRE: DAEMON | 6 | # REQUIRE: DAEMON | |
7 | 7 | |||
8 | . /etc/rc.subr | 8 | . /etc/rc.subr | |
9 | 9 | |||
10 | name="chronyd" | 10 | name="chronyd" | |
11 | command="@PREFIX@/sbin/${name}" | 11 | command="@PREFIX@/sbin/${name}" | |
12 | pidfile="/var/run/${name}.pid" | 12 | pidfile="@VARBASE@/run/${name}.pid" | |
13 | required_files="@PKG_SYSCONFDIR@/chrony.conf" | 13 | required_files="@PKG_SYSCONFDIR@/chrony.conf" | |
14 | extra_commands="online offline" | 14 | extra_commands="online offline" | |
15 | online_cmd="chronyd_online" | 15 | online_cmd="chronyd_online" | |
16 | online_precmd="chronyd_precmd" | 16 | online_precmd="chronyd_precmd" | |
17 | offline_cmd="chronyd_offline" | 17 | offline_cmd="chronyd_offline" | |
18 | offline_precmd="chronyd_precmd" | 18 | offline_precmd="chronyd_precmd" | |
19 | 19 | |||
20 | chronyd_precmd() | 20 | chronyd_precmd() | |
21 | { | 21 | { | |
22 | local id kfile | 22 | local id kfile | |
23 | id=`awk '$1 == "commandkey" { print $2 }' @PKG_SYSCONFDIR@/chrony.conf` | 23 | id=`awk '$1 == "commandkey" { print $2 }' @PKG_SYSCONFDIR@/chrony.conf` | |
24 | if [ -z "$id" ]; then | 24 | if [ -z "$id" ]; then | |
25 | echo "ERROR: no commandkey in @PKG_SYSCONFDIR@/chrony.conf!" | 25 | echo "ERROR: no commandkey in @PKG_SYSCONFDIR@/chrony.conf!" |
@@ -1,27 +1,32 @@ | @@ -1,27 +1,32 @@ | |||
1 | $NetBSD: patch-aa,v 1.4 2010/02/26 09:27:43 hannken Exp $ | 1 | $NetBSD: patch-aa,v 1.5 2013/08/16 08:30:20 hannken Exp $ | |
2 | 2 | |||
3 | --- Makefile.in.orig 2010-02-04 13:07:19.000000000 +0100 | 3 | Adapt install target for pkgsrc. | |
4 | ||||
5 | --- Makefile.in.orig 2013-08-08 13:58:07.000000000 +0000 | |||
4 | +++ Makefile.in | 6 | +++ Makefile.in | |
5 | @@ -104,31 +104,14 @@ | 7 | @@ -93,35 +93,17 @@ getdate : | |
8 | # seem to vary between systems. | |||
6 | 9 | |||
7 | install: chronyd chronyc | 10 | install: chronyd chronyc | |
11 | - [ -d $(DESTDIR)$(SYSCONFDIR) ] || mkdir -p $(DESTDIR)$(SYSCONFDIR) | |||
8 | - [ -d $(DESTDIR)$(SBINDIR) ] || mkdir -p $(DESTDIR)$(SBINDIR) | 12 | - [ -d $(DESTDIR)$(SBINDIR) ] || mkdir -p $(DESTDIR)$(SBINDIR) | |
9 | - [ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) | 13 | - [ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) | |
10 | [ -d $(DESTDIR)$(DOCDIR) ] || mkdir -p $(DESTDIR)$(DOCDIR) | 14 | - [ -d $(DESTDIR)$(DOCDIR) ] || mkdir -p $(DESTDIR)$(DOCDIR) | |
11 | - [ -d $(DESTDIR)$(MANDIR)/man1 ] || mkdir -p $(DESTDIR)$(MANDIR)/man1 | 15 | - [ -d $(DESTDIR)$(MANDIR)/man1 ] || mkdir -p $(DESTDIR)$(MANDIR)/man1 | |
12 | - [ -d $(DESTDIR)$(MANDIR)/man5 ] || mkdir -p $(DESTDIR)$(MANDIR)/man5 | 16 | - [ -d $(DESTDIR)$(MANDIR)/man5 ] || mkdir -p $(DESTDIR)$(MANDIR)/man5 | |
13 | - [ -d $(DESTDIR)$(MANDIR)/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/man8 | 17 | - [ -d $(DESTDIR)$(MANDIR)/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/man8 | |
14 | - [ -d $(DESTDIR)$(DOCDIR) ] || mkdir -p $(DESTDIR)$(DOCDIR) | 18 | [ -d $(DESTDIR)$(DOCDIR) ] || mkdir -p $(DESTDIR)$(DOCDIR) | |
19 | [ -d $(DESTDIR)$(CHRONYVARDIR) ] || mkdir -p $(DESTDIR)$(CHRONYVARDIR) | |||
15 | - if [ -f $(DESTDIR)$(SBINDIR)/chronyd ]; then rm -f $(DESTDIR)$(SBINDIR)/chronyd ; fi | 20 | - if [ -f $(DESTDIR)$(SBINDIR)/chronyd ]; then rm -f $(DESTDIR)$(SBINDIR)/chronyd ; fi | |
16 | - if [ -f $(DESTDIR)$(BINDIR)/chronyc ]; then rm -f $(DESTDIR)$(BINDIR)/chronyc ; fi | 21 | - if [ -f $(DESTDIR)$(BINDIR)/chronyc ]; then rm -f $(DESTDIR)$(BINDIR)/chronyc ; fi | |
17 | - cp chronyd $(DESTDIR)$(SBINDIR)/chronyd | 22 | - cp chronyd $(DESTDIR)$(SBINDIR)/chronyd | |
18 | - chmod 755 $(DESTDIR)$(SBINDIR)/chronyd | 23 | - chmod 755 $(DESTDIR)$(SBINDIR)/chronyd | |
19 | - cp chronyc $(DESTDIR)$(BINDIR)/chronyc | 24 | - cp chronyc $(DESTDIR)$(BINDIR)/chronyc | |
20 | - chmod 755 $(DESTDIR)$(BINDIR)/chronyc | 25 | - chmod 755 $(DESTDIR)$(BINDIR)/chronyc | |
21 | - cp chrony.txt $(DESTDIR)$(DOCDIR)/chrony.txt | 26 | - cp chrony.txt $(DESTDIR)$(DOCDIR)/chrony.txt | |
22 | - chmod 644 $(DESTDIR)$(DOCDIR)/chrony.txt | 27 | - chmod 644 $(DESTDIR)$(DOCDIR)/chrony.txt | |
23 | - cp COPYING $(DESTDIR)$(DOCDIR)/COPYING | 28 | - cp COPYING $(DESTDIR)$(DOCDIR)/COPYING | |
24 | - chmod 644 $(DESTDIR)$(DOCDIR)/COPYING | 29 | - chmod 644 $(DESTDIR)$(DOCDIR)/COPYING | |
25 | - cp README $(DESTDIR)$(DOCDIR)/README | 30 | - cp README $(DESTDIR)$(DOCDIR)/README | |
26 | - chmod 644 $(DESTDIR)$(DOCDIR)/README | 31 | - chmod 644 $(DESTDIR)$(DOCDIR)/README | |
27 | - cp chrony.1 $(DESTDIR)$(MANDIR)/man1 | 32 | - cp chrony.1 $(DESTDIR)$(MANDIR)/man1 | |
@@ -33,13 +38,14 @@ $NetBSD: patch-aa,v 1.4 2010/02/26 09:27 | @@ -33,13 +38,14 @@ $NetBSD: patch-aa,v 1.4 2010/02/26 09:27 | |||
33 | - cp chrony.conf.5 $(DESTDIR)$(MANDIR)/man5 | 38 | - cp chrony.conf.5 $(DESTDIR)$(MANDIR)/man5 | |
34 | - chmod 644 $(DESTDIR)$(MANDIR)/man5/chrony.conf.5 | 39 | - chmod 644 $(DESTDIR)$(MANDIR)/man5/chrony.conf.5 | |
35 | + $(BSD_INSTALL_PROGRAM) chronyd $(DESTDIR)$(SBINDIR) | 40 | + $(BSD_INSTALL_PROGRAM) chronyd $(DESTDIR)$(SBINDIR) | |
36 | + $(BSD_INSTALL_PROGRAM) chronyc $(DESTDIR)$(BINDIR) | 41 | + $(BSD_INSTALL_PROGRAM) chronyc $(DESTDIR)$(BINDIR) | |
37 | + $(BSD_INSTALL_DATA) chrony.txt $(DESTDIR)$(DOCDIR) | 42 | + $(BSD_INSTALL_DATA) chrony.txt $(DESTDIR)$(DOCDIR) | |
38 | + $(BSD_INSTALL_DATA) COPYING $(DESTDIR)$(DOCDIR) | 43 | + $(BSD_INSTALL_DATA) COPYING $(DESTDIR)$(DOCDIR) | |
39 | + $(BSD_INSTALL_DATA) README $(DESTDIR)$(DOCDIR) | 44 | + $(BSD_INSTALL_DATA) README $(DESTDIR)$(DOCDIR) | |
40 | + $(BSD_INSTALL_MAN) chrony.1 $(DESTDIR)$(MANDIR)/man1 | 45 | + $(BSD_INSTALL_MAN) chrony.1 $(DESTDIR)$(MANDIR)/man1 | |
41 | + $(BSD_INSTALL_MAN) chronyc.1 $(DESTDIR)$(MANDIR)/man1 | 46 | + $(BSD_INSTALL_MAN) chronyc.1 $(DESTDIR)$(MANDIR)/man1 | |
42 | + $(BSD_INSTALL_MAN) chronyd.8 $(DESTDIR)$(MANDIR)/man8/chronyd.8 | 47 | + $(BSD_INSTALL_MAN) chronyd.8 $(DESTDIR)$(MANDIR)/man8/chronyd.8 | |
43 | + $(BSD_INSTALL_MAN) chrony.conf.5 $(DESTDIR)$(MANDIR)/man5/chrony.conf.5 | 48 | + $(BSD_INSTALL_MAN) chrony.conf.5 $(DESTDIR)$(MANDIR)/man5/chrony.conf.5 | |
44 | 49 | |||
45 | %.o : %.c | 50 | %.o : %.c | |
51 | $(CC) $(CFLAGS) $(CPPFLAGS) -c $< |
@@ -1,28 +1,34 @@ | @@ -1,28 +1,34 @@ | |||
1 | $NetBSD: patch-ab,v 1.4 2010/02/26 09:27:43 hannken Exp $ | 1 | $NetBSD: patch-ab,v 1.5 2013/08/16 08:30:20 hannken Exp $ | |
2 | 2 | |||
3 | --- chrony.conf.5.orig 2010-02-04 13:07:19.000000000 +0100 | 3 | The ctype functions work on integers. | |
4 | +++ chrony.conf.5 | 4 | ||
5 | @@ -4,5 +4,5 @@ | 5 | --- cmdparse.c.orig 2013-08-08 13:58:07.000000000 +0000 | |
6 | +++ cmdparse.c | |||
7 | @@ -203,7 +203,7 @@ CPS_NormalizeLine(char *line) | |||
8 | ||||
9 | /* Remove white-space at beginning and replace white-spaces with space char */ | |||
10 | for (p = q = line; *p; p++) { | |||
11 | - if (isspace(*p)) { | |||
12 | + if (isspace((unsigned char)(*p))) { | |||
13 | if (!space) | |||
14 | *q++ = ' '; | |||
15 | space = 1; | |||
16 | @@ -233,15 +233,15 @@ CPS_SplitWord(char *line) | |||
17 | char *p = line, *q = line; | |||
6 | 18 | |||
7 | .SH SYNOPSIS | 19 | /* Skip white-space before the word */ | |
8 | -.B /etc/chrony.conf | 20 | - while (*q && isspace(*q)) | |
9 | +.B @PKG_SYSCONFDIR@/chrony.conf | 21 | + while (*q && isspace((unsigned char)(*q))) | |
22 | q++; | |||
10 | 23 | |||
11 | .SH DESCRIPTION | 24 | /* Move the word to the beginning */ | |
12 | @@ -13,5 +13,5 @@ | 25 | - while (*q && !isspace(*q)) | |
13 | Assuming that you have found some servers, you need to set up a | 26 | + while (*q && !isspace((unsigned char)(*q))) | |
14 | configuration file to run \fIchrony\fR. The (compiled-in) default location | 27 | *p++ = *q++; | |
15 | -for this file is \fB/etc/chrony.conf\fR. Assuming that your ntp servers | |||
16 | +for this file is \fB@PKG_SYSCONFDIR@/chrony.conf\fR. Assuming that your ntp servers | |||
17 | are called `a.b.c' and `d.e.f', your \fBchrony.conf\fR file could contain | |||
18 | as a minimum | |||
19 | @@ -30,7 +30,7 @@ | |||
20 | server d.e.f | |||
21 | server g.h.i | |||
22 | - keyfile /etc/chrony.keys | |||
23 | + keyfile @PKG_SYSCONFDIR@/chrony.keys | |||
24 | commandkey 1 | |||
25 | - driftfile /etc/chrony.drift | |||
26 | + driftfile @VARBASE@/db/chrony.drift | |||
27 | 28 | |||
29 | /* Find the next word */ | |||
30 | - while (*q && isspace(*q)) | |||
31 | + while (*q && isspace((unsigned char)(*q))) | |||
32 | q++; | |||
28 | 33 | |||
34 | *p = '\0'; |
@@ -1,29 +1,14 @@ | @@ -1,29 +1,14 @@ | |||
1 | $NetBSD: patch-ac,v 1.4 2010/02/26 09:27:43 hannken Exp $ | 1 | $NetBSD: patch-ac,v 1.5 2013/08/16 08:30:20 hannken Exp $ | |
2 | 2 | |||
3 | --- chronyd.8.orig 2010-02-04 13:07:19.000000000 +0100 | 3 | Remove unused variable. | |
4 | +++ chronyd.8 | 4 | ||
5 | @@ -25,8 +25,8 @@ | 5 | --- sys_netbsd.c.orig 2013-08-08 13:58:07.000000000 +0000 | |
6 | 6 | +++ sys_netbsd.c | ||
7 | If \fBchronyd\fR has been installed to its default location | 7 | @@ -281,7 +281,6 @@ SYS_NetBSD_Initialise(void) | |
8 | -\fI/usr/local/sbin/chronyd\fR, starting it is simply a matter of entering the | 8 | }; | |
9 | +\fI@PREFIX@/sbin/chronyd\fR, starting it is simply a matter of entering the | |||
10 | command: | |||
11 | ||||
12 | -\fI/usr/local/sbin/chronyd\fR | |||
13 | +\fI@PREFIX@/sbin/chronyd\fR | |||
14 | ||||
15 | Information messages and warnings will be logged to syslog. | |||
16 | @@ -53,5 +53,5 @@ | |||
17 | \fB\-f\fR \fIconf-file\fR | |||
18 | This option can be used to specify an alternate location for the | |||
19 | -configuration file (default \fI/etc/chrony.conf\fR). | |||
20 | +configuration file (default \fI@PKG_SYSCONFDIR@/chrony.conf\fR). | |||
21 | .TP | |||
22 | .B \-r | |||
23 | @@ -103,5 +103,5 @@ | |||
24 | 9 | |||
25 | .SH FILES | 10 | kvm_t *kt; | |
26 | -\fI/etc/chrony.conf\fR | 11 | - FILE *fp; | |
27 | +\fI@PKG_SYSCONFDIR@/chrony.conf\fR | |||
28 | 12 | |||
29 | .SH VERSION | 13 | kt = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL); | |
14 | if (!kt) { |
@@ -1,32 +1,42 @@ | @@ -1,32 +1,42 @@ | |||
1 | $NetBSD: patch-ae,v 1.4 2010/02/26 09:27:43 hannken Exp $ | 1 | $NetBSD: patch-ae,v 1.5 2013/08/16 08:30:20 hannken Exp $ | |
2 | 2 | |||
3 | --- examples/chrony.conf.example.orig 2010-02-04 13:07:19.000000000 +0100 | 3 | Prepare for SUBST, not processed by configure. | |
4 | +++ examples/chrony.conf.example 2010-02-26 09:06:48.000000000 +0100 | 4 | ||
5 | @@ -2,5 +2,5 @@ | 5 | --- examples/chrony.conf.example.orig 2013-08-08 13:58:07.000000000 +0000 | |
6 | +++ examples/chrony.conf.example | |||
7 | @@ -1,7 +1,7 @@ | |||
8 | ####################################################################### | |||
6 | # | 9 | # | |
7 | # This is an example chrony configuration file. You should copy it to | 10 | # This is an example chrony configuration file. You should copy it to | |
8 | -# /etc/chrony.conf after uncommenting and editing the options that you | 11 | -# /etc/chrony.conf after uncommenting and editing the options that you | |
9 | +# @PKG_SYSCONFDIR@/chrony.conf after uncommenting and editing the options that you | 12 | +# @PKG_SYSCONFDIR@/chrony.conf after uncommenting and editing the options that you | |
10 | # want to enable. The more obscure options are not included. Refer | 13 | # want to enable. The more obscure options are not included. Refer | |
11 | # to the documentation for these. | 14 | # to the documentation for these. | |
12 | @@ -90,5 +90,5 @@ | 15 | # | |
16 | @@ -89,7 +89,7 @@ | |||
17 | # immediately so that it doesn't gain or lose any more time. You | |||
13 | # generally want this, so it is uncommented. | 18 | # generally want this, so it is uncommented. | |
14 | 19 | |||
15 | -driftfile /etc/chrony.drift | 20 | -driftfile /var/lib/chrony/drift | |
16 | +driftfile @VARBASE@/db/chrony.drift | 21 | +driftfile @VARBASE@/lib/chrony/chrony.drift | |
17 | 22 | |||
18 | # If you want to use the program called chronyc to configure aspects of | 23 | # If you want to use the program called chronyc to configure aspects of | |
19 | @@ -99,5 +99,5 @@ | 24 | # chronyd's operation once it is running (e.g. tell it the Internet link | |
25 | @@ -98,7 +98,7 @@ driftfile /var/lib/chrony/drift | |||
26 | # exchanges between cooperating machines.) Again, this option is | |||
20 | # assumed by default. | 27 | # assumed by default. | |
21 | 28 | |||
22 | -keyfile /etc/chrony.keys | 29 | -keyfile /etc/chrony.keys | |
23 | +keyfile @PKG_SYSCONFDIR@/chrony.keys | 30 | +keyfile @PKG_SYSCONFDIR@/chrony.keys | |
24 | 31 | |||
25 | # Tell chronyd which numbered key in the file is used as the password | 32 | # Tell chronyd which numbered key in the file is used as the password | |
26 | @@ -130,5 +130,5 @@ | 33 | # for chronyc. (You can pick any integer up to 2**32-1. '1' is just a | |
34 | @@ -129,7 +129,7 @@ commandkey 1 | |||
35 | # still running and bail out. If you want to change the path to the PID | |||
27 | # file, uncomment this line and edit it. The default path is shown. | 36 | # file, uncomment this line and edit it. The default path is shown. | |
28 | 37 | |||
29 | -! pidfile /var/run/chronyd.pid | 38 | -! pidfile /var/run/chronyd.pid | |
30 | +! pidfile @VARBASE@/run/chronyd.pid | 39 | +! pidfile @VARBASE@/run/chronyd.pid | |
31 | 40 | |||
32 | ####################################################################### | 41 | ####################################################################### | |
42 | ### INITIAL CLOCK CORRECTION |
@@ -1,11 +1,15 @@ | @@ -1,11 +1,15 @@ | |||
1 | $NetBSD: patch-ad,v 1.3 2010/02/26 09:27:43 hannken Exp $ | 1 | $NetBSD: patch-ad,v 1.4 2013/08/16 08:30:20 hannken Exp $ | |
2 | 2 | |||
3 | --- conf.c.orig 2010-02-04 13:07:19.000000000 +0100 | 3 | Prepare for SUBST, not processed by configure. | |
4 | ||||
5 | --- conf.c.orig 2013-08-08 13:58:07.000000000 +0000 | |||
4 | +++ conf.c | 6 | +++ conf.c | |
5 | @@ -177,5 +177,5 @@ | 7 | @@ -197,7 +197,7 @@ static IPAddr bind_cmd_address4, bind_cm | |
8 | ||||
6 | /* Filename to use for storing pid of running chronyd, to prevent multiple | 9 | /* Filename to use for storing pid of running chronyd, to prevent multiple | |
7 | * chronyds being started. */ | 10 | * chronyds being started. */ | |
8 | -static char *pidfile = "/var/run/chronyd.pid"; | 11 | -static char *pidfile = "/var/run/chronyd.pid"; | |
9 | +static char *pidfile = "@VARBASE@/run/chronyd.pid"; | 12 | +static char *pidfile = "@VARBASE@/run/chronyd.pid"; | |
10 | 13 | |||
11 | /* Boolean for whether the Linux HZ value has been overridden, and the | 14 | /* Temperature sensor, update interval and compensation coefficients */ | |
15 | static char *tempcomp_file = NULL; |
@@ -1,9 +1,14 @@ | @@ -1,9 +1,14 @@ | |||
1 | $NetBSD: patch-af,v 1.3 2006/01/08 13:27:53 joerg Exp $ | 1 | $NetBSD: patch-af,v 1.4 2013/08/16 08:30:20 hannken Exp $ | |
2 | 2 | |||
3 | --- examples/chrony.keys.example.orig 2002-01-31 01:00:08.000000000 +0100 | 3 | Prepare for SUBST, not processed by configure. | |
4 | ||||
5 | --- examples/chrony.keys.example.orig 2013-08-08 13:58:07.000000000 +0000 | |||
4 | +++ examples/chrony.keys.example | 6 | +++ examples/chrony.keys.example | |
5 | @@ -3,3 +3,3 @@ | 7 | @@ -1,6 +1,6 @@ | |
8 | ####################################################################### | |||
6 | # | 9 | # | |
7 | -# This is an example chrony keys file. You should copy it to /etc/chrony.keys | 10 | -# This is an example chrony keys file. You should copy it to /etc/chrony.keys | |
8 | +# This is an example chrony keys file. You should copy it to @PKG_SYSCONFDIR@/chrony.keys | 11 | +# This is an example chrony keys file. You should copy it to @PKG_SYSCONFDIR@/chrony.keys | |
9 | # after editing it to set up the key(s) you want to use. In most situations, | 12 | # after editing it to set up the key(s) you want to use. It should be readable | |
13 | # only by root or the user chronyd drops the root privileges to. In most | |||
14 | # situations, you will require a single key (the 'commandkey') so that you can |
$NetBSD: patch-ag,v 1.4 2013/08/16 08:30:20 hannken Exp $
The ctype functions work on integers.
--- getdate.c.orig 2013-08-08 13:58:07.000000000 +0000
+++ getdate.c
@@ -2547,7 +2547,7 @@ LookupWord (buff)
/* Make it lowercase. */
for (p = buff; *p; p++)
if (ISUPPER ((unsigned char) *p))
- *p = tolower (*p);
+ *p = tolower ((unsigned char)(*p));
if (strcmp (buff, "am") == 0 || strcmp (buff, "a.m.") == 0)
{