]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 899] Only show -i/--jaildir option if we HAVE_DROPROOT
authorHarlan Stenn <stenn@ntp.org>
Sun, 23 Sep 2007 06:06:55 +0000 (02:06 -0400)
committerHarlan Stenn <stenn@ntp.org>
Sun, 23 Sep 2007 06:06:55 +0000 (02:06 -0400)
bk: 46f6027ftXVo6GMAs2wLC4zb6qgMjA

ChangeLog
ntpd/ntpd-opts.c
ntpd/ntpd-opts.h
ntpd/ntpd-opts.texi
ntpd/ntpd.1
ntpd/ntpdbase-opts.def

index f3e54f31366bc32c13d2783a8eeb047e6920f4fd..72d6a2d5fbaccd4ec796e3ac4846e49a593b562b 100644 (file)
--- 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.
index c739a750fed8655a12ac24e39e68fc25ad1e8150..1809b62d24192eb065d97a491ac4a2640a70bebf 100644 (file)
@@ -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:
  */
index ba13099ed8b9e920c504711e6204443a5af41baa..da5a53952dfcbb22e245ee4a0df800266d3fc4ef 100644 (file)
@@ -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'
index 6acc55a395e8f00ec3b13b43638f4797ff230c18..7d5f844c26be45803a4174fc702515f0c5855d81 100644 (file)
@@ -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
 .
index 995fffbd2023f2a91b522b62d1b36d3eb594bfb9..6809fb8d566176e256f275f287f4106482627d02 100644 (file)
@@ -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
 .\"
index a51d30e3a04e760899c76d31541df0bf0237790a..7e30d01d7fa74f43c958ce72add3dcff7bc228b5 100644 (file)
@@ -141,6 +141,7 @@ flag = {
 #endif
 
 flag = {
+    ifdef     = DROPROOT;
     name      = jaildir;
     value     = i;
     arg-type  = string;