From: Harlan Stenn Date: Sun, 23 Sep 2007 06:06:55 +0000 (-0400) Subject: [Bug 899] Only show -i/--jaildir option if we HAVE_DROPROOT X-Git-Tag: NTP_4_2_5P80~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad201d8666ffc7da7dd1cc2c82bed0fd604fbe60;p=thirdparty%2Fntp.git [Bug 899] Only show -i/--jaildir option if we HAVE_DROPROOT bk: 46f6027ftXVo6GMAs2wLC4zb6qgMjA --- diff --git a/ChangeLog b/ChangeLog index f3e54f313..72d6a2d5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* [Bug 899] Only show -i/--jaildir option if we HAVE_DROPROOT. * [Bug 916] 'cryptosw' is undefined if built without OpenSSL. * [Bug 891] 'restrict' config file keyword does not work (partial fix). * [Bug 890] the crypto command seems to be required now. diff --git a/ntpd/ntpd-opts.c b/ntpd/ntpd-opts.c index c739a750f..1809b62d2 100644 --- a/ntpd/ntpd-opts.c +++ b/ntpd/ntpd-opts.c @@ -1,7 +1,7 @@ /* * EDIT THIS FILE WITH CAUTION (ntpd-opts.c) * - * It has been AutoGen-ed Thursday September 20, 2007 at 07:35:22 AM EDT + * It has been AutoGen-ed Sunday September 23, 2007 at 01:59:26 AM EDT * From the definitions ntpd-opts.def * and the template file options * @@ -181,6 +181,7 @@ tSCC zPanicgate_Name[] = "panicgate"; /* * Jaildir option description: */ +#ifdef DROPROOT tSCC zJaildirText[] = "Jail directory"; tSCC zJaildir_NAME[] = "JAILDIR"; @@ -188,6 +189,14 @@ tSCC zJaildir_Name[] = "jaildir"; #define JAILDIR_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) +#else /* disable Jaildir */ +#define VALUE_OPT_JAILDIR NO_EQUIVALENT +#define JAILDIR_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) +#define zJaildirText NULL +#define zJaildir_NAME NULL +#define zJaildir_Name NULL +#endif /* DROPROOT */ + /* * Interface option description: */ diff --git a/ntpd/ntpd-opts.h b/ntpd/ntpd-opts.h index ba13099ed..da5a53952 100644 --- a/ntpd/ntpd-opts.h +++ b/ntpd/ntpd-opts.h @@ -1,7 +1,7 @@ /* * EDIT THIS FILE WITH CAUTION (ntpd-opts.h) * - * It has been AutoGen-ed Thursday September 20, 2007 at 07:35:21 AM EDT + * It has been AutoGen-ed Sunday September 23, 2007 at 01:59:25 AM EDT * From the definitions ntpd-opts.def * and the template file options * @@ -282,7 +282,9 @@ typedef enum { #endif /* DEBUG */ #define VALUE_OPT_DRIFTFILE 'f' #define VALUE_OPT_PANICGATE 'g' +#ifdef DROPROOT #define VALUE_OPT_JAILDIR 'i' +#endif /* DROPROOT */ #define VALUE_OPT_INTERFACE 'I' #define VALUE_OPT_KEYFILE 'k' #define VALUE_OPT_LOGFILE 'l' diff --git a/ntpd/ntpd-opts.texi b/ntpd/ntpd-opts.texi index 6acc55a39..7d5f844c2 100644 --- a/ntpd/ntpd-opts.texi +++ b/ntpd/ntpd-opts.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (ntpd-opts.texi) # -# It has been AutoGen-ed Thursday September 20, 2007 at 07:35:25 AM EDT +# It has been AutoGen-ed Sunday September 23, 2007 at 01:59:28 AM EDT # From the definitions ntpd-opts.def # and the template file aginfo.tpl @end ignore @@ -268,6 +268,13 @@ configuration file directive for other options. @cindex ntpd-jaildir This is the ``jail directory'' option. + +This option has some usage constraints. It: +@itemize @bullet +@item +must be compiled in by defining @code{DROPROOT} during the compilation. +@end itemize + Chroot the server to the directory jaildir . diff --git a/ntpd/ntpd.1 b/ntpd/ntpd.1 index 995fffbd2..6809fb8d5 100644 --- a/ntpd/ntpd.1 +++ b/ntpd/ntpd.1 @@ -1,7 +1,7 @@ -.TH NTPD 1 2007-09-20 "( 4.2.5p79)" "Programmer's Manual" +.TH NTPD 1 2007-09-23 "( 4.2.5p79)" "Programmer's Manual" .\" EDIT THIS FILE WITH CAUTION (ntpd.1) .\" -.\" It has been AutoGen-ed Thursday September 20, 2007 at 07:35:23 AM EDT +.\" It has been AutoGen-ed Sunday September 23, 2007 at 01:59:27 AM EDT .\" From the definitions ntpd-opts.def .\" and the template file agman1.tpl .\" diff --git a/ntpd/ntpdbase-opts.def b/ntpd/ntpdbase-opts.def index a51d30e3a..7e30d01d7 100644 --- a/ntpd/ntpdbase-opts.def +++ b/ntpd/ntpdbase-opts.def @@ -141,6 +141,7 @@ flag = { #endif flag = { + ifdef = DROPROOT; name = jaildir; value = i; arg-type = string;