1 diff -uNpr ntp-4.2.4p8/html/ntpd.html ntp-4.2.4p8-fixed/html/ntpd.html
2 --- ntp-4.2.4p8/html/ntpd.html 2006-12-28 20:02:57.000000000 +0800
3 +++ ntp-4.2.4p8-fixed/html/ntpd.html 2009-12-14 18:02:33.000000000 +0800
5 <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.
7 <dd>Do not listen to virtual IPs. The default is to listen.
13 diff -uNpr ntp-4.2.4p8/ntpd/ntpd.c ntp-4.2.4p8-fixed/ntpd/ntpd.c
14 --- ntp-4.2.4p8/ntpd/ntpd.c 2009-12-08 19:55:58.000000000 +0800
15 +++ ntp-4.2.4p8-fixed/ntpd/ntpd.c 2009-12-14 18:02:33.000000000 +0800
16 @@ -696,7 +696,8 @@ ntpdmain(
20 -#if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT) && defined(MCL_FUTURE)
21 +#if defined(MCL_CURRENT) && defined(MCL_FUTURE)
22 + if (HAVE_OPT( MLOCK )) {
23 # ifdef HAVE_SETRLIMIT
25 * Set the stack limit to something smaller, so that we don't lock a lot
26 @@ -722,7 +723,7 @@ ntpdmain(
27 * fail if we drop root privlege. To be useful the value
28 * has to be larger than the largest ntpd resident set size.
30 - rl.rlim_cur = rl.rlim_max = 32*1024*1024;
31 + rl.rlim_cur = rl.rlim_max = 64*1024*1024;
32 if (setrlimit(RLIMIT_MEMLOCK, &rl) == -1) {
33 msyslog(LOG_ERR, "Cannot set RLIMIT_MEMLOCK: %m");
35 @@ -734,6 +735,7 @@ ntpdmain(
37 if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0)
38 msyslog(LOG_ERR, "mlockall(): %m");
40 #else /* not (HAVE_MLOCKALL && MCL_CURRENT && MCL_FUTURE) */
43 diff -uNpr ntp-4.2.4p8/ntpd/ntpd-opts.c ntp-4.2.4p8-fixed/ntpd/ntpd-opts.c
44 --- ntp-4.2.4p8/ntpd/ntpd-opts.c 2009-12-08 21:13:09.000000000 +0800
45 +++ ntp-4.2.4p8-fixed/ntpd/ntpd-opts.c 2009-12-14 18:02:33.000000000 +0800
46 @@ -264,6 +264,15 @@ tSCC zNice_Name[] = "ni
47 #define NICE_FLAGS (OPTST_DISABLED)
50 + * Mlock option description:
54 +tSCC zMlock_NAME[] = "MLOCK";
55 +tSCC zMlock_Name[] = "mlock";
56 +#define MLOCK_FLAGS (OPTST_DISABLED)
59 * Pidfile option description:
62 @@ -789,6 +798,18 @@ static tOptDesc optDesc[ OPTION_CT ] = {
63 OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
66 + { /* entry idx, value */ 29, VALUE_OPT_MLOCK,
67 + /* equiv idx, value */ 29, VALUE_OPT_MLOCK,
68 + /* equivalenced to */ NO_EQUIVALENT,
69 + /* min, max, act ct */ 0, 1, 0,
70 + /* opt state flags */ MLOCK_FLAGS, 0,
71 + /* last opt argumnt */ { NULL },
72 + /* arg list/cookie */ NULL,
73 + /* must/cannot opts */ NULL, NULL,
74 + /* option proc */ NULL,
75 + /* desc, NAME, name */ zMlockText, zMlock_NAME, zMlock_Name,
76 + /* disablement strs */ NULL, NULL },
78 { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
79 /* equiv idx value */ NO_EQUIVALENT, 0,
80 /* equivalenced to */ NO_EQUIVALENT,
81 @@ -881,7 +902,7 @@ tOptions ntpdOptions = {
82 NO_EQUIVALENT /* index of '-#' option */,
83 NO_EQUIVALENT /* index of default opt */
85 - 32 /* full option count */, 29 /* user option count */
86 + 33 /* full option count */, 30 /* user option count */
90 diff -uNpr ntp-4.2.4p8/ntpd/ntpd-opts.h ntp-4.2.4p8-fixed/ntpd/ntpd-opts.h
91 --- ntp-4.2.4p8/ntpd/ntpd-opts.h 2009-12-08 21:13:09.000000000 +0800
92 +++ ntp-4.2.4p8-fixed/ntpd/ntpd-opts.h 2009-12-14 18:04:13.000000000 +0800
93 @@ -81,12 +81,13 @@ typedef enum {
97 - INDEX_OPT_VERSION = 29,
98 - INDEX_OPT_HELP = 30,
99 - INDEX_OPT_MORE_HELP = 31
100 + INDEX_OPT_MLOCK = 29,
101 + INDEX_OPT_VERSION = 30,
102 + INDEX_OPT_HELP = 31,
103 + INDEX_OPT_MORE_HELP = 32
106 -#define OPTION_CT 32
107 +#define OPTION_CT 33
108 #define NTPD_VERSION "4.2.4p8"
109 #define NTPD_FULL_VERSION "ntpd - NTP daemon program - Ver. 4.2.4p8"
111 @@ -179,6 +180,10 @@ typedef enum {
112 # warning undefining MODIFYMMTIMER due to option name conflict
113 # undef MODIFYMMTIMER
116 +# warning undefining MLOCK due to option name conflict
120 # warning undefining NOFORK due to option name conflict
122 @@ -248,6 +253,7 @@ typedef enum {
125 # undef MODIFYMMTIMER
130 @@ -290,6 +296,7 @@ typedef enum {
132 #define VALUE_OPT_MODIFYMMTIMER 'M'
133 #endif /* SYS_WINNT */
134 +#define VALUE_OPT_MLOCK 'm'
135 #define VALUE_OPT_NOFORK 'n'
136 #define VALUE_OPT_NICE 'N'
137 #define VALUE_OPT_PIDFILE 'p'