diff options
author | hannken <hannken@pkgsrc.org> | 2013-08-16 08:30:20 +0000 |
---|---|---|
committer | hannken <hannken@pkgsrc.org> | 2013-08-16 08:30:20 +0000 |
commit | ee0a164ce999f95b775fd3a4c0a83036f52e7fbd (patch) | |
tree | 50f71aae0f46e6a12dd39d6fc43f5f732c9f94ee /net/chrony | |
parent | d964aa054b392783e12feac72981fd89f31f7e3e (diff) | |
download | pkgsrc-ee0a164ce999f95b775fd3a4c0a83036f52e7fbd.tar.gz |
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>
Diffstat (limited to 'net/chrony')
-rw-r--r-- | net/chrony/Makefile | 21 | ||||
-rw-r--r-- | net/chrony/PLIST | 12 | ||||
-rw-r--r-- | net/chrony/distinfo | 21 | ||||
-rw-r--r-- | net/chrony/files/chronyd.sh | 4 | ||||
-rw-r--r-- | net/chrony/patches/patch-aa | 16 | ||||
-rw-r--r-- | net/chrony/patches/patch-ab | 52 | ||||
-rw-r--r-- | net/chrony/patches/patch-ac | 37 | ||||
-rw-r--r-- | net/chrony/patches/patch-ad | 12 | ||||
-rw-r--r-- | net/chrony/patches/patch-ae | 28 | ||||
-rw-r--r-- | net/chrony/patches/patch-af | 13 | ||||
-rw-r--r-- | net/chrony/patches/patch-ag | 15 |
11 files changed, 132 insertions, 99 deletions
diff --git a/net/chrony/Makefile b/net/chrony/Makefile index 761f47f9555..8bf9e272f95 100644 --- a/net/chrony/Makefile +++ b/net/chrony/Makefile @@ -1,36 +1,37 @@ -# $NetBSD: Makefile,v 1.28 2013/07/15 02:02:26 ryoon Exp $ +# $NetBSD: Makefile,v 1.29 2013/08/16 08:30:20 hannken Exp $ -DISTNAME= chrony-1.24 +DISTNAME= chrony-1.29 CATEGORIES= net MASTER_SITES= http://download.tuxfamily.org/chrony/ MAINTAINER= hannken@NetBSD.org HOMEPAGE= http://chrony.tuxfamily.org/ COMMENT= Daemon for maintaining the accuracy of computer clocks +LICENSE= gnu-gpl-v2 USE_TOOLS+= gmake HAS_CONFIGURE= YES BUILD_DEFS+= VARBASE -CONFIGURE_ARGS+= --prefix=${PREFIX:Q} -CONFIGURE_ARGS+= --mandir=${PREFIX:Q}/${PKGMANDIR:Q} -CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} +CONFIGURE_ARGS+= --prefix=${PREFIX} +CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR} +CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} +CONFIGURE_ARGS+= --localstatedir=${VARBASE} AUTO_MKDIRS= yes +OWN_DIRS= ${VARBASE}/lib/chrony + EGDIR= ${PREFIX}/share/examples/chrony EGFILES= chrony.conf.example chrony.keys.example RCD_SCRIPTS= chronyd SUBST_CLASSES+= paths -SUBST_FILES.paths= ${EGFILES:S/^/examples\//} conf.c chrony.conf.5 \ - chronyd.8 -SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g' +SUBST_FILES.paths= ${EGFILES:S/^/examples\//} conf.c SUBST_SED.paths+= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g' SUBST_SED.paths+= -e 's,@VARBASE@,${VARBASE},g' SUBST_STAGE.paths= post-patch post-install: - ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR} - for file in ${EGFILES}; do \ + set -e; for file in ${EGFILES}; do \ ${INSTALL_DATA} ${WRKSRC}/examples/$${file} \ ${DESTDIR}${EGDIR}/$${file}; \ done diff --git a/net/chrony/PLIST b/net/chrony/PLIST index 39cd34d4bc5..5e496e7604e 100644 --- a/net/chrony/PLIST +++ b/net/chrony/PLIST @@ -1,13 +1,13 @@ -@comment $NetBSD: PLIST,v 1.4 2009/06/14 18:09:23 joerg Exp $ +@comment $NetBSD: PLIST,v 1.5 2013/08/16 08:30:20 hannken Exp $ bin/chronyc -share/doc/chrony/COPYING -share/doc/chrony/README -share/doc/chrony/chrony.txt -share/examples/chrony/chrony.conf.example -share/examples/chrony/chrony.keys.example man/man1/chrony.1 man/man1/chronyc.1 man/man5/chrony.conf.5 man/man8/chronyd.8 sbin/chronyd +share/doc/chrony/COPYING +share/doc/chrony/README +share/doc/chrony/chrony.txt +share/examples/chrony/chrony.conf.example +share/examples/chrony/chrony.keys.example share/examples/rc.d/chronyd diff --git a/net/chrony/distinfo b/net/chrony/distinfo index 29a52a2e6d3..384c535e518 100644 --- a/net/chrony/distinfo +++ b/net/chrony/distinfo @@ -1,11 +1,12 @@ -$NetBSD: distinfo,v 1.7 2010/02/26 09:27:43 hannken Exp $ +$NetBSD: distinfo,v 1.8 2013/08/16 08:30:20 hannken Exp $ -SHA1 (chrony-1.24.tar.gz) = 6e17d7b8cdd3508751713bd2279202b75643e268 -RMD160 (chrony-1.24.tar.gz) = a393c3f51d99a24a1aefd1653575de5a6c642191 -Size (chrony-1.24.tar.gz) = 364311 bytes -SHA1 (patch-aa) = 1fe34e98bcdf70686e3e38bf88bfdbbe9f27b42d -SHA1 (patch-ab) = efec09e45ea46c7f700a507a565e27a3d9c38f78 -SHA1 (patch-ac) = e6676efc4151b394451b7de64d44351789892561 -SHA1 (patch-ad) = 621626000457731ac89778d41200e9046a4edb25 -SHA1 (patch-ae) = a1efbc23807fa74c5393946400fa2565af12e7c5 -SHA1 (patch-af) = 3d09c0aba56bdce704a923ae7c15673cdb6a7489 +SHA1 (chrony-1.29.tar.gz) = 442fb7d62a6f23bf1057864a3dbdfa55e1b6eb35 +RMD160 (chrony-1.29.tar.gz) = 53518efdd90c4695005d7cc929077985f16887d7 +Size (chrony-1.29.tar.gz) = 392880 bytes +SHA1 (patch-aa) = c28f5b7ff6c3ebc67b68d574c1b10bd54334b6a3 +SHA1 (patch-ab) = 1af7c5699147d4c05165c4e1f90bf127814511ce +SHA1 (patch-ac) = 5830215f11573ca88541f661fffb17365e7d206c +SHA1 (patch-ad) = df47df974995f9f947b731a4812fb7633fd874a4 +SHA1 (patch-ae) = 133e90d0614ef5961305b952d9a7a4047a2edcc7 +SHA1 (patch-af) = 43c5e0f14aa8a980af83ba4ea5691705a4738064 +SHA1 (patch-ag) = 165daaab8507cca8b29a61af576711c0ec05a3a6 diff --git a/net/chrony/files/chronyd.sh b/net/chrony/files/chronyd.sh index 578a5c5b981..ecf76044d56 100644 --- a/net/chrony/files/chronyd.sh +++ b/net/chrony/files/chronyd.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: chronyd.sh,v 1.4 2002/09/23 07:04:39 grant Exp $ +# $NetBSD: chronyd.sh,v 1.5 2013/08/16 08:30:20 hannken Exp $ # # PROVIDE: chronyd # REQUIRE: DAEMON @@ -9,7 +9,7 @@ name="chronyd" command="@PREFIX@/sbin/${name}" -pidfile="/var/run/${name}.pid" +pidfile="@VARBASE@/run/${name}.pid" required_files="@PKG_SYSCONFDIR@/chrony.conf" extra_commands="online offline" online_cmd="chronyd_online" diff --git a/net/chrony/patches/patch-aa b/net/chrony/patches/patch-aa index 122ab232570..f825d251641 100644 --- a/net/chrony/patches/patch-aa +++ b/net/chrony/patches/patch-aa @@ -1,17 +1,22 @@ -$NetBSD: patch-aa,v 1.4 2010/02/26 09:27:43 hannken Exp $ +$NetBSD: patch-aa,v 1.5 2013/08/16 08:30:20 hannken Exp $ ---- Makefile.in.orig 2010-02-04 13:07:19.000000000 +0100 +Adapt install target for pkgsrc. + +--- Makefile.in.orig 2013-08-08 13:58:07.000000000 +0000 +++ Makefile.in -@@ -104,31 +104,14 @@ +@@ -93,35 +93,17 @@ getdate : + # seem to vary between systems. install: chronyd chronyc +- [ -d $(DESTDIR)$(SYSCONFDIR) ] || mkdir -p $(DESTDIR)$(SYSCONFDIR) - [ -d $(DESTDIR)$(SBINDIR) ] || mkdir -p $(DESTDIR)$(SBINDIR) - [ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) - [ -d $(DESTDIR)$(DOCDIR) ] || mkdir -p $(DESTDIR)$(DOCDIR) +- [ -d $(DESTDIR)$(DOCDIR) ] || mkdir -p $(DESTDIR)$(DOCDIR) - [ -d $(DESTDIR)$(MANDIR)/man1 ] || mkdir -p $(DESTDIR)$(MANDIR)/man1 - [ -d $(DESTDIR)$(MANDIR)/man5 ] || mkdir -p $(DESTDIR)$(MANDIR)/man5 - [ -d $(DESTDIR)$(MANDIR)/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/man8 -- [ -d $(DESTDIR)$(DOCDIR) ] || mkdir -p $(DESTDIR)$(DOCDIR) + [ -d $(DESTDIR)$(DOCDIR) ] || mkdir -p $(DESTDIR)$(DOCDIR) + [ -d $(DESTDIR)$(CHRONYVARDIR) ] || mkdir -p $(DESTDIR)$(CHRONYVARDIR) - if [ -f $(DESTDIR)$(SBINDIR)/chronyd ]; then rm -f $(DESTDIR)$(SBINDIR)/chronyd ; fi - if [ -f $(DESTDIR)$(BINDIR)/chronyc ]; then rm -f $(DESTDIR)$(BINDIR)/chronyc ; fi - cp chronyd $(DESTDIR)$(SBINDIR)/chronyd @@ -43,3 +48,4 @@ $NetBSD: patch-aa,v 1.4 2010/02/26 09:27:43 hannken Exp $ + $(BSD_INSTALL_MAN) chrony.conf.5 $(DESTDIR)$(MANDIR)/man5/chrony.conf.5 %.o : %.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c $< diff --git a/net/chrony/patches/patch-ab b/net/chrony/patches/patch-ab index 7a264530e09..00fdce9abe9 100644 --- a/net/chrony/patches/patch-ab +++ b/net/chrony/patches/patch-ab @@ -1,28 +1,34 @@ -$NetBSD: patch-ab,v 1.4 2010/02/26 09:27:43 hannken Exp $ +$NetBSD: patch-ab,v 1.5 2013/08/16 08:30:20 hannken Exp $ ---- chrony.conf.5.orig 2010-02-04 13:07:19.000000000 +0100 -+++ chrony.conf.5 -@@ -4,5 +4,5 @@ +The ctype functions work on integers. + +--- cmdparse.c.orig 2013-08-08 13:58:07.000000000 +0000 ++++ cmdparse.c +@@ -203,7 +203,7 @@ CPS_NormalizeLine(char *line) + + /* Remove white-space at beginning and replace white-spaces with space char */ + for (p = q = line; *p; p++) { +- if (isspace(*p)) { ++ if (isspace((unsigned char)(*p))) { + if (!space) + *q++ = ' '; + space = 1; +@@ -233,15 +233,15 @@ CPS_SplitWord(char *line) + char *p = line, *q = line; - .SH SYNOPSIS --.B /etc/chrony.conf -+.B @PKG_SYSCONFDIR@/chrony.conf + /* Skip white-space before the word */ +- while (*q && isspace(*q)) ++ while (*q && isspace((unsigned char)(*q))) + q++; - .SH DESCRIPTION -@@ -13,5 +13,5 @@ - Assuming that you have found some servers, you need to set up a - configuration file to run \fIchrony\fR. The (compiled-in) default location --for this file is \fB/etc/chrony.conf\fR. Assuming that your ntp servers -+for this file is \fB@PKG_SYSCONFDIR@/chrony.conf\fR. Assuming that your ntp servers - are called `a.b.c' and `d.e.f', your \fBchrony.conf\fR file could contain - as a minimum -@@ -30,7 +30,7 @@ - server d.e.f - server g.h.i -- keyfile /etc/chrony.keys -+ keyfile @PKG_SYSCONFDIR@/chrony.keys - commandkey 1 -- driftfile /etc/chrony.drift -+ driftfile @VARBASE@/db/chrony.drift + /* Move the word to the beginning */ +- while (*q && !isspace(*q)) ++ while (*q && !isspace((unsigned char)(*q))) + *p++ = *q++; + /* Find the next word */ +- while (*q && isspace(*q)) ++ while (*q && isspace((unsigned char)(*q))) + q++; + *p = '\0'; diff --git a/net/chrony/patches/patch-ac b/net/chrony/patches/patch-ac index 6f650b69daf..4f3acb3e40d 100644 --- a/net/chrony/patches/patch-ac +++ b/net/chrony/patches/patch-ac @@ -1,29 +1,14 @@ -$NetBSD: patch-ac,v 1.4 2010/02/26 09:27:43 hannken Exp $ +$NetBSD: patch-ac,v 1.5 2013/08/16 08:30:20 hannken Exp $ ---- chronyd.8.orig 2010-02-04 13:07:19.000000000 +0100 -+++ chronyd.8 -@@ -25,8 +25,8 @@ - - If \fBchronyd\fR has been installed to its default location --\fI/usr/local/sbin/chronyd\fR, starting it is simply a matter of entering the -+\fI@PREFIX@/sbin/chronyd\fR, starting it is simply a matter of entering the - command: - --\fI/usr/local/sbin/chronyd\fR -+\fI@PREFIX@/sbin/chronyd\fR - - Information messages and warnings will be logged to syslog. -@@ -53,5 +53,5 @@ - \fB\-f\fR \fIconf-file\fR - This option can be used to specify an alternate location for the --configuration file (default \fI/etc/chrony.conf\fR). -+configuration file (default \fI@PKG_SYSCONFDIR@/chrony.conf\fR). - .TP - .B \-r -@@ -103,5 +103,5 @@ +Remove unused variable. + +--- sys_netbsd.c.orig 2013-08-08 13:58:07.000000000 +0000 ++++ sys_netbsd.c +@@ -281,7 +281,6 @@ SYS_NetBSD_Initialise(void) + }; - .SH FILES --\fI/etc/chrony.conf\fR -+\fI@PKG_SYSCONFDIR@/chrony.conf\fR + kvm_t *kt; +- FILE *fp; - .SH VERSION + kt = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL); + if (!kt) { diff --git a/net/chrony/patches/patch-ad b/net/chrony/patches/patch-ad index 6c56dda2cbb..f0f8a81ba1a 100644 --- a/net/chrony/patches/patch-ad +++ b/net/chrony/patches/patch-ad @@ -1,11 +1,15 @@ -$NetBSD: patch-ad,v 1.3 2010/02/26 09:27:43 hannken Exp $ +$NetBSD: patch-ad,v 1.4 2013/08/16 08:30:20 hannken Exp $ ---- conf.c.orig 2010-02-04 13:07:19.000000000 +0100 +Prepare for SUBST, not processed by configure. + +--- conf.c.orig 2013-08-08 13:58:07.000000000 +0000 +++ conf.c -@@ -177,5 +177,5 @@ +@@ -197,7 +197,7 @@ static IPAddr bind_cmd_address4, bind_cm + /* Filename to use for storing pid of running chronyd, to prevent multiple * chronyds being started. */ -static char *pidfile = "/var/run/chronyd.pid"; +static char *pidfile = "@VARBASE@/run/chronyd.pid"; - /* Boolean for whether the Linux HZ value has been overridden, and the + /* Temperature sensor, update interval and compensation coefficients */ + static char *tempcomp_file = NULL; diff --git a/net/chrony/patches/patch-ae b/net/chrony/patches/patch-ae index 5483daf8d79..99d84fe8027 100644 --- a/net/chrony/patches/patch-ae +++ b/net/chrony/patches/patch-ae @@ -1,32 +1,42 @@ -$NetBSD: patch-ae,v 1.4 2010/02/26 09:27:43 hannken Exp $ +$NetBSD: patch-ae,v 1.5 2013/08/16 08:30:20 hannken Exp $ ---- examples/chrony.conf.example.orig 2010-02-04 13:07:19.000000000 +0100 -+++ examples/chrony.conf.example 2010-02-26 09:06:48.000000000 +0100 -@@ -2,5 +2,5 @@ +Prepare for SUBST, not processed by configure. + +--- examples/chrony.conf.example.orig 2013-08-08 13:58:07.000000000 +0000 ++++ examples/chrony.conf.example +@@ -1,7 +1,7 @@ + ####################################################################### # # This is an example chrony configuration file. You should copy it to -# /etc/chrony.conf after uncommenting and editing the options that you +# @PKG_SYSCONFDIR@/chrony.conf after uncommenting and editing the options that you # want to enable. The more obscure options are not included. Refer # to the documentation for these. -@@ -90,5 +90,5 @@ + # +@@ -89,7 +89,7 @@ + # immediately so that it doesn't gain or lose any more time. You # generally want this, so it is uncommented. --driftfile /etc/chrony.drift -+driftfile @VARBASE@/db/chrony.drift +-driftfile /var/lib/chrony/drift ++driftfile @VARBASE@/lib/chrony/chrony.drift # If you want to use the program called chronyc to configure aspects of -@@ -99,5 +99,5 @@ + # chronyd's operation once it is running (e.g. tell it the Internet link +@@ -98,7 +98,7 @@ driftfile /var/lib/chrony/drift + # exchanges between cooperating machines.) Again, this option is # assumed by default. -keyfile /etc/chrony.keys +keyfile @PKG_SYSCONFDIR@/chrony.keys # Tell chronyd which numbered key in the file is used as the password -@@ -130,5 +130,5 @@ + # for chronyc. (You can pick any integer up to 2**32-1. '1' is just a +@@ -129,7 +129,7 @@ commandkey 1 + # still running and bail out. If you want to change the path to the PID # file, uncomment this line and edit it. The default path is shown. -! pidfile /var/run/chronyd.pid +! pidfile @VARBASE@/run/chronyd.pid ####################################################################### + ### INITIAL CLOCK CORRECTION diff --git a/net/chrony/patches/patch-af b/net/chrony/patches/patch-af index 29096a7338d..250291b4831 100644 --- a/net/chrony/patches/patch-af +++ b/net/chrony/patches/patch-af @@ -1,9 +1,14 @@ -$NetBSD: patch-af,v 1.3 2006/01/08 13:27:53 joerg Exp $ +$NetBSD: patch-af,v 1.4 2013/08/16 08:30:20 hannken Exp $ ---- examples/chrony.keys.example.orig 2002-01-31 01:00:08.000000000 +0100 +Prepare for SUBST, not processed by configure. + +--- examples/chrony.keys.example.orig 2013-08-08 13:58:07.000000000 +0000 +++ examples/chrony.keys.example -@@ -3,3 +3,3 @@ +@@ -1,6 +1,6 @@ + ####################################################################### # -# This is an example chrony keys file. You should copy it to /etc/chrony.keys +# This is an example chrony keys file. You should copy it to @PKG_SYSCONFDIR@/chrony.keys - # after editing it to set up the key(s) you want to use. In most situations, + # after editing it to set up the key(s) you want to use. It should be readable + # only by root or the user chronyd drops the root privileges to. In most + # situations, you will require a single key (the 'commandkey') so that you can diff --git a/net/chrony/patches/patch-ag b/net/chrony/patches/patch-ag new file mode 100644 index 00000000000..a2569ac370b --- /dev/null +++ b/net/chrony/patches/patch-ag @@ -0,0 +1,15 @@ +$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) + { |