diff --git a/.cvsignore b/.cvsignore index 8a8a1e2..aa72f47 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ ntpstat-0.2.tgz -ntp-4.2.4p7.tar.gz +ntp-4.2.4p8.tar.gz diff --git a/ntp-4.2.4p7-editline.patch b/ntp-4.2.4p7-editline.patch deleted file mode 100644 index c76b2a1..0000000 --- a/ntp-4.2.4p7-editline.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff -up ntp-4.2.4p7/configure.editline ntp-4.2.4p7/configure ---- ntp-4.2.4p7/configure.editline 2009-05-18 10:44:23.000000000 +0200 -+++ ntp-4.2.4p7/configure 2009-07-20 15:18:48.000000000 +0200 -@@ -24614,8 +24614,14 @@ done - # following block becomes on 4.2.5: NTP_LINEEDITLIBS - - -+READLINE_LIBS="-ledit" -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_LIBEDIT -+_ACEOF -+ - for ac_header in readline/history.h readline/readline.h - do -+break - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -@@ -24764,7 +24770,7 @@ fi - done - - case "$ac_cv_header_readline_history_h$ac_cv_header_readline_readline_h" in -- *no*) ;; -+ *) ;; - *) save_LIBS=$LIBS - LIBS= - # Ralf Wildenhues: either unset ... or cache READLINE_LIBS -diff -up ntp-4.2.4p7/ntpdc/ntpdc.c.editline ntp-4.2.4p7/ntpdc/ntpdc.c ---- ntp-4.2.4p7/ntpdc/ntpdc.c.editline 2009-05-18 10:22:36.000000000 +0200 -+++ ntp-4.2.4p7/ntpdc/ntpdc.c 2009-07-20 15:17:25.000000000 +0200 -@@ -26,9 +26,8 @@ - # define closesocket close - #endif /* SYS_WINNT */ - --#if defined(HAVE_LIBREADLINE) || defined (HAVE_LIBEDIT) --# include --# include -+#if defined (HAVE_LIBEDIT) -+# include - #endif /* HAVE_LIBREADLINE || HAVE_LIBEDIT */ - - #ifdef SYS_VXWORKS -diff -up ntp-4.2.4p7/ntpq/ntpq.c.editline ntp-4.2.4p7/ntpq/ntpq.c ---- ntp-4.2.4p7/ntpq/ntpq.c.editline 2009-05-18 10:22:36.000000000 +0200 -+++ ntp-4.2.4p7/ntpq/ntpq.c 2009-07-20 15:17:25.000000000 +0200 -@@ -30,9 +30,8 @@ - # define closesocket close - #endif /* SYS_WINNT */ - --#if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT) --# include --# include -+#if defined(HAVE_LIBEDIT) -+# include - #endif /* HAVE_LIBREADLINE || HAVE_LIBEDIT */ - - #ifdef SYS_VXWORKS diff --git a/ntp-4.2.4p7-gettime.patch b/ntp-4.2.4p7-gettime.patch deleted file mode 100644 index 3184747..0000000 --- a/ntp-4.2.4p7-gettime.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up ntp-4.2.4p7/configure.gettime ntp-4.2.4p7/configure ---- ntp-4.2.4p7/configure.gettime 2009-05-18 18:59:37.000000000 +0200 -+++ ntp-4.2.4p7/configure 2009-05-18 19:19:33.000000000 +0200 -@@ -36117,6 +36117,10 @@ case "$host" in - - for ac_func in clock_gettime clock_settime - do -+ cat >>confdefs.h <<_ACEOF -+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -+_ACEOF -+ continue - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 diff --git a/ntp-4.2.4p7-ipv6.patch b/ntp-4.2.4p7-ipv6.patch deleted file mode 100644 index dccc97a..0000000 --- a/ntp-4.2.4p7-ipv6.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up ntp-4.2.4p7/configure.ipv6 ntp-4.2.4p7/configure ---- ntp-4.2.4p7/configure.ipv6 2009-05-18 17:18:31.000000000 +0200 -+++ ntp-4.2.4p7/configure 2009-05-18 17:22:37.000000000 +0200 -@@ -46206,15 +46206,19 @@ cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - -+#define _GNU_SOURCE - #include - #include - #include -+; - $isc_netinetin6_hack - $isc_netinet6in6_hack - -+; - int - main () - { -+; - - struct in6_pktinfo xyzzy; - diff --git a/ntp-4.2.4p7-mlock.patch b/ntp-4.2.4p7-mlock.patch deleted file mode 100644 index 705f0b4..0000000 --- a/ntp-4.2.4p7-mlock.patch +++ /dev/null @@ -1,146 +0,0 @@ -diff -up ntp-4.2.4p7/html/ntpd.html.mlock ntp-4.2.4p7/html/ntpd.html ---- ntp-4.2.4p7/html/ntpd.html.mlock 2009-05-19 16:05:30.000000000 +0200 -+++ ntp-4.2.4p7/html/ntpd.html 2009-05-19 16:05:30.000000000 +0200 -@@ -34,7 +34,7 @@ - -
-

Synopsis

-- ntpd [ -46aAbdDgLnNqx ] [ -c conffile ] [ -f driftfile ] [ -i jaildir ] [ -I iface ] [ -k keyfile ] [ -l logfile ] [ -p pidfile ] [ -P priority ] [ -r broadcastdelay ] [ -s statsdir ] [ -t key ] [ -u user[:group] ] [ -U interface_update_interval ] [ -v variable ] [ -V variable ] -+ ntpd [ -46aAbdDgLmnNqx ] [ -c conffile ] [ -f driftfile ] [ -i jaildir ] [ -I iface ] [ -k keyfile ] [ -l logfile ] [ -p pidfile ] [ -P priority ] [ -r broadcastdelay ] [ -s statsdir ] [ -t key ] [ -u user[:group] ] [ -U interface_update_interval ] [ -v variable ] [ -V variable ] -

Description

-

The ntpd 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. ntpd 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.

-

How NTP Operates

-@@ -96,6 +96,8 @@ -
Specify the name and path of the log file. The default is the system log file. This is the same operation as the logfile logfile configuration command. -
-L -
Do not listen to virtual IPs. The default is to listen. -+
-m -+
Lock memory. -
-n -
Don't fork. -
-N -diff -up ntp-4.2.4p7/ntpd/ntpd-opts.c.mlock ntp-4.2.4p7/ntpd/ntpd-opts.c ---- ntp-4.2.4p7/ntpd/ntpd-opts.c.mlock 2009-05-18 10:56:02.000000000 +0200 -+++ ntp-4.2.4p7/ntpd/ntpd-opts.c 2009-05-19 16:05:30.000000000 +0200 -@@ -264,6 +264,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[] = -@@ -789,6 +798,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, -@@ -881,7 +902,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.4p7/ntpd/ntpd-opts.h.mlock ntp-4.2.4p7/ntpd/ntpd-opts.h ---- ntp-4.2.4p7/ntpd/ntpd-opts.h.mlock 2009-05-18 10:56:02.000000000 +0200 -+++ ntp-4.2.4p7/ntpd/ntpd-opts.h 2009-05-19 16:05:30.000000000 +0200 -@@ -81,12 +81,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.4p7" - #define NTPD_FULL_VERSION "ntpd - NTP daemon program - Ver. 4.2.4p7" - -@@ -179,6 +180,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 -@@ -248,6 +253,7 @@ typedef enum { - # undef LOGFILE - # undef NOVIRTUALIPS - # undef MODIFYMMTIMER -+# undef MLOCK - # undef NOFORK - # undef NICE - # undef PIDFILE -@@ -290,6 +296,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' -diff -up ntp-4.2.4p7/ntpd/ntpd.c.mlock ntp-4.2.4p7/ntpd/ntpd.c ---- ntp-4.2.4p7/ntpd/ntpd.c.mlock 2009-05-19 16:05:30.000000000 +0200 -+++ ntp-4.2.4p7/ntpd/ntpd.c 2009-05-19 16:06:02.000000000 +0200 -@@ -691,7 +691,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 -@@ -717,7 +718,7 @@ ntpdmain( - * fail if we drop root privlege. To be useful the value - * has to be larger than the largest ntpd resident set size. - */ -- rl.rlim_cur = rl.rlim_max = 32*1024*1024; -+ rl.rlim_cur = rl.rlim_max = 64*1024*1024; - if (setrlimit(RLIMIT_MEMLOCK, &rl) == -1) { - msyslog(LOG_ERR, "Cannot set RLIMIT_MEMLOCK: %m"); - } -@@ -729,6 +730,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 --git a/ntp-4.2.4p7-nosntp.patch b/ntp-4.2.4p7-nosntp.patch deleted file mode 100644 index ec70993..0000000 --- a/ntp-4.2.4p7-nosntp.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -up ntp-4.2.4p7/Makefile.in.nosntp ntp-4.2.4p7/Makefile.in ---- ntp-4.2.4p7/Makefile.in.nosntp 2009-05-18 10:44:06.000000000 +0200 -+++ ntp-4.2.4p7/Makefile.in 2009-05-18 16:49:15.000000000 +0200 -@@ -207,7 +207,7 @@ ACLOCAL_AMFLAGS = -I m4 -I libopts/m4 - NULL = - SUBDIRS = $(am__append_1) scripts include ElectricFence @ARLIB_DIR@ \ - libntp libparse ntpd ntpdate ntpdc ntpq parseutil adjtimed \ -- clockstuff kernel sntp util $(NULL) -+ clockstuff kernel util $(NULL) - DIST_SUBDIRS = \ - scripts \ - include \ -@@ -224,7 +224,6 @@ DIST_SUBDIRS = \ - adjtimed \ - clockstuff \ - kernel \ -- sntp \ - util \ - $(NULL) - -diff -up ntp-4.2.4p7/configure.nosntp ntp-4.2.4p7/configure ---- ntp-4.2.4p7/configure.nosntp 2009-05-18 10:44:23.000000000 +0200 -+++ ntp-4.2.4p7/configure 2009-05-18 16:49:41.000000000 +0200 -@@ -459,7 +459,7 @@ ac_includes_default="\ - #endif" - - ac_subdirs_all="$ac_subdirs_all arlib" --ac_subdirs_all="$ac_subdirs_all sntp" -+ac_subdirs_all="$ac_subdirs_all" - ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP LIBOPTS_DIR INSTALL_LIBOPTS_TRUE INSTALL_LIBOPTS_FALSE NEED_LIBOPTS_TRUE NEED_LIBOPTS_FALSE LIBOPTS_LDADD LIBOPTS_CFLAGS BINSUBDIR subdirs ARLIB_DIR LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB LIBTOOL PATH_SH PATH_PERL READLINE_LIBS U ANSI2KNR HAVE_INLINE LIBPARSE MAKE_LIBPARSE MAKE_LIBPARSE_KERNEL MAKE_CHECK_Y2K OPENSSL OPENSSL_INC OPENSSL_LIB LCRYPTO EF_PROGS EF_LIBS MAKE_CHECK_LAYOUT TESTDCF DCFD MAKE_PARSEKMODULE PROPDELAY CHUTEST CLKTEST MAKE_ADJTIMED MAKE_NTPTIME MAKE_TICKADJ MAKE_TIMETRIM MAKE_LIBNTPSIM MAKE_NTPDSIM LSCF LIBOBJS LTLIBOBJS' - ac_subst_files='' - -@@ -46708,7 +46708,7 @@ _ACEOF - - - --subdirs="$subdirs sntp" -+subdirs="$subdirs" - - - cat >confcache <<\_ACEOF diff --git a/ntp-4.2.4p8-editline.patch b/ntp-4.2.4p8-editline.patch new file mode 100644 index 0000000..12c2028 --- /dev/null +++ b/ntp-4.2.4p8-editline.patch @@ -0,0 +1,58 @@ +diff -up ntp-4.2.4p8/configure.editline ntp-4.2.4p8/configure +--- ntp-4.2.4p8/configure.editline 2009-12-08 14:07:43.000000000 +0100 ++++ ntp-4.2.4p8/configure 2009-12-08 17:51:52.000000000 +0100 +@@ -17216,9 +17216,15 @@ fi + done + + ++READLINE_LIBS="-ledit" ++cat >>confdefs.h <<\_ACEOF ++#define HAVE_LIBEDIT ++_ACEOF ++ + # following block becomes on 4.2.5: NTP_LINEEDITLIBS + for ac_header in readline/history.h readline/readline.h + do : ++ break + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" + eval as_val=\$$as_ac_Header +@@ -17232,7 +17238,7 @@ fi + done + + case "$ac_cv_header_readline_history_h$ac_cv_header_readline_readline_h" in +- *no*) ;; ++ *) ;; + *) save_LIBS=$LIBS + LIBS= + # Ralf Wildenhues: either unset ... or cache READLINE_LIBS +diff -up ntp-4.2.4p8/ntpdc/ntpdc.c.editline ntp-4.2.4p8/ntpdc/ntpdc.c +--- ntp-4.2.4p8/ntpdc/ntpdc.c.editline 2009-12-08 12:55:59.000000000 +0100 ++++ ntp-4.2.4p8/ntpdc/ntpdc.c 2009-12-08 17:50:14.000000000 +0100 +@@ -26,9 +26,8 @@ + # define closesocket close + #endif /* SYS_WINNT */ + +-#if defined(HAVE_LIBREADLINE) || defined (HAVE_LIBEDIT) +-# include +-# include ++#if defined (HAVE_LIBEDIT) ++# include + #endif /* HAVE_LIBREADLINE || HAVE_LIBEDIT */ + + #ifdef SYS_VXWORKS +diff -up ntp-4.2.4p8/ntpq/ntpq.c.editline ntp-4.2.4p8/ntpq/ntpq.c +--- ntp-4.2.4p8/ntpq/ntpq.c.editline 2009-12-08 12:55:59.000000000 +0100 ++++ ntp-4.2.4p8/ntpq/ntpq.c 2009-12-08 17:50:14.000000000 +0100 +@@ -30,9 +30,8 @@ + # define closesocket close + #endif /* SYS_WINNT */ + +-#if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT) +-# include +-# include ++#if defined(HAVE_LIBEDIT) ++# include + #endif /* HAVE_LIBREADLINE || HAVE_LIBEDIT */ + + #ifdef SYS_VXWORKS diff --git a/ntp-4.2.4p8-gettime.patch b/ntp-4.2.4p8-gettime.patch new file mode 100644 index 0000000..06e2916 --- /dev/null +++ b/ntp-4.2.4p8-gettime.patch @@ -0,0 +1,14 @@ +diff -up ntp-4.2.4p8/configure.gettime ntp-4.2.4p8/configure +--- ntp-4.2.4p8/configure.gettime 2009-12-08 18:04:54.000000000 +0100 ++++ ntp-4.2.4p8/configure 2009-12-08 18:06:07.000000000 +0100 +@@ -20221,6 +20221,10 @@ case "$host" in + ;; + *) for ac_func in clock_gettime clock_settime + do : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++_ACEOF ++ continue + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" + eval as_val=\$$as_ac_var diff --git a/ntp-4.2.4p8-mlock.patch b/ntp-4.2.4p8-mlock.patch new file mode 100644 index 0000000..7ad96b9 --- /dev/null +++ b/ntp-4.2.4p8-mlock.patch @@ -0,0 +1,146 @@ +diff -up ntp-4.2.4p8/html/ntpd.html.mlock ntp-4.2.4p8/html/ntpd.html +--- ntp-4.2.4p8/html/ntpd.html.mlock 2009-12-08 17:56:35.000000000 +0100 ++++ ntp-4.2.4p8/html/ntpd.html 2009-12-08 17:56:35.000000000 +0100 +@@ -34,7 +34,7 @@ + +
+

Synopsis

+- ntpd [ -46aAbdDgLnNqx ] [ -c conffile ] [ -f driftfile ] [ -i jaildir ] [ -I iface ] [ -k keyfile ] [ -l logfile ] [ -p pidfile ] [ -P priority ] [ -r broadcastdelay ] [ -s statsdir ] [ -t key ] [ -u user[:group] ] [ -U interface_update_interval ] [ -v variable ] [ -V variable ] ++ ntpd [ -46aAbdDgLmnNqx ] [ -c conffile ] [ -f driftfile ] [ -i jaildir ] [ -I iface ] [ -k keyfile ] [ -l logfile ] [ -p pidfile ] [ -P priority ] [ -r broadcastdelay ] [ -s statsdir ] [ -t key ] [ -u user[:group] ] [ -U interface_update_interval ] [ -v variable ] [ -V variable ] +

Description

+

The ntpd 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. ntpd 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.

+

How NTP Operates

+@@ -96,6 +96,8 @@ +
Specify the name and path of the log file. The default is the system log file. This is the same operation as the logfile logfile configuration command. +
-L +
Do not listen to virtual IPs. The default is to listen. ++
-m ++
Lock memory. +
-n +
Don't fork. +
-N +diff -up ntp-4.2.4p8/ntpd/ntpd-opts.c.mlock ntp-4.2.4p8/ntpd/ntpd-opts.c +--- ntp-4.2.4p8/ntpd/ntpd-opts.c.mlock 2009-12-08 14:13:09.000000000 +0100 ++++ ntp-4.2.4p8/ntpd/ntpd-opts.c 2009-12-08 17:56:35.000000000 +0100 +@@ -264,6 +264,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[] = +@@ -789,6 +798,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, +@@ -881,7 +902,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.4p8/ntpd/ntpd-opts.h.mlock ntp-4.2.4p8/ntpd/ntpd-opts.h +--- ntp-4.2.4p8/ntpd/ntpd-opts.h.mlock 2009-12-08 14:13:09.000000000 +0100 ++++ ntp-4.2.4p8/ntpd/ntpd-opts.h 2009-12-08 17:56:35.000000000 +0100 +@@ -81,12 +81,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.4p8" + #define NTPD_FULL_VERSION "ntpd - NTP daemon program - Ver. 4.2.4p8" + +@@ -179,6 +180,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 +@@ -248,6 +253,7 @@ typedef enum { + # undef LOGFILE + # undef NOVIRTUALIPS + # undef MODIFYMMTIMER ++# undef MLOCK + # undef NOFORK + # undef NICE + # undef PIDFILE +@@ -290,6 +296,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' +diff -up ntp-4.2.4p8/ntpd/ntpd.c.mlock ntp-4.2.4p8/ntpd/ntpd.c +--- ntp-4.2.4p8/ntpd/ntpd.c.mlock 2009-12-08 17:56:35.000000000 +0100 ++++ ntp-4.2.4p8/ntpd/ntpd.c 2009-12-08 17:56:35.000000000 +0100 +@@ -691,7 +691,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 +@@ -717,7 +718,7 @@ ntpdmain( + * fail if we drop root privlege. To be useful the value + * has to be larger than the largest ntpd resident set size. + */ +- rl.rlim_cur = rl.rlim_max = 32*1024*1024; ++ rl.rlim_cur = rl.rlim_max = 64*1024*1024; + if (setrlimit(RLIMIT_MEMLOCK, &rl) == -1) { + msyslog(LOG_ERR, "Cannot set RLIMIT_MEMLOCK: %m"); + } +@@ -729,6 +730,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 --git a/ntp-4.2.4p8-nosntp.patch b/ntp-4.2.4p8-nosntp.patch new file mode 100644 index 0000000..abe3938 --- /dev/null +++ b/ntp-4.2.4p8-nosntp.patch @@ -0,0 +1,32 @@ +diff -up ntp-4.2.4p8/Makefile.in.nosntp ntp-4.2.4p8/Makefile.in +--- ntp-4.2.4p8/Makefile.in.nosntp 2009-12-08 14:07:31.000000000 +0100 ++++ ntp-4.2.4p8/Makefile.in 2009-12-08 17:59:39.000000000 +0100 +@@ -246,7 +246,7 @@ ACLOCAL_AMFLAGS = -I m4 -I libopts/m4 + NULL = + SUBDIRS = $(am__append_1) scripts include ElectricFence @ARLIB_DIR@ \ + libntp libparse ntpd ntpdate ntpdc ntpq parseutil adjtimed \ +- clockstuff kernel sntp util $(NULL) ++ clockstuff kernel util $(NULL) + DIST_SUBDIRS = \ + scripts \ + include \ +@@ -263,7 +263,6 @@ DIST_SUBDIRS = \ + adjtimed \ + clockstuff \ + kernel \ +- sntp \ + util \ + $(NULL) + +diff -up ntp-4.2.4p8/configure.nosntp ntp-4.2.4p8/configure +--- ntp-4.2.4p8/configure.nosntp 2009-12-08 17:59:39.000000000 +0100 ++++ ntp-4.2.4p8/configure 2009-12-08 18:01:09.000000000 +0100 +@@ -25770,7 +25770,7 @@ ac_config_files="$ac_config_files script + ac_config_files="$ac_config_files util/Makefile" + + +-subdirs="$subdirs sntp" ++subdirs="$subdirs" + + + cat >confcache <<\_ACEOF diff --git a/ntp.spec b/ntp.spec index 396ff79..2059d92 100644 --- a/ntp.spec +++ b/ntp.spec @@ -1,7 +1,7 @@ Summary: The NTP daemon and utilities Name: ntp -Version: 4.2.4p7 -Release: 7%{?dist} +Version: 4.2.4p8 +Release: 1%{?dist} # primary license (COPYRIGHT) : MIT # ElectricFence/ (not used) : GPLv2 # kernel/sys/ppsclock.h (not used) : BSD with advertising @@ -65,13 +65,13 @@ Patch11: ntp-4.2.4p2-filegen.patch # ntpbz #738 Patch12: ntp-4.2.4-sprintf.patch # use editline instead of readline -Patch13: ntp-4.2.4p7-editline.patch +Patch13: ntp-4.2.4p8-editline.patch # add option -m to lock memory -Patch14: ntp-4.2.4p7-mlock.patch +Patch14: ntp-4.2.4p8-mlock.patch # fixed in 4.2.5 Patch15: ntp-4.2.4p2-clockselect.patch # don't build sntp -Patch16: ntp-4.2.4p7-nosntp.patch +Patch16: ntp-4.2.4p8-nosntp.patch # ntpbz #802 Patch17: ntp-4.2.4p7-sleep.patch # ntpbz #779, #823 @@ -80,12 +80,10 @@ Patch18: ntp-4.2.4p7-bcast.patch Patch19: ntp-4.2.4p0-retcode.patch # ntpbz #397 Patch20: ntp-4.2.4p2-noif.patch -# force IPv6 support -Patch21: ntp-4.2.4p7-ipv6.patch # align buffer for control messages Patch22: ntp-4.2.4p4-cmsgalign.patch # force use of clock_gettime -Patch23: ntp-4.2.4p7-gettime.patch +Patch23: ntp-4.2.4p8-gettime.patch # reload resolv.conf after failure in name resolution Patch24: ntp-4.2.4p4-resinit.patch # ntpbz #992 @@ -183,7 +181,6 @@ This package contains NTP documentation in HTML format. %patch18 -p1 -b .bcast %patch19 -p1 -b .retcode %patch20 -p1 -b .noif -%patch21 -p1 -b .ipv6 %patch22 -p1 -b .cmsgalign %patch24 -p1 -b .resinit %patch25 -p1 -b .rtnetlink @@ -370,6 +367,9 @@ fi %{ntpdocdir}/html %changelog +* Wed Dec 09 2009 Miroslav Lichvar 4.2.4p8-1 +- update to 4.2.4p8 (#545557, CVE-2009-3563) + * Wed Oct 21 2009 Miroslav Lichvar 4.2.4p7-7 - add ntp-wait man page (#526161) - fix init scripts (#527987) diff --git a/sources b/sources index 38a0f07..336327f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 6b2bedefe2e7c63ea52609b222022121 ntpstat-0.2.tgz -8c19ff62ed4f7d64f8e2aa59cb11f364 ntp-4.2.4p7.tar.gz +fe137056e7e611798a46971a783567ce ntp-4.2.4p8.tar.gz