rpms/ntp/F-8 ntp-4.2.4p4-bcast.patch, NONE, 1.1 ntp-4.2.4p4-bsdadv.patch, NONE, 1.1 ntp-4.2.4p4-cmsgalign.patch, NONE, 1.1 ntp-4.2.4p4-kernel.patch, NONE, 1.1 ntp-4.2.4p4-mlock.patch, NONE, 1.1 ntp-4.2.4p4-multilisten.patch, NONE, 1.1 ntp-4.2.4-htmldoc.patch, 1.3, 1.4 ntp.spec, 1.73, 1.74 sources, 1.26, 1.27 ntp-4.2.4p0-bcast.patch, 1.1, NONE ntp-4.2.4p2-loopback.patch, 1.1, NONE ntp-4.2.4p2-mlock.patch, 1.1, NONE ntp-4.2.4p2-multilisten.patch, 1.1, NONE

Miroslav Lichvar (mlichvar) fedora-extras-commits at redhat.com
Tue Apr 15 14:15:59 UTC 2008


Author: mlichvar

Update of /cvs/pkgs/rpms/ntp/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16680

Modified Files:
	ntp-4.2.4-htmldoc.patch ntp.spec sources 
Added Files:
	ntp-4.2.4p4-bcast.patch ntp-4.2.4p4-bsdadv.patch 
	ntp-4.2.4p4-cmsgalign.patch ntp-4.2.4p4-kernel.patch 
	ntp-4.2.4p4-mlock.patch ntp-4.2.4p4-multilisten.patch 
Removed Files:
	ntp-4.2.4p0-bcast.patch ntp-4.2.4p2-loopback.patch 
	ntp-4.2.4p2-mlock.patch ntp-4.2.4p2-multilisten.patch 
Log Message:
- update to 4.2.4p4
- reset kernel frequency when -x option is used
- avoid unaligned memory access (#435301)
- add note about paths and exit codes to ntpd man page
- fix default NTP version for outgoing packets in ntpdate man page
  (#245408)
- replace BSD with advertising code in ntpdc and ntpq


ntp-4.2.4p4-bcast.patch:

--- NEW FILE ntp-4.2.4p4-bcast.patch ---
https://ntp.isc.org/bugs/show_bug.cgi?id=779
https://ntp.isc.org/bugs/show_bug.cgi?id=823

diff -up ntp-4.2.4p4/ntpd/ntp_peer.c.bcast ntp-4.2.4p4/ntpd/ntp_peer.c
--- ntp-4.2.4p4/ntpd/ntp_peer.c.bcast	2007-05-27 13:02:49.000000000 +0200
+++ ntp-4.2.4p4/ntpd/ntp_peer.c	2007-10-25 15:08:01.000000000 +0200
@@ -705,7 +705,8 @@ select_peerinterface(struct peer *peer, 
 	 * as our (network) source address would be undefined and
 	 * crypto will not work without knowing the own transmit address
 	 */
-	if (interface != NULL && interface->flags & INT_WILDCARD)
+	if (interface != NULL && interface->flags & INT_WILDCARD &&
+			!(cast_flags & MDF_BCAST))
 		interface = NULL;
 
 	return interface;
diff -up ntp-4.2.4p4/ntpd/ntp_io.c.bcast ntp-4.2.4p4/ntpd/ntp_io.c
--- ntp-4.2.4p4/ntpd/ntp_io.c.bcast	2007-10-25 15:08:01.000000000 +0200
+++ ntp-4.2.4p4/ntpd/ntp_io.c	2007-10-25 15:20:58.000000000 +0200
@@ -145,6 +145,8 @@ int ninterfaces;			/* Total number of in
 
 volatile int disable_dynamic_updates;   /* when set to != 0 dynamic updates won't happen */
 
+static int pktinfo_status = 0;		/* is IP_PKTINFO on wildipv4 iface enabled? */
+
 #ifdef REFCLOCK
 /*
  * Refclock stuff.	We keep a chain of structures with data concerning
@@ -1538,6 +1540,18 @@ set_reuseaddr(int flag) {
 	}
 }
 
+static void
+set_pktinfo(int flag)
+{
+	if (wildipv4 == NULL)
+		return;
+	if (setsockopt(wildipv4->fd, SOL_IP, IP_PKTINFO, &flag, sizeof (flag))) {
+		if (debug > 1)
+			printf("setsockopt(IP_PKTINFO) failed: %s\n", strerror(errno));
+	} else
+		pktinfo_status = flag;
+}
+
 /*
  * This is just a wrapper around an internal function so we can
  * make other changes as necessary later on
@@ -1954,6 +1968,7 @@ io_setbclient(void)
 #else
 	netsyslog(LOG_ERR, "io_setbclient: Broadcast Client disabled by build");
 #endif
+	set_pktinfo(1);
 }
 
 /*
@@ -1976,6 +1991,7 @@ io_unsetbclient(void)
 		    continue;
 		lstatus = socket_broadcast_disable(interf, &interf->sin);
 	}
+	set_pktinfo(0);
 }
 
 /*
@@ -2868,7 +2884,8 @@ read_network_packet(SOCKET fd, struct in
 #ifdef HAVE_TIMESTAMP
 	struct msghdr msghdr;
 	struct iovec iovec;
-	char control[TIMESTAMP_CTLMSGBUF_SIZE];	/* pick up control messages */
+	char control[sizeof (struct cmsghdr) * 2 + sizeof (struct timeval) +
+		sizeof (struct in_pktinfo) + 32];	/* pick up control messages */
 #endif
 
 	/*
@@ -2880,7 +2897,7 @@ read_network_packet(SOCKET fd, struct in
 
 	rb = get_free_recv_buffer();
 
-	if (rb == NULL || itf->ignore_packets == ISC_TRUE)
+	if (rb == NULL || (itf->ignore_packets == ISC_TRUE && !(pktinfo_status && itf == wildipv4)))
 	{
 		char buf[RX_BUFF_SIZE];
 		struct sockaddr_storage from;
@@ -2942,6 +2959,34 @@ read_network_packet(SOCKET fd, struct in
 		return (buflen);
 	}
 
+	if (pktinfo_status && itf->ignore_packets == ISC_TRUE && itf == wildipv4) {
+		/* check for broadcast on 255.255.255.255, exception allowed on wildipv4 */
+		struct cmsghdr *cmsg;
+		struct in_pktinfo *pktinfo = NULL;
+
+		if ((cmsg = CMSG_FIRSTHDR(&msghdr)))
+			do {
+				if (cmsg->cmsg_level == SOL_IP && cmsg->cmsg_type == IP_PKTINFO)
+					pktinfo = (struct in_pktinfo *) CMSG_DATA(cmsg);
+			} while ((cmsg = CMSG_NXTHDR(&msghdr, cmsg)));
+		if (pktinfo && pktinfo->ipi_addr.s_addr == INADDR_BROADCAST) {
+#ifdef DEBUG
+			if (debug > 3) {
+				printf("INADDR_BROADCAST\n");
+			}
+#endif
+		} else {
+#ifdef DEBUG
+			if (debug > 3)
+				printf("%s on (%lu) fd=%d from %s\n", "ignore",
+						free_recvbuffs(), fd, stoa(&rb->recv_srcadr));
+#endif
+			packets_ignored++;
+			freerecvbuf(rb);
+			return (buflen);
+		}
+	}
+
 #ifdef DEBUG
 	if (debug > 2) {
 		if(rb->recv_srcadr.ss_family == AF_INET)

ntp-4.2.4p4-bsdadv.patch:

--- NEW FILE ntp-4.2.4p4-bsdadv.patch ---
diff -up ntp-4.2.4p4/include/ntp_random.h.bsdadv ntp-4.2.4p4/include/ntp_random.h
--- ntp-4.2.4p4/include/ntp_random.h.bsdadv	2006-06-06 22:16:18.000000000 +0200
+++ ntp-4.2.4p4/include/ntp_random.h	2007-10-26 13:57:38.000000000 +0200
@@ -1,14 +1,12 @@
+#include <stdlib.h>
 
-#include <ntp_types.h>
-
-long ntp_random P((void));
-void ntp_srandom P((unsigned long));
-void ntp_srandomdev P((void));
-char * ntp_initstate P((unsigned long, 	/* seed for R.N.G. */
-			char *,		/* pointer to state array */
-			long		/* # bytes of state info */
-			));
-char * ntp_setstate P((char *));	/* pointer to state array */
-
-
+#if RAND_MAX < 2147483647
+#error RAND_MAX < 2147483647
+#endif
 
+#if RAND_MAX == 2147483647
+#define ntp_random random
+#else
+#define ntp_random() (random() & 0x7fffffff)
+#endif
+#define ntp_srandom srandom
diff -up /dev/null ntp-4.2.4p4/include/md5.h
--- /dev/null	2007-08-14 18:13:05.327268775 +0200
+++ ntp-4.2.4p4/include/md5.h	2007-10-26 14:11:38.000000000 +0200
@@ -0,0 +1,23 @@
+#ifndef MD5_H
+#define MD5_H
+
+#include <inttypes.h>
+typedef uint32_t uint32;
+
+struct MD5Context {
+        uint32 buf[4];
+        uint32 bits[2];
+        unsigned char in[64];
+};
+
+extern void MD5Init(struct MD5Context *ctx);
+extern void MD5Update(struct MD5Context *ctx, unsigned char *buf, unsigned len);
+extern void MD5Final(unsigned char digest[16], struct MD5Context *ctx);
+extern void MD5Transform(uint32 buf[4], uint32 in[16]);
+
+/*
+ * This is needed to make RSAREF happy on some MS-DOS compilers.
+ */
+typedef struct MD5Context MD5_CTX;
+
+#endif /* !MD5_H */
diff -up ntp-4.2.4p4/include/ntp_rfc2553.h.bsdadv ntp-4.2.4p4/include/ntp_rfc2553.h
--- ntp-4.2.4p4/include/ntp_rfc2553.h.bsdadv	2007-10-26 13:43:07.000000000 +0200
+++ ntp-4.2.4p4/include/ntp_rfc2553.h	2007-10-26 13:43:07.000000000 +0200
@@ -0,0 +1 @@
+#include <netdb.h>
diff -up /dev/null ntp-4.2.4p4/libntp/md5.c
--- /dev/null	2007-08-14 18:13:05.327268775 +0200
+++ ntp-4.2.4p4/libntp/md5.c	2007-10-26 14:11:09.000000000 +0200
@@ -0,0 +1,256 @@
+/*
+ * This code implements the MD5 message-digest algorithm.
+ * The algorithm is due to Ron Rivest.	This code was
+ * written by Colin Plumb in 1993, no copyright is claimed.
+ * This code is in the public domain; do with it what you wish.
+ *
+ * Equivalent code is available from RSA Data Security, Inc.
+ * This code has been tested against that, and is equivalent,
+ * except that you don't need to include two pages of legalese
+ * with every copy.
+ *
+ * To compute the message digest of a chunk of bytes, declare an
+ * MD5Context structure, pass it to MD5Init, call MD5Update as
+ * needed on buffers full of bytes, and then call MD5Final, which
+ * will fill a supplied 16-byte array with the digest.
+ */
+
+/* Brutally hacked by John Walker back from ANSI C to K&R (no
+   prototypes) to maintain the tradition that Netfone will compile
+   with Sun's original "cc". */
+
+#include <memory.h>		 /* for memcpy() */
+#include "md5.h"
+#include "config.h"
+
+#ifndef WORDS_BIGENDIAN
+#define byteReverse(buf, len)	/* Nothing */
+#else
+/*
+ * Note: this code is harmless on little-endian machines.
+ */
+static void byteReverse(buf, longs)
+    unsigned char *buf; unsigned longs;
+{
+    uint32 t;
+    do {
+	t = (uint32) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
+	    ((unsigned) buf[1] << 8 | buf[0]);
+	*(uint32 *) buf = t;
+	buf += 4;
+    } while (--longs);
+}
+#endif
+
+/*
+ * Start MD5 accumulation.  Set bit count to 0 and buffer to mysterious
+ * initialization constants.
+ */
+void MD5Init(ctx)
+    struct MD5Context *ctx;
+{
+    ctx->buf[0] = 0x67452301;
+    ctx->buf[1] = 0xefcdab89;
+    ctx->buf[2] = 0x98badcfe;
+    ctx->buf[3] = 0x10325476;
+
+    ctx->bits[0] = 0;
+    ctx->bits[1] = 0;
+}
+
+/*
+ * Update context to reflect the concatenation of another buffer full
+ * of bytes.
+ */
+void MD5Update(ctx, buf, len)
+    struct MD5Context *ctx; unsigned char *buf; unsigned len;
+{
+    uint32 t;
+
+    /* Update bitcount */
+
+    t = ctx->bits[0];
+    if ((ctx->bits[0] = t + ((uint32) len << 3)) < t)
+	ctx->bits[1]++; 	/* Carry from low to high */
+    ctx->bits[1] += len >> 29;
+
+    t = (t >> 3) & 0x3f;	/* Bytes already in shsInfo->data */
+
+    /* Handle any leading odd-sized chunks */
+
+    if (t) {
+	unsigned char *p = (unsigned char *) ctx->in + t;
+
+	t = 64 - t;
+	if (len < t) {
+	    memcpy(p, buf, len);
+	    return;
+	}
+	memcpy(p, buf, t);
+	byteReverse(ctx->in, 16);
+	MD5Transform(ctx->buf, (uint32 *) ctx->in);
+	buf += t;
+	len -= t;
+    }
+    /* Process data in 64-byte chunks */
+
+    while (len >= 64) {
+	memcpy(ctx->in, buf, 64);
+	byteReverse(ctx->in, 16);
+	MD5Transform(ctx->buf, (uint32 *) ctx->in);
+	buf += 64;
+	len -= 64;
+    }
+
+    /* Handle any remaining bytes of data. */
+
+    memcpy(ctx->in, buf, len);
+}
+
+/*
+ * Final wrapup - pad to 64-byte boundary with the bit pattern 
+ * 1 0* (64-bit count of bits processed, MSB-first)
+ */
+void MD5Final(digest, ctx)
+    unsigned char digest[16]; struct MD5Context *ctx;
+{
+    unsigned count;
+    unsigned char *p;
+
+    /* Compute number of bytes mod 64 */
+    count = (ctx->bits[0] >> 3) & 0x3F;
+
+    /* Set the first char of padding to 0x80.  This is safe since there is
+       always at least one byte free */
+    p = ctx->in + count;
+    *p++ = 0x80;
+
+    /* Bytes of padding needed to make 64 bytes */
+    count = 64 - 1 - count;
+
+    /* Pad out to 56 mod 64 */
+    if (count < 8) {
+	/* Two lots of padding:  Pad the first block to 64 bytes */
+	memset(p, 0, count);
+	byteReverse(ctx->in, 16);
+	MD5Transform(ctx->buf, (uint32 *) ctx->in);
+
+	/* Now fill the next block with 56 bytes */
+	memset(ctx->in, 0, 56);
+    } else {
+	/* Pad block to 56 bytes */
+	memset(p, 0, count - 8);
+    }
+    byteReverse(ctx->in, 14);
+
+    /* Append length in bits and transform */
+    ((uint32 *) ctx->in)[14] = ctx->bits[0];
+    ((uint32 *) ctx->in)[15] = ctx->bits[1];
+
+    MD5Transform(ctx->buf, (uint32 *) ctx->in);
+    byteReverse((unsigned char *) ctx->buf, 4);
+    memcpy(digest, ctx->buf, 16);
+    memset(ctx, 0, sizeof(ctx));        /* In case it's sensitive */
+}
+
+
+/* The four core functions - F1 is optimized somewhat */
+
+/* #define F1(x, y, z) (x & y | ~x & z) */
+#define F1(x, y, z) (z ^ (x & (y ^ z)))
+#define F2(x, y, z) F1(z, x, y)
+#define F3(x, y, z) (x ^ y ^ z)
+#define F4(x, y, z) (y ^ (x | ~z))
+
+/* This is the central step in the MD5 algorithm. */
+#define MD5STEP(f, w, x, y, z, data, s) \
+	( w += f(x, y, z) + data,  w = w<<s | w>>(32-s),  w += x )
+
+/*
+ * The core of the MD5 algorithm, this alters an existing MD5 hash to
+ * reflect the addition of 16 longwords of new data.  MD5Update blocks
+ * the data and converts bytes into longwords for this routine.
+ */
+void MD5Transform(buf, in)
+    uint32 buf[4]; uint32 in[16];
+{
+    register uint32 a, b, c, d;
+
+    a = buf[0];
+    b = buf[1];
+    c = buf[2];
+    d = buf[3];
+
+    MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7);
+    MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
+    MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17);
+    MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22);
+    MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7);
+    MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12);
+    MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17);
+    MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22);
+    MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7);
+    MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12);
+    MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
+    MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
+    MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7);
+    MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
+    MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
+    MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);
+
+    MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5);
+    MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9);
+    MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
+    MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20);
+    MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5);
+    MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9);
+    MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
+    MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20);
+    MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5);
+    MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9);
+    MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14);
+    MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20);
+    MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
+    MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
+    MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14);
+    MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
+
+    MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4);
+    MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11);
+    MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
+    MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23);
+    MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4);
+    MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11);
+    MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16);
+    MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
+    MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
+    MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11);
+    MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16);
+    MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23);
+    MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4);
+    MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
+    MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
+    MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23);
+
+    MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6);
+    MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10);
+    MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
+    MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21);
+    MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6);
+    MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10);
+    MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15);
+    MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21);
+    MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6);
+    MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
+    MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15);
+    MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
+    MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6);
+    MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
+    MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
+    MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21);
+
+    buf[0] += a;
+    buf[1] += b;
+    buf[2] += c;
+    buf[3] += d;
+}

ntp-4.2.4p4-cmsgalign.patch:

--- NEW FILE ntp-4.2.4p4-cmsgalign.patch ---
diff -up ntp-4.2.4p4/ntpd/ntp_io.c.cmsgalign ntp-4.2.4p4/ntpd/ntp_io.c
--- ntp-4.2.4p4/ntpd/ntp_io.c.cmsgalign	2008-03-10 20:01:21.000000000 +0100
+++ ntp-4.2.4p4/ntpd/ntp_io.c	2008-03-10 20:04:02.000000000 +0100
@@ -2933,8 +2933,8 @@ read_network_packet(SOCKET fd, struct in
 	msghdr.msg_namelen    = sizeof(rb->recv_srcadr);
 	msghdr.msg_iov        = &iovec;
 	msghdr.msg_iovlen     = 1;
-	msghdr.msg_control    = (void *)&control;
-	msghdr.msg_controllen = sizeof(control);
+	msghdr.msg_control    = (void *)((long)(control + 7) & -8); /* align to 8 bytes */
+	msghdr.msg_controllen = sizeof(control) - 8;
 	msghdr.msg_flags      = 0;
 	rb->recv_length       = recvmsg(fd, &msghdr, 0);
 #endif

ntp-4.2.4p4-kernel.patch:

--- NEW FILE ntp-4.2.4p4-kernel.patch ---
diff -up ntp-4.2.4p4/ntpd/cmd_args.c.kernel ntp-4.2.4p4/ntpd/cmd_args.c
--- ntp-4.2.4p4/ntpd/cmd_args.c.kernel	2007-08-18 22:24:43.000000000 +0200
+++ ntp-4.2.4p4/ntpd/cmd_args.c	2008-02-27 16:57:56.000000000 +0100
@@ -179,8 +179,10 @@ getCmdOpts(
 		} while (--ct > 0);
 	}
 
-	if (HAVE_OPT( SLEW ))
+	if (HAVE_OPT( SLEW )) {
 		clock_max = 600;
+		kern_enable = 0;
+	}
 
 	if (HAVE_OPT( UPDATEINTERVAL )) {
 		long val = OPT_VALUE_UPDATEINTERVAL;
diff -up ntp-4.2.4p4/ntpd/ntp_loopfilter.c.kernel ntp-4.2.4p4/ntpd/ntp_loopfilter.c
--- ntp-4.2.4p4/ntpd/ntp_loopfilter.c.kernel	2007-02-24 12:02:05.000000000 +0100
+++ ntp-4.2.4p4/ntpd/ntp_loopfilter.c	2008-02-27 16:57:56.000000000 +0100
@@ -337,8 +337,6 @@ local_clock(
 	 */
 	clock_frequency = flladj = plladj = 0;
 	mu = peer->epoch - sys_clocktime;
-	if (clock_max == 0 || clock_max > 0.5)
-		kern_enable = 0;
 	rval = 1;
 	if (fabs(fp_offset) > clock_max && clock_max > 0) {
 		switch (state) {
@@ -895,7 +893,7 @@ loop_config(
 #ifdef STA_NANO
 		ntv.modes = MOD_BITS | MOD_NANO;
 #else /* STA_NANO */
-		ntv.modes = MOD_BITS;
+		ntv.modes = MOD_BITS | MOD_FREQUENCY;
 #endif /* STA_NANO */
 		ntv.maxerror = MAXDISPERSE;
 		ntv.esterror = MAXDISPERSE;
@@ -1001,6 +999,8 @@ loop_config(
 	 */
 	case LOOP_MAX:			/* step threshold */
 		clock_max = freq;
+		if (clock_max == 0 || clock_max > 0.5)
+			kern_enable = 0;
 		break;
 
 	case LOOP_PANIC:		/* panic threshold */

ntp-4.2.4p4-mlock.patch:

--- NEW FILE ntp-4.2.4p4-mlock.patch ---
diff -up ntp-4.2.4p4/html/ntpd.html.mlock ntp-4.2.4p4/html/ntpd.html
--- ntp-4.2.4p4/html/ntpd.html.mlock	2007-10-25 14:55:05.000000000 +0200
+++ ntp-4.2.4p4/html/ntpd.html	2007-10-25 14:55:05.000000000 +0200
@@ -34,7 +34,7 @@
 		</ul>
 		<hr>
 		<h4 id="synop">Synopsis</h4>
-		<tt>ntpd [ -46aAbdDgLnNqx ] [ -c <i>conffile</i> ] [ -f <i>driftfile</i> ] [ -i <i>jaildir</i> ] [ -I <i>iface</i> ] [ -k <i>keyfile</i> ] [ -l <i>logfile</i> ] [ -p <i>pidfile</i> ] [ -P <i>priority</i> ] [ -r <i>broadcastdelay</i> ] [ -s <i>statsdir</i> ] [ -t <i>key</i> ] [ -u <i>user</i>[:<i>group</i>] ] [ -U <i>interface_update_interval</i> ] [ -v <i>variable</i> ] [ -V <i>variable</i> ]</tt>
+		<tt>ntpd [ -46aAbdDgLmnNqx ] [ -c <i>conffile</i> ] [ -f <i>driftfile</i> ] [ -i <i>jaildir</i> ] [ -I <i>iface</i> ] [ -k <i>keyfile</i> ] [ -l <i>logfile</i> ] [ -p <i>pidfile</i> ] [ -P <i>priority</i> ] [ -r <i>broadcastdelay</i> ] [ -s <i>statsdir</i> ] [ -t <i>key</i> ] [ -u <i>user</i>[:<i>group</i>] ] [ -U <i>interface_update_interval</i> ] [ -v <i>variable</i> ] [ -V <i>variable</i> ]</tt>
 		<h4 id="descr">Description</h4>
 		<p>The <tt>ntpd</tt> program is an operating system daemon which sets and maintains the system time of day in synchronism with Internet standard time servers. It is a complete implementation of the Network Time Protocol (NTP) version 4, but also retains compatibility with version 3, as defined by RFC-1305, and version 1 and 2, as defined by RFC-1059 and RFC-1119, respectively. <tt>ntpd</tt> does most computations in 64-bit floating point arithmetic and does relatively clumsy 64-bit fixed point operations only when necessary to preserve the ultimate precision, about 232 picoseconds. While the ultimate precision is not achievable with ordinary workstations and networks of today, it may be required with future gigahertz CPU clocks and gigabit LANs.</p>
 		<h4 id="op">How NTP Operates</h4>
@@ -95,6 +95,8 @@
 			<dd>Specify the name and path of the log file. The default is the system log file. This is the same operation as the <tt>logfile <i>logfile</i></tt> configuration command.
 			<dt><tt>-L</tt>
 			<dd>Do not listen to virtual IPs. The default is to listen.
+			<dt><tt>-m</tt>
+			<dd>Lock memory.
 			<dt><tt>-n</tt>
 			<dd>Don't fork.
 			<dt><tt>-N</tt>
diff -up ntp-4.2.4p4/ntpd/ntpd.c.mlock ntp-4.2.4p4/ntpd/ntpd.c
--- ntp-4.2.4p4/ntpd/ntpd.c.mlock	2007-10-25 14:55:05.000000000 +0200
+++ ntp-4.2.4p4/ntpd/ntpd.c	2007-10-25 14:55:05.000000000 +0200
@@ -699,7 +699,8 @@ ntpdmain(
 	}
 #endif
 
-#if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT) && defined(MCL_FUTURE)
+#if defined(MCL_CURRENT) && defined(MCL_FUTURE)
+    if (HAVE_OPT( MLOCK )) {
 # ifdef HAVE_SETRLIMIT
 	/*
 	 * Set the stack limit to something smaller, so that we don't lock a lot
@@ -737,6 +738,7 @@ ntpdmain(
 	 */
 	if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0)
 		msyslog(LOG_ERR, "mlockall(): %m");
+    }
 #else /* not (HAVE_MLOCKALL && MCL_CURRENT && MCL_FUTURE) */
 # ifdef HAVE_PLOCK
 #  ifdef PROCLOCK
diff -up ntp-4.2.4p4/ntpd/ntpd-opts.c.mlock ntp-4.2.4p4/ntpd/ntpd-opts.c
--- ntp-4.2.4p4/ntpd/ntpd-opts.c.mlock	2007-09-11 02:31:15.000000000 +0200
+++ ntp-4.2.4p4/ntpd/ntpd-opts.c	2007-10-25 14:55:05.000000000 +0200
@@ -265,6 +265,15 @@ tSCC    zNice_Name[]               = "ni
 #define NICE_FLAGS       (OPTST_DISABLED)
 
 /*
+ *  Mlock option description:
+ */
+tSCC    zMlockText[] =
+        "Lock memory";
+tSCC    zMlock_NAME[]               = "MLOCK";
+tSCC    zMlock_Name[]               = "mlock";
+#define MLOCK_FLAGS       (OPTST_DISABLED)
+
+/*
  *  Pidfile option description:
  */
 tSCC    zPidfileText[] =
@@ -790,6 +799,18 @@ static tOptDesc optDesc[ OPTION_CT ] = {
                                 OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
 #endif
 
+  {  /* entry idx, value */ 29, VALUE_OPT_MLOCK,
+     /* equiv idx, value */ 29, VALUE_OPT_MLOCK,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ MLOCK_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ zMlockText, zMlock_NAME, zMlock_Name,
+     /* disablement strs */ NULL, NULL },
+
   {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
      /* equiv idx value  */ NO_EQUIVALENT, 0,
      /* equivalenced to  */ NO_EQUIVALENT,
@@ -882,7 +903,7 @@ tOptions ntpdOptions = {
       NO_EQUIVALENT /* index of '-#' option */,
       NO_EQUIVALENT /* index of default opt */
     },
-    32 /* full option count */, 29 /* user option count */
+    33 /* full option count */, 30 /* user option count */
 };
 
 /*
diff -up ntp-4.2.4p4/ntpd/ntpd-opts.h.mlock ntp-4.2.4p4/ntpd/ntpd-opts.h
--- ntp-4.2.4p4/ntpd/ntpd-opts.h.mlock	2007-09-11 02:31:15.000000000 +0200
+++ ntp-4.2.4p4/ntpd/ntpd-opts.h	2007-10-25 14:58:10.000000000 +0200
@@ -82,12 +82,13 @@ typedef enum {
         INDEX_OPT_VAR              = 26,
         INDEX_OPT_DVAR             = 27,
         INDEX_OPT_SLEW             = 28,
-        INDEX_OPT_VERSION          = 29,
-        INDEX_OPT_HELP             = 30,
-        INDEX_OPT_MORE_HELP        = 31
+        INDEX_OPT_MLOCK            = 29,
+        INDEX_OPT_VERSION          = 30,
+        INDEX_OPT_HELP             = 31,
+        INDEX_OPT_MORE_HELP        = 32
 } teOptIndex;
 
-#define OPTION_CT    32
+#define OPTION_CT    33
 #define NTPD_VERSION       "4.2.4p4"
 #define NTPD_FULL_VERSION  "ntpd - NTP daemon program - Ver. 4.2.4p4"
 
@@ -180,6 +181,10 @@ typedef enum {
 #  warning undefining MODIFYMMTIMER due to option name conflict
 #  undef   MODIFYMMTIMER
 # endif
+# ifdef    MLOCK
+#  warning undefining MLOCK due to option name conflict
+#  undef   MLOCK
+# endif
 # ifdef    NOFORK
 #  warning undefining NOFORK due to option name conflict
 #  undef   NOFORK
@@ -249,6 +254,7 @@ typedef enum {
 # undef LOGFILE
 # undef NOVIRTUALIPS
 # undef MODIFYMMTIMER
+# undef MLOCK
 # undef NOFORK
 # undef NICE
 # undef PIDFILE
@@ -291,6 +297,7 @@ typedef enum {
 #ifdef SYS_WINNT
 #define VALUE_OPT_MODIFYMMTIMER  'M'
 #endif /* SYS_WINNT */
+#define VALUE_OPT_MLOCK          'm'
 #define VALUE_OPT_NOFORK         'n'
 #define VALUE_OPT_NICE           'N'
 #define VALUE_OPT_PIDFILE        'p'

ntp-4.2.4p4-multilisten.patch:

--- NEW FILE ntp-4.2.4p4-multilisten.patch ---
diff -up ntp-4.2.4p4/include/ntpd.h.multilisten ntp-4.2.4p4/include/ntpd.h
--- ntp-4.2.4p4/include/ntpd.h.multilisten	2006-12-28 13:03:06.000000000 +0100
+++ ntp-4.2.4p4/include/ntpd.h	2007-10-25 14:48:46.000000000 +0200
@@ -79,6 +79,8 @@ extern  void	enable_broadcast P((struct 
 extern  void	enable_multicast_if P((struct interface *, struct sockaddr_storage *));
 extern	void	interface_dump	 P((struct interface *));
 
+extern  void    add_specific_interface P((const char *));
+extern  void    init_specific_interface P((void));
 extern  void    interface_update P((interface_receiver_t, void *));
 extern	void	init_io 	P((void));
 extern	void	input_handler	P((l_fp *));
diff -up ntp-4.2.4p4/ntpd/ntp_io.c.multilisten ntp-4.2.4p4/ntpd/ntp_io.c
--- ntp-4.2.4p4/ntpd/ntp_io.c.multilisten	2007-08-18 22:24:44.000000000 +0200
+++ ntp-4.2.4p4/ntpd/ntp_io.c	2007-10-25 14:48:46.000000000 +0200
@@ -66,7 +66,15 @@
 #endif  /* IPv6 Support */
 
 extern int listen_to_virtual_ips;
-extern const char *specific_interface;
+
+/* interface names to listen on */
+struct specific_interface {
+	const char *name;
+	ISC_LINK(struct specific_interface) link;
+};
+
+ISC_LIST(struct specific_interface) specific_interface_list;
+
 
 #if defined(SO_TIMESTAMP) && defined(SCM_TIMESTAMP)
 #if defined(CMSG_FIRSTHDR)
@@ -924,14 +932,15 @@ address_okay(struct interface *iface) {
 	/*
 	 * Check if the interface is specified
 	 */
-	if (specific_interface != NULL) {
-		if (strcasecmp(iface->name, specific_interface) == 0) {
-			DPRINTF(4, ("address_okay: specific interface name matched - OK\n"));
-			return (ISC_TRUE);
-		} else {
-			DPRINTF(4, ("address_okay: specific interface name NOT matched - FAIL\n"));
-			return (ISC_FALSE);
-		}
+ 	if (ISC_LIST_HEAD(specific_interface_list)) {
+ 		struct specific_interface *iface_;
+ 		for (iface_ = ISC_LIST_HEAD(specific_interface_list); iface_ != NULL; iface_ = ISC_LIST_NEXT(iface_, link))
+ 			if (strcasecmp(iface->name, iface_->name) == 0) {
+				DPRINTF(4, ("address_okay: specific interface name matched - OK\n"));
+ 				return (ISC_TRUE);
+			}
+		DPRINTF(4, ("address_okay: specific interface name NOT matched - FAIL\n"));
+ 		return (ISC_FALSE);
 	}
 	else {
 		if (listen_to_virtual_ips == 0  && 
@@ -1044,6 +1053,23 @@ refresh_interface(struct interface * int
 #endif /* !OS_MISSES_SPECIFIC_ROUTE_UPDATES */
 }
 
+void
+add_specific_interface (const char *if_name)
+{
+	struct specific_interface *iface;
+
+	iface = (struct specific_interface *)emalloc(sizeof(struct specific_interface));
+	iface->name = if_name;
+	ISC_LINK_INIT(iface, link);
+	ISC_LIST_APPEND(specific_interface_list, iface, link);
+}
+
+void
+init_specific_interface (void)
+{
+	ISC_LIST_INIT(specific_interface_list);
+}
+
 /*
  * interface_update - externally callable update function
  */
diff -up ntp-4.2.4p4/ntpd/cmd_args.c.multilisten ntp-4.2.4p4/ntpd/cmd_args.c
--- ntp-4.2.4p4/ntpd/cmd_args.c.multilisten	2007-08-18 22:24:43.000000000 +0200
+++ ntp-4.2.4p4/ntpd/cmd_args.c	2007-10-25 14:50:44.000000000 +0200
@@ -22,7 +22,6 @@
  * Definitions of things either imported from or exported to outside
  */
 extern char const *progname;
-extern const char *specific_interface;
 extern short default_ai_family;
 
 #ifdef HAVE_NETINFO
diff -up ntp-4.2.4p4/ntpd/ntpd.c.multilisten ntp-4.2.4p4/ntpd/ntpd.c
--- ntp-4.2.4p4/ntpd/ntpd.c.multilisten	2007-10-25 14:48:46.000000000 +0200
+++ ntp-4.2.4p4/ntpd/ntpd.c	2007-10-25 14:48:46.000000000 +0200
@@ -156,7 +156,6 @@ volatile int debug = 0;		/* No debugging
 #endif
 
 int	listen_to_virtual_ips = 1;
-const char *specific_interface = NULL;        /* interface name or IP address to bind to */
 
 /*
  * No-fork flag.  If set, we do not become a background daemon.
@@ -537,18 +536,14 @@ ntpdmain(
 	if (HAVE_OPT( NOVIRTUALIPS ))
 		listen_to_virtual_ips = 0;
 
+	init_specific_interface();
+
 	if (HAVE_OPT( INTERFACE )) {
-#if 0
 		int	ifacect = STACKCT_OPT( INTERFACE );
-		char**	ifaces  = STACKLST_OPT( INTERFACE );
+		const char** ifaces  = STACKLST_OPT( INTERFACE );
 
-		/* malloc space for the array of names */
-		while (ifacect-- > 0) {
-			next_iface = *ifaces++;
-		}
-#else
-		specific_interface = OPT_ARG( INTERFACE );
-#endif
+		while (ifacect-- > 0)
+			add_specific_interface(*ifaces++);
 	}
 
 	if (HAVE_OPT( NICE ))

ntp-4.2.4-htmldoc.patch:

Index: ntp-4.2.4-htmldoc.patch
===================================================================
RCS file: /cvs/pkgs/rpms/ntp/F-8/ntp-4.2.4-htmldoc.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ntp-4.2.4-htmldoc.patch	24 Jul 2007 12:08:12 -0000	1.3
+++ ntp-4.2.4-htmldoc.patch	15 Apr 2008 14:15:51 -0000	1.4
@@ -9,8 +9,11 @@
  		<h4 id="descr">Description</h4>
  		<p>The <tt>ntpd</tt> program is an operating system daemon which sets and maintains the system time of day in synchronism with Internet standard time servers. It is a complete implementation of the Network Time Protocol (NTP) version 4, but also retains compatibility with version 3, as defined by RFC-1305, and version 1 and 2, as defined by RFC-1059 and RFC-1119, respectively. <tt>ntpd</tt> does most computations in 64-bit floating point arithmetic and does relatively clumsy 64-bit fixed point operations only when necessary to preserve the ultimate precision, about 232 picoseconds. While the ultimate precision is not achievable with ordinary workstations and networks of today, it may be required with future gigahertz CPU clocks and gigabit LANs.</p>
  		<h4 id="op">How NTP Operates</h4>
-@@ -65,6 +65,10 @@
+@@ -63,8 +63,13 @@
+ 		<p>In contexts where a host name is expected, a <tt>-4</tt> qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a <tt>-6</tt> qualifier forces DNS resolution to the IPv6 namespace.</p>
+ 		<p>Various internal <tt>ntpd</tt> variables can be displayed and configuration options altered while the <tt>ntpd</tt> is running using the <tt><a href="ntpq.html">ntpq</a></tt> and <tt><a href="ntpdc.html">ntpdc</a></tt> utility programs.</p>
  		<p>When <tt>ntpd</tt> starts it looks at the value of <tt>umask</tt>, and if zero <tt>ntpd</tt> will set the <tt>umask</tt> to <tt>022</tt>.</p>
++		<p>Unless the <tt>-n</tt>, <tt>-d</tt> or <tt>-D</tt> option is used, <tt>ntpd</tt> changes the current working directory to the root directory, so any options or commands specifying paths need to use an absolute path or a path relative to the root.</p>
  		<h4 id="cmd">Command Line Options</h4>
  		<dl>
 +			<dt><tt>-4</tt>
@@ -20,7 +23,7 @@
  			<dt><tt>-a</tt>
  			<dd>Require cryptographic authentication for broadcast client, multicast client and symmetric passive associations. This is the default.
  			<dt><tt>-A</tt>
-@@ -78,13 +82,15 @@
+@@ -78,13 +83,15 @@
  			<dt><tt>-D <i>level</i></tt>
  			<dd>Specify debugging level directly.
  			<dt><tt>-f <i>driftfile</i></tt>
@@ -38,7 +41,7 @@
  			<dt><tt>-l <i>logfile</i></tt>
  			<dd>Specify the name and path of the log file. The default is the system log file. This is the same operation as the <tt>logfile <i>logfile</i></tt> configuration command.
  			<dt><tt>-L</tt>
-@@ -143,7 +149,7 @@
+@@ -143,7 +150,7 @@
  			</tr>
  			<tr>
  				<td width="30%">frequency file</td>
@@ -47,7 +50,7 @@
  				<td width="20%"><tt>-f</tt></td>
  				<td width="20%"><tt>driftfile</tt></td>
  			</tr>
-@@ -167,14 +173,14 @@
+@@ -167,17 +174,20 @@
  			</tr>
  			<tr>
  				<td width="30%">statistics path</td>
@@ -65,6 +68,12 @@
  				<td width="20%"><tt>keysdir</tt></td>
  			</tr>
  		</table>
++		<h4 id="codes">Exit Codes</h4>
++		<p>A non-zero exit code indicates an error. Any error messages are logged to the system log by default.</p>
++		<p>The exit code is 0 only when <tt>ntpd</tt> is terminated by a signal, or when the <tt>-q</tt> option is used and <tt>ntpd</tt> successfully sets the system clock.</p>
+ 		<hr>
+ 		<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ 	</body>
 --- ntp-4.2.4/html/ntpdate.html.htmldoc	2007-01-05 15:40:59.000000000 +0100
 +++ ntp-4.2.4/html/ntpdate.html	2007-01-05 15:40:59.000000000 +0100
 @@ -18,9 +18,9 @@
@@ -91,15 +100,18 @@
  			<dt><tt>-b</tt>
  			<dd>Force the time to be stepped using the settimeofday() system call, rather than slewed (default) using the adjtime() system call. This option should be used when called from a startup file at boot time.
  			<dt><tt>-d</tt>
-@@ -43,7 +43,7 @@
+@@ -43,9 +43,9 @@
  			<dt><tt>-e <i>authdelay</i></tt>
  			<dd>Specify the processing delay to perform an authentication function as the value <i>authdelay</i>, in seconds and fraction (see <tt>ntpd</tt> for details). This number is usually small enough to be negligible for most purposes, though specifying a value may improve timekeeping on very slow CPU's.
  			<dt><tt>-k <i>keyfile</i></tt>
 -			<dd>Specify the path for the authentication key file as the string <i>keyfile</i>. The default is <tt>/etc/ntp.keys</tt>. This file should be in the format described in <tt>ntpd</tt>.
 +			<dd>Specify the path for the authentication key file as the string <i>keyfile</i>. The default is <tt>/etc/ntp/keys</tt>. This file should be in the format described in <tt>ntpd</tt>.
  			<dt><tt>-o <i>version</i></tt>
- 			<dd>Specify the NTP version for outgoing packets as the integer <i>version</i>, which can be 1 or 2. The default is 3. This allows <tt>ntpdate</tt> to be used with older NTP versions.
+-			<dd>Specify the NTP version for outgoing packets as the integer <i>version</i>, which can be 1 or 2. The default is 3. This allows <tt>ntpdate</tt> to be used with older NTP versions.
++			<dd>Specify the NTP version for outgoing packets as the integer <i>version</i>, which can be 1 or 2. The default is 4. This allows <tt>ntpdate</tt> to be used with older NTP versions.
  			<dt><tt>-p <i>samples</i></tt>
+ 			<dd>Specify the number of samples to be acquired from each server as the integer <i>samples</i>, with values from 1 to 8 inclusive. The default is 4.
+ 			<dt><i><tt>-q</tt></i>
 @@ -55,7 +55,7 @@
  			<dt><tt>-t <i>timeout</i></tt>
  			<dd>Specify the maximum time waiting for a server response as the value <i>timeout</i>, in seconds and fraction. The value is is rounded to a multiple of 0.2 seconds. The default is 1 second, a value suitable for polling across a LAN.
@@ -173,7 +185,7 @@
  		<hr>
  		<h4 id="synop">Synopsis</h4>
 -		<p id="intro"><tt>ntp-keygen [ -deGgHIMnPT ] [ -c [RSA-MD2 | RSA-MD5 | RSA-SHA | RSA-SHA1 | RSA-MDC2 | RSA-RIPEMD160 | DSA-SHA | DSA-SHA1 ] ] [ -i <i>name</i> ] [ -p <i>password</i> ] [ -S [ RSA | DSA ] ] [ -s <i>name</i> ] [ -v <i>nkeys</i> ]</tt></p>
-+		<p id="intro"><tt>ntp-keygen [ -deGgHIMPT ] [ -c [RSA-MD2 | RSA-MD5 | RSA-SHA | RSA-SHA1 | RSA-MDC2 | RSA-RIPEMD160 | DSA-SHA | DSA-SHA1 ] ] [ -i <i>name</i> ] [ -p <i>password</i> ] [ -q <i>password</i> ] [ -S [ RSA | DSA ] ] [ -s <i>name</i> ] [ -v <i>nkeys</i> ] [ -V <i>params</i> ]</tt></p>
++		<p id="intro"><tt>ntp-keygen [ -deGgHIMPT ] [ -c [RSA-MD2 | RSA-MD5 | RSA-SHA | RSA-SHA1 | RSA-MDC2 | RSA-RIPEMD160 | DSA-SHA | DSA-SHA1 ] ] [ -i <i>name</i> ] [ -m <i>modulus</i> ] [ -p <i>password</i> ] [ -q <i>password</i> ] [ -S [ RSA | DSA ] ] [ -s <i>name</i> ] [ -v <i>nkeys</i> ] [ -V <i>params</i> ]</tt></p>
  		<h4 id="descrip">Description</h4>
  		<p>This program generates cryptographic data files used by the NTPv4 authentication and identification schemes. It generates MD5 key files used in symmetric key cryptography. In addition, if the OpenSSL software library has been installed, it generates keys, certificate and identity files used in public key cryptography. These files are used for cookie encryption, digital signature and challenge/response identification algorithms compatible with the Internet standard security infrastructure.</p>
  		<p>By default, files are not encrypted by <tt>ntp-keygen</tt>. The <tt>-p <i>password</i></tt> option specifies the write password and <tt>-q <i>password</i></tt> option the read password for previously encrypted files. The <tt>ntp-keygen</tt> program prompts for the password if it reads an encrypted file and the password is missing or incorrect. If an encrypted file is read successfully and no write password is specified, the read password is used as the write password by default.</p>


Index: ntp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ntp/F-8/ntp.spec,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- ntp.spec	24 Sep 2007 14:33:43 -0000	1.73
+++ ntp.spec	15 Apr 2008 14:15:51 -0000	1.74
@@ -1,21 +1,32 @@
 Summary: Synchronizes system time using the Network Time Protocol (NTP)
 Name: ntp
-Version: 4.2.4p2
-Release: 6%{?dist}
+Version: 4.2.4p4
+Release: 1%{?dist}
 # primary license (COPYRIGHT) : MIT
 # ElectricFence/ (not used) : GPLv2
-# include/ntif.h : BSD
-# include/rsa_md5.h : BSD with advertising
-# libntp/md5c.c : BSD with advertising
-# libntp/adjtimex.c : BSD
+# kernel/sys/ppsclock.h (not used) : BSD with advertising
+# include/ntif.h (not used) : BSD
+# include/rsa_md5.h (replaced) : BSD with advertising
+# include/ntp_rfc2553.h (replaced) : BSD with advertising
+# libisc/inet_aton.c (not used) : BSD with advertising
+# libntp/md5c.c (replaced) : BSD with advertising
+# libntp/mktime.c (replaced) : BSD with advertising
+# libntp/ntp_random.c (replaced) : BSD with advertising
+# libntp/memmove.c (replaced) : BSD with advertising
+# libntp/ntp_rfc2553.c (replaced) : BSD with advertising
+# libntp/adjtimex.c (not used) : BSD
 # libopts/ : BSD or GPLv2+
 # libparse/ : BSD
 # ntpd/refclock_jjy.c: MIT
-# ntpd/refclock_oncore.c: BEERWARE License (aka, Public Domain)
+# ntpd/refclock_oncore.c : BEERWARE License (aka, Public Domain)
+# ntpd/refclock_palisade.c : BSD with advertising
+# ntpd/refclock_jupiter.c : BSD with advertising
+# ntpd/refclock_mx4200.c : BSD with advertising
+# ntpd/refclock_palisade.h : BSD with advertising
 # ntpstat-0.2/ : GPLv2
 # util/ansi2knr.c (not used) : GPL+
 # sntp/ (not packaged) : MSNTP
-License: (MIT and BSD and BSD with advertising) and GPLv2
+License: (MIT and BSD and BSD with advertising) and (MIT and BSD) and GPLv2
 Group: System Environment/Daemons
 Source0: http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-%{version}.tar.gz
 Source1: ntp.conf
@@ -26,25 +37,27 @@
 Source6: ntp.step-tickers
 Source8: ntp.cryptopw
 
+Patch1: ntp-4.2.4p4-kernel.patch
 Patch2: ntp-4.2.4p0-droproot.patch
 Patch3: ntp-4.2.4-groups.patch
 Patch4: ntp-4.1.1c-rc3-authkey.patch
 Patch5: ntp-4.2.4-linkfastmath.patch
 Patch6: ntp-4.2.4p2-tentative.patch
 Patch7: ntp-4.2.4p2-noseed.patch
-Patch8: ntp-4.2.4p2-multilisten.patch
+Patch8: ntp-4.2.4p4-multilisten.patch
 Patch9: ntp-4.2.4-html2man.patch
 Patch10: ntp-4.2.4-htmldoc.patch
 Patch11: ntp-4.2.4p2-filegen.patch
 Patch12: ntp-4.2.4-sprintf.patch
-Patch13: ntp-4.2.4p2-loopback.patch
-Patch14: ntp-4.2.4p2-mlock.patch
+Patch13: ntp-4.2.4p4-bsdadv.patch
+Patch14: ntp-4.2.4p4-mlock.patch
 Patch15: ntp-4.2.4p2-clockselect.patch
 Patch16: ntp-4.2.4p2-nosntp.patch
 Patch17: ntp-4.2.4p0-sleep.patch
-Patch18: ntp-4.2.4p0-bcast.patch
+Patch18: ntp-4.2.4p4-bcast.patch
 Patch19: ntp-4.2.4p0-retcode.patch
 Patch20: ntp-4.2.4p2-noif.patch
+Patch22: ntp-4.2.4p4-cmsgalign.patch
 
 URL: http://www.ntp.org
 Requires(pre): shadow-utils 
@@ -71,6 +84,7 @@
 %prep 
 %setup -q -a 5
 
+%patch1 -p1 -b .kernel
 %patch2 -p1 -b .droproot
 %patch3 -p1 -b .groups
 %patch4 -p1 -b .authkey
@@ -81,7 +95,6 @@
 %patch10 -p1 -b .htmldoc
 %patch11 -p1 -b .filegen
 %patch12 -p1 -b .sprintf
-%patch13 -p1 -b .loopback
 %patch14 -p1 -b .mlock
 %patch15 -p1 -b .clockselect
 %patch16 -p1 -b .nosntp
@@ -89,11 +102,20 @@
 %patch18 -p1 -b .bcast
 %patch19 -p1 -b .retcode
 %patch20 -p1 -b .noif
+%patch22 -p1 -b .cmsgalign
 
 %ifarch ia64
 %patch5 -p1 -b .linkfastmath
 %endif
 
+# replace some BSD with advertising code
+for f in include/{ntp_rfc2553,rsa_md5}.h \
+	libntp/{mktime,memmove,md5c,ntp_rfc2553,ntp_random}.c
+do rm -f $f; touch $f; done
+ln -sf md5.h include/rsa_md5.h
+ln -sf md5.c libntp/md5c.c
+%patch13 -p1 -b .bsdadv
+
 %build
 export CFLAGS="$RPM_OPT_FLAGS"
 if echo 'int main () { return 0; }' | gcc -pie -fPIE -O2 -xc - -o pietest 2>/dev/null; then
@@ -105,7 +127,7 @@
 	--with-openssl-libdir=%{_libdir} \
 	--enable-all-clocks --enable-parse-clocks \
 	--enable-linuxcaps
-echo '#define KEYFILE "%{_sysconfdir}/ntp/keys"' >> config.h
+echo '#define KEYFILE "%{_sysconfdir}/ntp/keys"' >> ntpdate/ntpdate.h
 echo '#define NTP_VAR "%{_localstatedir}/log/ntpstats/"' >> config.h
 
 make %{?_smp_mflags}
@@ -210,6 +232,15 @@
 
 
 %changelog
+* Tue Apr 15 2008 Miroslav Lichvar <mlichvar at redhat.com> 4.2.4p4-1.fc8
+- update to 4.2.4p4
+- reset kernel frequency when -x option is used
+- avoid unaligned memory access (#435301)
+- add note about paths and exit codes to ntpd man page
+- fix default NTP version for outgoing packets in ntpdate man page
+  (#245408)
+- replace BSD with advertising code in ntpdc and ntpq
+
 * Mon Sep 24 2007 Miroslav Lichvar <mlichvar at redhat.com> 4.2.4p2-6
 - require perl (#274771)
 - don't fail when starting with no interfaces (#300371)


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/ntp/F-8/sources,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- sources	21 Jun 2007 10:29:24 -0000	1.26
+++ sources	15 Apr 2008 14:15:51 -0000	1.27
@@ -1,2 +1,2 @@
 6b2bedefe2e7c63ea52609b222022121  ntpstat-0.2.tgz
-315a76da63715fd43b6349411fbb0b25  ntp-4.2.4p2.tar.gz
+fcb32a01e1ae3f9ed5bac86b12c7a1cc  ntp-4.2.4p4.tar.gz


--- ntp-4.2.4p0-bcast.patch DELETED ---


--- ntp-4.2.4p2-loopback.patch DELETED ---


--- ntp-4.2.4p2-mlock.patch DELETED ---


--- ntp-4.2.4p2-multilisten.patch DELETED ---




More information about the fedora-extras-commits mailing list