]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1142] nodebug builds shed no light on -d, -D option failure.
authorDave Hart <hart@ntp.org>
Tue, 17 Nov 2009 19:43:44 +0000 (19:43 +0000)
committerDave Hart <hart@ntp.org>
Tue, 17 Nov 2009 19:43:44 +0000 (19:43 +0000)
[Bug 1179] point out the problem with -i/--jaildir and -u/--user when
  they are disabled by configure.
-4/-6 are not equivalent in the libopts sense

bk: 4b02fcf0D1vpqTE3yp4DRL0Ro4dq4A

31 files changed:
ChangeLog
ntpd/cmd_args.c
ntpd/ntpd-opts.c
ntpd/ntpd-opts.h
ntpd/ntpd-opts.texi
ntpd/ntpd.1
ntpd/ntpdbase-opts.def
ntpdc/ntpdc-opts.c
ntpdc/ntpdc-opts.def
ntpdc/ntpdc-opts.h
ntpdc/ntpdc-opts.texi
ntpdc/ntpdc.1
ntpdc/ntpdc.c
ntpq/ntpq-opts.c
ntpq/ntpq-opts.h
ntpq/ntpq-opts.texi
ntpq/ntpq.1
ntpq/ntpq.c
ntpsnmpd/ntpsnmpd-opts.c
ntpsnmpd/ntpsnmpd-opts.h
ntpsnmpd/ntpsnmpd-opts.texi
sntp/main.c
sntp/sntp-opts.c
sntp/sntp-opts.def
sntp/sntp-opts.h
sntp/sntp-opts.texi
sntp/sntp.1
util/ntp-keygen-opts.c
util/ntp-keygen-opts.h
util/ntp-keygen-opts.texi
util/ntp-keygen.1

index f506c3acd8deec9240dc3fc028384ce4a1800d4c..c6a7f7432f2ce48fc1256d49b0c257b2ee602c11 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+* [Bug 1142] nodebug builds shed no light on -d, -D option failure.
+* [Bug 1179] point out the problem with -i/--jaildir and -u/--user when
+  they are disabled by configure.
 * [Bug 1343] sntp doesn't link on Solaris 7, needs -lresolv.
 (4.2.5p246-RC) 2009/11/17 Released by Harlan Stenn <stenn@ntp.org>
 * Upgrade to autogen-5.10
index 246209b8d40c372d29cdaf5302f7d2d82d36ec1f..1047b8b7f19ad46c47dc720a824f911625de1fc4 100644 (file)
@@ -41,22 +41,14 @@ getCmdOpts(
         */
        errflg = 0;
 
-       switch (WHICH_IDX_IPV4) {
-           case INDEX_OPT_IPV4:
+       if (HAVE_OPT( IPV4 ))
                default_ai_family = AF_INET;
-               break;
-           case INDEX_OPT_IPV6:
+       else if (HAVE_OPT( IPV6 ))
                default_ai_family = AF_INET6;
-               break;
-           default:
-               /* ai_fam_templ = ai_fam_default;       */
-               break;
-       }
 
        if (HAVE_OPT( AUTHREQ ))
                proto_config(PROTO_AUTHENTICATE, 1, 0., NULL);
-
-       if (HAVE_OPT( AUTHNOREQ ))
+       else if (HAVE_OPT( AUTHNOREQ ))
                proto_config(PROTO_AUTHENTICATE, 0, 0., NULL);
 
        if (HAVE_OPT( BCASTSYNC ))
@@ -75,24 +67,12 @@ getCmdOpts(
        if (HAVE_OPT( PANICGATE ))
                allow_panic = TRUE;
 
-       if (HAVE_OPT( JAILDIR )) {
 #ifdef HAVE_DROPROOT
-                       droproot = 1;
-                       chrootdir = OPT_ARG( JAILDIR );
-#else
-                       fprintf(stderr, 
-                               "command line -i option (jaildir) is not supported by this binary"
-# ifndef SYS_WINNT
-                               ",\n" "can not drop root privileges.  See configure options\n"
-                               "--enable-clockctl and --enable-linuxcaps.\n");
-# else
-                               ".\n");
-# endif
-                       msyslog(LOG_ERR, 
-                               "command line -i option (jaildir) is not supported by this binary.");
-                       errflg++;
-#endif
+       if (HAVE_OPT( JAILDIR )) {
+               droproot = 1;
+               chrootdir = OPT_ARG( JAILDIR );
        }
+#endif
 
        if (HAVE_OPT( KEYFILE ))
                getauthkeys(OPT_ARG( KEYFILE ));
@@ -139,27 +119,15 @@ getCmdOpts(
                } while (--ct > 0);
        }
 
-       if (HAVE_OPT( USER )) {
 #ifdef HAVE_DROPROOT
+       if (HAVE_OPT( USER )) {
                droproot = 1;
                user = estrdup(OPT_ARG( USER ));
                group = rindex(user, ':');
                if (group)
                        *group++ = '\0'; /* get rid of the ':' */
-#else
-               fprintf(stderr, 
-                       "command line -u/--user option is not supported by this binary"
-# ifndef SYS_WINNT
-                       ",\n" "can not drop root privileges.  See configure options\n"
-                       "--enable-clockctl and --enable-linuxcaps.\n");
-# else
-                       ".\n");
-# endif
-               msyslog(LOG_ERR, 
-                       "command line -u/--user option is not supported by this binary.");
-               errflg++;
-#endif
        }
+#endif
 
        if (HAVE_OPT( VAR )) {
                int             ct = STACKCT_OPT(  VAR );
index 5d3d55338ff3ad6ac191481f0e0847597f3d7bf4..91e3d705b407f076c895de67ca340943a44da8f6 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpd-opts.c)
  *  
- *  It has been AutoGen-ed  November 17, 2009 at 07:26:39 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 17, 2009 at 05:35:44 PM by AutoGen 5.10
  *  From the definitions    ntpd-opts.def
  *  and the template file   options
  *
@@ -67,21 +67,29 @@ extern tUsageProc optionUsage;
 #endif
 
 /*
- *  Ipv4 option description:
+ *  Ipv4 option description with
+ *  "Must also have options" and "Incompatible options":
  */
 tSCC    zIpv4Text[] =
         "Force IPv4 DNS name resolution";
 tSCC    zIpv4_NAME[]               = "IPV4";
 tSCC    zIpv4_Name[]               = "ipv4";
+static const int
+    aIpv4CantList[] = {
+    INDEX_OPT_IPV6, NO_EQUIVALENT };
 #define IPV4_FLAGS       (OPTST_DISABLED)
 
 /*
- *  Ipv6 option description:
+ *  Ipv6 option description with
+ *  "Must also have options" and "Incompatible options":
  */
 tSCC    zIpv6Text[] =
         "Force IPv6 DNS name resolution";
 tSCC    zIpv6_NAME[]               = "IPV6";
 tSCC    zIpv6_Name[]               = "ipv6";
+static const int
+    aIpv6CantList[] = {
+    INDEX_OPT_IPV4, NO_EQUIVALENT };
 #define IPV6_FLAGS       (OPTST_DISABLED)
 
 /*
@@ -142,8 +150,8 @@ tSCC    zDebug_Level_Name[]        = "debug-level";
 #else   /* disable Debug_Level */
 #define DEBUG_LEVEL_FLAGS       (OPTST_OMITTED | OPTST_NO_INIT)
 #define zDebug_Level_NAME      NULL
-#define zDebug_LevelText       NULL
-#define zDebug_Level_Name      NULL
+tSCC zDebug_Level_Name[] = "debug-level";
+tSCC zDebug_LevelText[]  = "this package was built using 'configure --disable--debug'";
 #endif  /* DEBUG */
 
 /*
@@ -160,8 +168,8 @@ tSCC    zSet_Debug_Level_Name[]    = "set-debug-level";
 #else   /* disable Set_Debug_Level */
 #define SET_DEBUG_LEVEL_FLAGS       (OPTST_OMITTED | OPTST_NO_INIT)
 #define zSet_Debug_Level_NAME      NULL
-#define zSet_Debug_LevelText       NULL
-#define zSet_Debug_Level_Name      NULL
+tSCC zSet_Debug_Level_Name[] = "set-debug-level";
+tSCC zSet_Debug_LevelText[]  = "this package was built using 'configure --disable--debug'";
 #endif  /* DEBUG */
 
 /*
@@ -197,8 +205,8 @@ tSCC    zJaildir_Name[]            = "jaildir";
 #else   /* disable Jaildir */
 #define JAILDIR_FLAGS       (OPTST_OMITTED | OPTST_NO_INIT)
 #define zJaildir_NAME      NULL
-#define zJaildirText       NULL
-#define zJaildir_Name      NULL
+tSCC zJaildir_Name[] = "jaildir";
+tSCC zJaildirText[]  = "built without --enable-clockctl or --enable-linuxcaps";
 #endif  /* HAVE_DROPROOT */
 
 /*
@@ -366,8 +374,8 @@ tSCC    zUser_Name[]               = "user";
 #else   /* disable User */
 #define USER_FLAGS       (OPTST_OMITTED | OPTST_NO_INIT)
 #define zUser_NAME      NULL
-#define zUserText       NULL
-#define zUser_Name      NULL
+tSCC zUser_Name[] = "user";
+tSCC zUserText[]  = "built without --enable-clockctl or --enable-linuxcaps";
 #endif  /* HAVE_DROPROOT */
 
 /*
@@ -520,25 +528,25 @@ static tOptProc
  */
 static tOptDesc optDesc[ OPTION_CT ] = {
   {  /* entry idx, value */ 0, VALUE_OPT_IPV4,
-     /* equiv idx, value */ NO_EQUIVALENT, 0,
+     /* equiv idx, value */ 0, VALUE_OPT_IPV4,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ IPV4_FLAGS, 0,
      /* last opt argumnt */ { NULL },
      /* arg list/cookie  */ NULL,
-     /* must/cannot opts */ NULL, NULL,
+     /* must/cannot opts */ NULL, aIpv4CantList,
      /* option proc      */ NULL,
      /* desc, NAME, name */ zIpv4Text, zIpv4_NAME, zIpv4_Name,
      /* disablement strs */ NULL, NULL },
 
   {  /* entry idx, value */ 1, VALUE_OPT_IPV6,
-     /* equiv idx, value */ NOLIMIT, NOLIMIT,
-     /* equivalenced to  */ INDEX_OPT_IPV4,
+     /* equiv idx, value */ 1, VALUE_OPT_IPV6,
+     /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ IPV6_FLAGS, 0,
      /* last opt argumnt */ { NULL },
      /* arg list/cookie  */ NULL,
-     /* must/cannot opts */ NULL, NULL,
+     /* must/cannot opts */ NULL, aIpv6CantList,
      /* option proc      */ NULL,
      /* desc, NAME, name */ zIpv6Text, zIpv6_NAME, zIpv6_Name,
      /* disablement strs */ NULL, NULL },
@@ -957,7 +965,7 @@ tSCC   zBugsAddr[]    = "http://bugs.ntp.org, bugs@ntp.org";
 #define zExplain NULL
 tSCC    zDetail[]     = "\n\n";
 tSCC    zFullVersion[] = NTPD_FULL_VERSION;
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 495 */
+/* extracted from /usr/local/share/autogen/optcode.tpl near line 495 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -1024,12 +1032,12 @@ doUsageOpt(
 static void
 doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
 {
-    /* extracted from ntpdbase-opts.def, line 98 */
+    /* extracted from ntpdbase-opts.def, line 100 */
 DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
 }
 #endif /* defined DEBUG */
 #endif /* defined(TEST_NTPD_OPTS) */
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
+/* extracted from /usr/local/share/autogen/optmain.tpl near line 109 */
 
 #if defined(TEST_NTPD_OPTS) /* TEST MAIN PROCEDURE: */
 
@@ -1044,7 +1052,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTPD_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 627 */
+/* extracted from /usr/local/share/autogen/optcode.tpl near line 627 */
 
 #if ENABLE_NLS
 #include <stdio.h>
index 904e621961673b47f16c8464e5e5af368520a427..53cfad6cb5c899c9223f574fc852d34ebb5abb45 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpd-opts.h)
  *  
- *  It has been AutoGen-ed  November 17, 2009 at 07:26:38 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 17, 2009 at 05:35:44 PM by AutoGen 5.10
  *  From the definitions    ntpd-opts.def
  *  and the template file   options
  *
@@ -286,9 +286,6 @@ typedef enum {
  *  Interface defines for specific options.
  */
 #define VALUE_OPT_IPV4           '4'
-
-#define WHICH_OPT_IPV4           (DESC(IPV4).optActualValue)
-#define WHICH_IDX_IPV4           (DESC(IPV4).optActualIndex)
 #define VALUE_OPT_IPV6           '6'
 #define VALUE_OPT_AUTHREQ        'a'
 #define VALUE_OPT_AUTHNOREQ      'A'
@@ -337,7 +334,7 @@ typedef enum {
                 ntpdOptions.pzCurOpt  = NULL )
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntpdOptions.pUsageProc)( &ntpdOptions, c )
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 409 */
+/* extracted from /usr/local/share/autogen/opthead.tpl near line 409 */
 
 /* * * * * *
  *
index a19eb1cb17d9ff7c57ad2d1200ec25594e98c17e..a954aff4b5287dd88f1eb1a0207303268a512058 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntpd-opts.texi)
 # 
-# It has been AutoGen-ed  November 17, 2009 at 07:26:41 AM by AutoGen 5.10
+# It has been AutoGen-ed  November 17, 2009 at 05:35:45 PM by AutoGen 5.10
 # From the definitions    ntpd-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -63,7 +63,7 @@ This is the automatically generated usage text for ntpd:
 
 @exampleindent 0
 @example
-ntpd - NTP daemon program - Ver. 4.2.5p242-RC
+ntpd - NTP daemon program - Ver. 4.2.5p238-RC
 USAGE:  ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
   Flg Arg Option-Name    Description
    -4 no  ipv4           Force IPv4 DNS name resolution
@@ -130,7 +130,8 @@ This is the ``force ipv4 dns name resolution'' option.
 This option has some usage constraints.  It:
 @itemize @bullet
 @item
-is a member of the ipv4 class of options.
+must not appear in combination with any of the following options:
+ipv6.
 @end itemize
 
 Force DNS resolution of following host names on the command line
@@ -145,7 +146,8 @@ This is the ``force ipv6 dns name resolution'' option.
 This option has some usage constraints.  It:
 @itemize @bullet
 @item
-is a member of the ipv4 class of options.
+must not appear in combination with any of the following options:
+ipv4.
 @end itemize
 
 Force DNS resolution of following host names on the command line
@@ -288,10 +290,17 @@ must be compiled in by defining @code{HAVE_DROPROOT} during the compilation.
 Chroot the server to the directory
 jaildir
 .
-This option also implies that the server attempts to drop root privileges at startup (otherwise, chroot gives very little additional security), and it is only available if the OS supports to run the server without full root privileges.
+This option also implies that the server attempts to drop root privileges at startup.
 You may need to also specify a
 -u
 option.
+This option is only available if the OS supports adjusting the clock
+without full root privileges.
+This option is supported under NetBSD (configure with
+--enable-clockctl
+) and Linux (configure with
+--enable-linuxcaps
+).
 
 @node ntpd interface
 @subsection interface option (-I)
@@ -475,8 +484,9 @@ must be compiled in by defining @code{HAVE_DROPROOT} during the compilation.
 @end itemize
 
 Specify a user, and optionally a group, to switch to.
-This option is only available if the OS supports to run the server without full root privileges.
-Currently, this option is supported under NetBSD (configure with
+This option is only available if the OS supports adjusting the clock
+without full root privileges.
+This option is supported under NetBSD (configure with
 --enable-clockctl
 ) and Linux (configure with
 --enable-linuxcaps
index 98cd70a95d247b1d2f81a34c918c17b324d1b5f4..d8a0da7f60e322e613c8060f211c1441fe76cfba 100644 (file)
@@ -1,7 +1,7 @@
 .TH NTPD 1 2009-11-17 "( 4.2.5p246-RC)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntpd.1)
 .\"  
-.\"  It has been AutoGen-ed  November 17, 2009 at 07:26:40 AM by AutoGen 5.10
+.\"  It has been AutoGen-ed  November 17, 2009 at 05:35:44 PM by AutoGen 5.10
 .\"  From the definitions    ntpd-opts.def
 .\"  and the template file   agman1.tpl
 .\"
@@ -20,14 +20,16 @@ This manual page briefly documents the \fBntpd\fP command.
 .TP
 .BR \-4 ", " \--ipv4
 Force IPv4 DNS name resolution.
-This option is a member of the ipv4 class of options.
+This option must not appear in combination with any of the following options:
+ipv6.
 .sp
 Force DNS resolution of following host names on the command line
 to the IPv4 namespace.
 .TP
 .BR \-6 ", " \--ipv6
 Force IPv6 DNS name resolution.
-This option is a member of the ipv4 class of options.
+This option must not appear in combination with any of the following options:
+ipv4.
 .sp
 Force DNS resolution of following host names on the command line
 to the IPv6 namespace.
@@ -110,10 +112,17 @@ Jail directory.
 Chroot the server to the directory
 jaildir
 .
-This option also implies that the server attempts to drop root privileges at startup (otherwise, chroot gives very little additional security), and it is only available if the OS supports to run the server without full root privileges.
+This option also implies that the server attempts to drop root privileges at startup.
 You may need to also specify a
 -u
 option.
+This option is only available if the OS supports adjusting the clock
+without full root privileges.
+This option is supported under NetBSD (configure with
+--enable-clockctl
+) and Linux (configure with
+--enable-linuxcaps
+).
 .TP
 .BR \-I " \fIiface\fP, " \--interface "=" \fIiface\fP
 Listen on an interface name or address.
@@ -235,8 +244,9 @@ Add a key number to the trusted key list.
 Run as userid (or userid:groupid).
 .sp
 Specify a user, and optionally a group, to switch to.
-This option is only available if the OS supports to run the server without full root privileges.
-Currently, this option is supported under NetBSD (configure with
+This option is only available if the OS supports adjusting the clock
+without full root privileges.
+This option is supported under NetBSD (configure with
 --enable-clockctl
 ) and Linux (configure with
 --enable-linuxcaps
index 21425556f7faa5d1c533634e4b3730beec07b513..586a33e055dcf0ed6163234f6b58ca90b91b9d16 100644 (file)
@@ -13,7 +13,7 @@ test-main;
 flag = {
     name      = ipv4;
     value     = 4;
-    equivalence = ipv4;
+    flags-cant = ipv6;
     descrip   = "Force IPv4 DNS name resolution";
     doc = <<-  _EndOfDoc_
        Force DNS resolution of following host names on the command line
@@ -24,7 +24,7 @@ flag = {
 flag = {
     name      = ipv6;
     value     = 6;
-    equivalence = ipv4;
+    flags-cant = ipv4;
     descrip   = "Force IPv6 DNS name resolution";
     doc = <<-  _EndOfDoc_
        Force DNS resolution of following host names on the command line
@@ -83,6 +83,7 @@ flag = {
     ifdef     = DEBUG;
     nopreset;
     descrip   = "Increase output debug message level";
+    omitted-usage = "this package was built using 'configure --disable--debug'";
     doc = <<-  _EndOfDoc_
        Increase the debugging message output level.
        _EndOfDoc_;
@@ -91,10 +92,11 @@ flag = {
 flag = {
     name      = set-debug-level;
     value     = D;
+    arg-type  = string;
     max       = NOLIMIT;
     ifdef     = DEBUG;
     descrip   = "Set the output debug message level";
-    arg-type  = string;
+    omitted-usage = "this package was built using 'configure --disable--debug'";
     flag-code = 'DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );';
     doc = <<-  _EndOfDoc_
        Set the output debugging level.  Can be supplied multiple times,
@@ -146,14 +148,22 @@ flag = {
     value     = i;
     arg-type  = string;
     descrip   = "Jail directory";
+    omitted-usage = "built without --enable-clockctl or --enable-linuxcaps";
     doc = <<-  _EndOfDoc_
        Chroot the server to the directory
        jaildir
        .
-       This option also implies that the server attempts to drop root privileges at startup (otherwise, chroot gives very little additional security), and it is only available if the OS supports to run the server without full root privileges.
+       This option also implies that the server attempts to drop root privileges at startup.
        You may need to also specify a
        -u
        option.
+       This option is only available if the OS supports adjusting the clock
+       without full root privileges.
+       This option is supported under NetBSD (configure with
+       --enable-clockctl
+       ) and Linux (configure with
+       --enable-linuxcaps
+       ).
        _EndOfDoc_;
 };
 
@@ -347,10 +357,12 @@ flag = {
     value     = u;
     arg-type  = string;
     descrip   = "Run as userid (or userid:groupid)";
+    omitted-usage = "built without --enable-clockctl or --enable-linuxcaps";
     doc = <<-  _EndOfDoc_
        Specify a user, and optionally a group, to switch to.
-       This option is only available if the OS supports to run the server without full root privileges.
-       Currently, this option is supported under NetBSD (configure with
+       This option is only available if the OS supports adjusting the clock
+       without full root privileges.
+       This option is supported under NetBSD (configure with
        --enable-clockctl
        ) and Linux (configure with
        --enable-linuxcaps
index 36b7a901cefafedb30afc590f06ab9c7748c65d3..060c7c74bbcbb597f8c055d8b340f47a3dfea9c5 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpdc-opts.c)
  *  
- *  It has been AutoGen-ed  November 17, 2009 at 07:27:38 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 17, 2009 at 07:34:34 PM by AutoGen 5.10
  *  From the definitions    ntpdc-opts.def
  *  and the template file   options
  *
@@ -67,21 +67,29 @@ extern tUsageProc optionUsage;
 #endif
 
 /*
- *  Ipv4 option description:
+ *  Ipv4 option description with
+ *  "Must also have options" and "Incompatible options":
  */
 tSCC    zIpv4Text[] =
         "Force IPv4 DNS name resolution";
 tSCC    zIpv4_NAME[]               = "IPV4";
 tSCC    zIpv4_Name[]               = "ipv4";
+static const int
+    aIpv4CantList[] = {
+    INDEX_OPT_IPV6, NO_EQUIVALENT };
 #define IPV4_FLAGS       (OPTST_DISABLED)
 
 /*
- *  Ipv6 option description:
+ *  Ipv6 option description with
+ *  "Must also have options" and "Incompatible options":
  */
 tSCC    zIpv6Text[] =
         "Force IPv6 DNS name resolution";
 tSCC    zIpv6_NAME[]               = "IPV6";
 tSCC    zIpv6_Name[]               = "ipv6";
+static const int
+    aIpv6CantList[] = {
+    INDEX_OPT_IPV4, NO_EQUIVALENT };
 #define IPV6_FLAGS       (OPTST_DISABLED)
 
 /*
@@ -254,25 +262,25 @@ static tOptProc
  */
 static tOptDesc optDesc[ OPTION_CT ] = {
   {  /* entry idx, value */ 0, VALUE_OPT_IPV4,
-     /* equiv idx, value */ NO_EQUIVALENT, 0,
+     /* equiv idx, value */ 0, VALUE_OPT_IPV4,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ IPV4_FLAGS, 0,
      /* last opt argumnt */ { NULL },
      /* arg list/cookie  */ NULL,
-     /* must/cannot opts */ NULL, NULL,
+     /* must/cannot opts */ NULL, aIpv4CantList,
      /* option proc      */ NULL,
      /* desc, NAME, name */ zIpv4Text, zIpv4_NAME, zIpv4_Name,
      /* disablement strs */ NULL, NULL },
 
   {  /* entry idx, value */ 1, VALUE_OPT_IPV6,
-     /* equiv idx, value */ NOLIMIT, NOLIMIT,
-     /* equivalenced to  */ INDEX_OPT_IPV4,
+     /* equiv idx, value */ 1, VALUE_OPT_IPV6,
+     /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ IPV6_FLAGS, 0,
      /* last opt argumnt */ { NULL },
      /* arg list/cookie  */ NULL,
-     /* must/cannot opts */ NULL, NULL,
+     /* must/cannot opts */ NULL, aIpv6CantList,
      /* option proc      */ NULL,
      /* desc, NAME, name */ zIpv6Text, zIpv6_NAME, zIpv6_Name,
      /* disablement strs */ NULL, NULL },
@@ -472,7 +480,7 @@ configuration options which can be specified at startup using\n\
 ntpd's configuration file may also be specified at run time using\n\
 [= prog-name =] .\n";
 tSCC    zFullVersion[] = NTPDC_FULL_VERSION;
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 495 */
+/* extracted from /usr/local/share/autogen/optcode.tpl near line 495 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -541,7 +549,7 @@ doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
 DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
 }
 #endif /* defined(TEST_NTPDC_OPTS) */
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
+/* extracted from /usr/local/share/autogen/optmain.tpl near line 109 */
 
 #if defined(TEST_NTPDC_OPTS) /* TEST MAIN PROCEDURE: */
 
@@ -556,7 +564,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTPDC_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 627 */
+/* extracted from /usr/local/share/autogen/optcode.tpl near line 627 */
 
 #if ENABLE_NLS
 #include <stdio.h>
index 0b5aefee9bb19b9cd7ec2786d95bb7b9acf8fbb9..a42eb67c446a468ce455742d44127d35794fb86e 100644 (file)
@@ -15,7 +15,7 @@ test-main;
 flag = {
     name      = ipv4;
     value     = 4;
-    equivalence = ipv4;
+    flags-cant = ipv6;
     descrip   = "Force IPv4 DNS name resolution";
     doc = <<-  _EndOfDoc_
        Force DNS resolution of following host names on the command line
@@ -26,7 +26,7 @@ flag = {
 flag = {
     name      = ipv6;
     value     = 6;
-    equivalence = ipv4;
+    flags-cant = ipv4;
     descrip   = "Force IPv6 DNS name resolution";
     doc = <<-  _EndOfDoc_
        Force DNS resolution of following host names on the command line
index 7509296a2fe5cad5e8685ffcd444efb8f57db73a..c440a4ef019436cf5aa551aa7f1ff4b688f56977 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpdc-opts.h)
  *  
- *  It has been AutoGen-ed  November 17, 2009 at 07:27:38 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 17, 2009 at 07:34:33 PM by AutoGen 5.10
  *  From the definitions    ntpdc-opts.def
  *  and the template file   options
  *
@@ -156,9 +156,6 @@ typedef enum {
  *  Interface defines for specific options.
  */
 #define VALUE_OPT_IPV4           '4'
-
-#define WHICH_OPT_IPV4           (DESC(IPV4).optActualValue)
-#define WHICH_IDX_IPV4           (DESC(IPV4).optActualIndex)
 #define VALUE_OPT_IPV6           '6'
 #define VALUE_OPT_COMMAND        'c'
 #define VALUE_OPT_LISTPEERS      'l'
@@ -187,7 +184,7 @@ typedef enum {
                 ntpdcOptions.pzCurOpt  = NULL )
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntpdcOptions.pUsageProc)( &ntpdcOptions, c )
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 409 */
+/* extracted from /usr/local/share/autogen/opthead.tpl near line 409 */
 
 /* * * * * *
  *
index 94b0286666f4127c894531e55decc010f42312fc..c6f50ed7b0ed85166a3c6b5bc688f83fd150e9a3 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntpdc-opts.texi)
 # 
-# It has been AutoGen-ed  November 17, 2009 at 07:27:40 AM by AutoGen 5.10
+# It has been AutoGen-ed  November 17, 2009 at 07:34:34 PM by AutoGen 5.10
 # From the definitions    ntpdc-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -58,7 +58,7 @@ This is the automatically generated usage text for ntpdc:
 
 @exampleindent 0
 @example
-ntpdc - vendor-specific NTP query program - Ver. 4.2.5p242-RC
+ntpdc - vendor-specific NTP query program - Ver. 4.2.5p238-RC
 USAGE:  ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
   Flg Arg Option-Name    Description
    -4 no  ipv4           Force IPv4 DNS name resolution
@@ -98,8 +98,8 @@ Options are specified by doubled hyphens and their name
 or by a single hyphen and the flag character.
 
 The following option preset mechanisms are supported:
- - reading file /users/stenn/.ntprc
- - reading file /deacon/backroom/snaps/ntp-dev/ntpdc/.ntprc
+ - reading file /a/etc/amd.stage/thump2-g3/export/ntp/home/hart/.ntprc
+ - reading file /a/etc/amd.stage/thump2-g3/export/ntp/home/hart/ntp-dev-1142-79-1343/ntpdc/.ntprc
  - examining environment variables named NTPDC_*
 
 The
@@ -132,7 +132,8 @@ This is the ``force ipv4 dns name resolution'' option.
 This option has some usage constraints.  It:
 @itemize @bullet
 @item
-is a member of the ipv4 class of options.
+must not appear in combination with any of the following options:
+ipv6.
 @end itemize
 
 Force DNS resolution of following host names on the command line
@@ -147,7 +148,8 @@ This is the ``force ipv6 dns name resolution'' option.
 This option has some usage constraints.  It:
 @itemize @bullet
 @item
-is a member of the ipv4 class of options.
+must not appear in combination with any of the following options:
+ipv4.
 @end itemize
 
 Force DNS resolution of following host names on the command line
index cc27bc8b1d2dcec6e00c3852b61bebd8282da3cb..f481323577d80c70d7e13bd0f1b8a0c95e7acf38 100644 (file)
@@ -1,7 +1,7 @@
 .TH NTPDC 1 2009-11-17 "( 4.2.5p246-RC)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntpdc.1)
 .\"  
-.\"  It has been AutoGen-ed  November 17, 2009 at 07:27:39 AM by AutoGen 5.10
+.\"  It has been AutoGen-ed  November 17, 2009 at 07:34:34 PM by AutoGen 5.10
 .\"  From the definitions    ntpdc-opts.def
 .\"  and the template file   agman1.tpl
 .\"
@@ -38,14 +38,16 @@ ntpd's configuration file may also be specified at run time using
 .TP
 .BR \-4 ", " \--ipv4
 Force IPv4 DNS name resolution.
-This option is a member of the ipv4 class of options.
+This option must not appear in combination with any of the following options:
+ipv6.
 .sp
 Force DNS resolution of following host names on the command line
 to the IPv4 namespace.
 .TP
 .BR \-6 ", " \--ipv6
 Force IPv6 DNS name resolution.
-This option is a member of the ipv4 class of options.
+This option must not appear in combination with any of the following options:
+ipv4.
 .sp
 Force DNS resolution of following host names on the command line
 to the IPv6 namespace.
index 1c722d1860a4e932c0ace38fed917b801df04aee..4bfb25ff2dfe6852a5973f7d540f81e985009e6d 100644 (file)
@@ -307,17 +307,12 @@ ntpdcmain(
                argv += optct;
        }
 
-       switch (WHICH_IDX_IPV4) {
-           case INDEX_OPT_IPV4:
+       if (HAVE_OPT(IPV4))
                ai_fam_templ = AF_INET;
-               break;
-           case INDEX_OPT_IPV6:
+       else if (HAVE_OPT(IPV6))
                ai_fam_templ = AF_INET6;
-               break;
-           default:
+       else
                ai_fam_templ = ai_fam_default;
-               break;
-       }
 
        if (HAVE_OPT(COMMAND)) {
                int             cmdct = STACKCT_OPT( COMMAND );
index a21ab62b23c4bca047dd85aa2710b65a97319823..05ead6d70cc816685c4bb91a056957a55c81f5d7 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpq-opts.c)
  *  
- *  It has been AutoGen-ed  November 17, 2009 at 07:28:04 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 17, 2009 at 05:37:44 PM by AutoGen 5.10
  *  From the definitions    ntpq-opts.def
  *  and the template file   options
  *
@@ -447,7 +447,7 @@ information about current state and/or changes in that state.\n\
 The same formats are used in NTPv4, although some of the\n\
 variables have changed and new ones added.\n";
 tSCC    zFullVersion[] = NTPQ_FULL_VERSION;
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 495 */
+/* extracted from /usr/local/share/autogen/optcode.tpl near line 495 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -516,7 +516,7 @@ doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
 DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
 }
 #endif /* defined(TEST_NTPQ_OPTS) */
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
+/* extracted from /usr/local/share/autogen/optmain.tpl near line 109 */
 
 #if defined(TEST_NTPQ_OPTS) /* TEST MAIN PROCEDURE: */
 
@@ -531,7 +531,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTPQ_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 627 */
+/* extracted from /usr/local/share/autogen/optcode.tpl near line 627 */
 
 #if ENABLE_NLS
 #include <stdio.h>
index 5bf78da71d7210b94048df1ec781f21151fb07e1..d7ea4db36ef5f1d3d2dd462055292d4d73ed51fc 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpq-opts.h)
  *  
- *  It has been AutoGen-ed  November 17, 2009 at 07:28:03 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 17, 2009 at 05:37:43 PM by AutoGen 5.10
  *  From the definitions    ntpq-opts.def
  *  and the template file   options
  *
@@ -177,7 +177,7 @@ typedef enum {
                 ntpqOptions.pzCurOpt  = NULL )
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntpqOptions.pUsageProc)( &ntpqOptions, c )
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 409 */
+/* extracted from /usr/local/share/autogen/opthead.tpl near line 409 */
 
 /* * * * * *
  *
index 9679cd91bb3354f6cd38987feb7f047d4c5815d9..f6510eae68c87c5f905baf90b1718961a04d9f39 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntpq-opts.texi)
 # 
-# It has been AutoGen-ed  November 17, 2009 at 07:28:05 AM by AutoGen 5.10
+# It has been AutoGen-ed  November 17, 2009 at 05:37:44 PM by AutoGen 5.10
 # From the definitions    ntpq-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -47,7 +47,7 @@ This is the automatically generated usage text for ntpq:
 
 @exampleindent 0
 @example
-ntpq - standard NTP query program - Ver. 4.2.5p242-RC
+ntpq - standard NTP query program - Ver. 4.2.5p238-RC
 USAGE:  ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
   Flg Arg Option-Name    Description
    -4 no  ipv4           Force IPv4 DNS name resolution
@@ -83,8 +83,8 @@ Options are specified by doubled hyphens and their name
 or by a single hyphen and the flag character.
 
 The following option preset mechanisms are supported:
- - reading file /users/stenn/.ntprc
- - reading file /deacon/backroom/snaps/ntp-dev/ntpq/.ntprc
+ - reading file /a/etc/amd.stage/thump2-g3/export/ntp/home/hart/.ntprc
+ - reading file /a/etc/amd.stage/thump2-g3/export/ntp/home/hart/ntp-dev-1142/ntpq/.ntprc
  - examining environment variables named NTPQ_*
 
 The
index 9e291baa02544bbf637b1ba552338671e61e7f5a..287a837c0ac2242a2b83cede49db50e92517b549 100644 (file)
@@ -1,7 +1,7 @@
 .TH NTPQ 1 2009-11-17 "( 4.2.5p246-RC)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntpq.1)
 .\"  
-.\"  It has been AutoGen-ed  November 17, 2009 at 07:28:05 AM by AutoGen 5.10
+.\"  It has been AutoGen-ed  November 17, 2009 at 05:37:44 PM by AutoGen 5.10
 .\"  From the definitions    ntpq-opts.def
 .\"  and the template file   agman1.tpl
 .\"
index 33b1c920436f98abe447c469a52bcb1721ba697c..d1ebc414ea058fc919936f69644a8bfdc585bb98 100644 (file)
@@ -794,7 +794,8 @@ sendpkt(
        size_t  xdatalen
        )
 {
-       DPRINTF(3, ("Sending %u octets\n", xdatalen));
+       if (debug >= 3)
+               printf("Sending %u octets\n", xdatalen);
 
        if (send(sockfd, xdata, (size_t)xdatalen, 0) == -1) {
                warning("write to %s failed", currenthost, "");
index 784f144958d95179e9dfd7192df3952e6ebc7d6b..2ffc024e1f82f2f4add1395f9c64840fcbdef3bd 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.c)
  *  
- *  It has been AutoGen-ed  November 17, 2009 at 07:28:27 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 17, 2009 at 05:37:58 PM by AutoGen 5.10
  *  From the definitions    ntpsnmpd-opts.def
  *  and the template file   options
  *
@@ -245,7 +245,7 @@ tSCC   zBugsAddr[]    = "http://bugs.ntp.org, bugs@ntp.org";
 #define zExplain NULL
 #define zDetail         NULL
 tSCC    zFullVersion[] = NTPSNMPD_FULL_VERSION;
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 495 */
+/* extracted from /usr/local/share/autogen/optcode.tpl near line 495 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -301,7 +301,7 @@ doUsageOpt(
     (void)pOptions;
     USAGE( EXIT_SUCCESS );
 }
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
+/* extracted from /usr/local/share/autogen/optmain.tpl near line 109 */
 
 #if defined(TEST_NTPSNMPD_OPTS) /* TEST MAIN PROCEDURE: */
 
@@ -316,7 +316,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTPSNMPD_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 627 */
+/* extracted from /usr/local/share/autogen/optcode.tpl near line 627 */
 
 #if ENABLE_NLS
 #include <stdio.h>
index c22aac1b007eb8007856a77a46c023aee71f9711..c7e7bd34e4a2de9184d163da3354e1451deb58ec 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.h)
  *  
- *  It has been AutoGen-ed  November 17, 2009 at 07:28:27 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 17, 2009 at 05:37:58 PM by AutoGen 5.10
  *  From the definitions    ntpsnmpd-opts.def
  *  and the template file   options
  *
@@ -128,7 +128,7 @@ typedef enum {
                 ntpsnmpdOptions.pzCurOpt  = NULL )
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntpsnmpdOptions.pUsageProc)( &ntpsnmpdOptions, c )
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 409 */
+/* extracted from /usr/local/share/autogen/opthead.tpl near line 409 */
 
 /* * * * * *
  *
index 914943f85ee45dd06b03551bc4e31b002ed66df1..cc5a02056e85786c7a40993b4a5b03c5db94057d 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.texi)
 # 
-# It has been AutoGen-ed  November 17, 2009 at 07:28:29 AM by AutoGen 5.10
+# It has been AutoGen-ed  November 17, 2009 at 05:37:59 PM by AutoGen 5.10
 # From the definitions    ntpsnmpd-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -33,7 +33,28 @@ This is the automatically generated usage text for ntpsnmpd:
 
 @exampleindent 0
 @example
-ntpsnmpd is unavailable - no --help
+ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.5p238-RC
+USAGE:  ntpsnmpd [ -<flag> | --<name> ]...
+  Flg Arg Option-Name    Description
+   -n no  nofork         Do not fork
+   -p no  syslog         Log to syslog()
+      opt version        Output version information and exit
+   -? no  help           Display usage information and exit
+   -! no  more-help      Extended usage information passed thru pager
+   -> opt save-opts      Save the option state to a config file
+   -< Str load-opts      Load options from a config file
+                                - disabled as --no-load-opts
+                                - may appear multiple times
+
+Options are specified by doubled hyphens and their name
+or by a single hyphen and the flag character.
+
+The following option preset mechanisms are supported:
+ - reading file /a/etc/amd.stage/thump2-g3/export/ntp/home/hart/.ntprc
+ - reading file /a/etc/amd.stage/thump2-g3/export/ntp/home/hart/ntp-dev-1142/ntpsnmpd/.ntprc
+ - examining environment variables named NTPSNMPD_*
+
+please send bug reports to:  http://bugs.ntp.org, bugs@@ntp.org
 @end example
 @exampleindent 4
 
index bec6e7360af213cc25e446f0b302bdc276f77e10..8a440c953d6cd4a0fbb56c1dff3c7917af477e30 100644 (file)
@@ -17,7 +17,7 @@
 
 char *progname = "sntp";       /* for msyslog */
 
-int ai_fam_pref;
+int ai_fam_pref = AF_UNSPEC;
 volatile int debug;
 
 struct key *keys = NULL;
@@ -66,12 +66,10 @@ sntp_main (
        }
        else {
                /* Check for options -4 and -6 */
-               if(ENABLED_OPT(IPV4))
+               if (HAVE_OPT(IPV4))
                        ai_fam_pref = AF_INET;
-               else if(ENABLED_OPT(IPV6))
+               else if (HAVE_OPT(IPV6))
                        ai_fam_pref = AF_INET6;
-               else 
-                       ai_fam_pref = 0;
        }
 
        log_msg("Started sntp", 0);
index 6223a782d8cb485edc35118353256bd573c1a6b7..01ffaefac349c1e544eb2fa22a4fb71c9531efce 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.c)
  *  
- *  It has been AutoGen-ed  November 17, 2009 at 07:33:00 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 17, 2009 at 07:35:07 PM by AutoGen 5.10
  *  From the definitions    sntp-opts.def
  *  and the template file   options
  *
@@ -58,21 +58,29 @@ extern tUsageProc optionUsage;
 #endif
 
 /*
- *  Ipv4 option description:
+ *  Ipv4 option description with
+ *  "Must also have options" and "Incompatible options":
  */
 tSCC    zIpv4Text[] =
         "Force IPv4 DNS name resolution";
 tSCC    zIpv4_NAME[]               = "IPV4";
 tSCC    zIpv4_Name[]               = "ipv4";
+static const int
+    aIpv4CantList[] = {
+    INDEX_OPT_IPV6, NO_EQUIVALENT };
 #define IPV4_FLAGS       (OPTST_DISABLED)
 
 /*
- *  Ipv6 option description:
+ *  Ipv6 option description with
+ *  "Must also have options" and "Incompatible options":
  */
 tSCC    zIpv6Text[] =
         "Force IPv6 DNS name resolution";
 tSCC    zIpv6_NAME[]               = "IPV6";
 tSCC    zIpv6_Name[]               = "ipv6";
+static const int
+    aIpv6CantList[] = {
+    INDEX_OPT_IPV4, NO_EQUIVALENT };
 #define IPV6_FLAGS       (OPTST_DISABLED)
 
 /*
@@ -251,25 +259,25 @@ static tOptProc
  */
 static tOptDesc optDesc[ OPTION_CT ] = {
   {  /* entry idx, value */ 0, VALUE_OPT_IPV4,
-     /* equiv idx, value */ NO_EQUIVALENT, 0,
+     /* equiv idx, value */ 0, VALUE_OPT_IPV4,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ IPV4_FLAGS, 0,
      /* last opt argumnt */ { NULL },
      /* arg list/cookie  */ NULL,
-     /* must/cannot opts */ NULL, NULL,
+     /* must/cannot opts */ NULL, aIpv4CantList,
      /* option proc      */ NULL,
      /* desc, NAME, name */ zIpv4Text, zIpv4_NAME, zIpv4_Name,
      /* disablement strs */ NULL, NULL },
 
   {  /* entry idx, value */ 1, VALUE_OPT_IPV6,
-     /* equiv idx, value */ NOLIMIT, NOLIMIT,
-     /* equivalenced to  */ INDEX_OPT_IPV4,
+     /* equiv idx, value */ 1, VALUE_OPT_IPV6,
+     /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ IPV6_FLAGS, 0,
      /* last opt argumnt */ { NULL },
      /* arg list/cookie  */ NULL,
-     /* must/cannot opts */ NULL, NULL,
+     /* must/cannot opts */ NULL, aIpv6CantList,
      /* option proc      */ NULL,
      /* desc, NAME, name */ zIpv6Text, zIpv6_NAME, zIpv6_Name,
      /* disablement strs */ NULL, NULL },
@@ -485,7 +493,7 @@ job.\n\
 NTP is the Network Time Protocol (RFC 1305) and SNTP is the\n\
 Simple Network Time Protocol (RFC 2030, which supersedes RFC 1769).\n";
 tSCC    zFullVersion[] = SNTP_FULL_VERSION;
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 495 */
+/* extracted from /usr/local/share/autogen/optcode.tpl near line 495 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -541,7 +549,7 @@ doUsageOpt(
     (void)pOptions;
     USAGE( EXIT_SUCCESS );
 }
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
+/* extracted from /usr/local/share/autogen/optmain.tpl near line 109 */
 
 #if defined(TEST_SNTP_OPTS) /* TEST MAIN PROCEDURE: */
 
@@ -556,7 +564,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_SNTP_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 627 */
+/* extracted from /usr/local/share/autogen/optcode.tpl near line 627 */
 
 #if ENABLE_NLS
 #include <stdio.h>
index 46a410e28f8381ef0ec86ef4586e6ad095a7157e..74bd6268e2c3716ffc5b1e0325c0d709b1dbafd8 100644 (file)
@@ -29,7 +29,7 @@ test-main;
 flag = {
     name      = ipv4;
     value     = 4;
-    equivalence = ipv4;
+    flags-cant = ipv6;
     descrip   = "Force IPv4 DNS name resolution";
     doc = <<-  _EndOfDoc_
        Force DNS resolution of following host names on the command line
@@ -40,7 +40,7 @@ flag = {
 flag = {
     name      = ipv6;
     value     = 6;
-    equivalence = ipv4;
+    flags-cant = ipv4;
     descrip   = "Force IPv6 DNS name resolution";
     doc = <<-  _EndOfDoc_
        Force DNS resolution of following host names on the command line
@@ -48,6 +48,7 @@ flag = {
        _EndOfDoc_;
 };
 
+
 flag = {
     name      = normalverbose;
     value     = d;
index 01f2611910d7f10c33aad438d4e84828ef68e9f0..50af578b1783476e3c13f538b5378ea0dfa69e3f 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.h)
  *  
- *  It has been AutoGen-ed  November 17, 2009 at 07:33:00 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 17, 2009 at 07:35:07 PM by AutoGen 5.10
  *  From the definitions    sntp-opts.def
  *  and the template file   options
  *
@@ -168,9 +168,6 @@ typedef enum {
  *  Interface defines for specific options.
  */
 #define VALUE_OPT_IPV4           '4'
-
-#define WHICH_OPT_IPV4           (DESC(IPV4).optActualValue)
-#define WHICH_IDX_IPV4           (DESC(IPV4).optActualIndex)
 #define VALUE_OPT_IPV6           '6'
 #define VALUE_OPT_NORMALVERBOSE  'd'
 #define VALUE_OPT_KOD            'K'
@@ -205,7 +202,7 @@ typedef enum {
                 sntpOptions.pzCurOpt  = NULL )
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*sntpOptions.pUsageProc)( &sntpOptions, c )
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 409 */
+/* extracted from /usr/local/share/autogen/opthead.tpl near line 409 */
 
 /* * * * * *
  *
index be64e90711f6348914eb2fb0f73fcf9f2036070a..8114b657c24769e5e580b010b45b2aa7f8bc8bb3 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (sntp-opts.texi)
 # 
-# It has been AutoGen-ed  November 17, 2009 at 07:33:02 AM by AutoGen 5.10
+# It has been AutoGen-ed  November 17, 2009 at 07:35:07 PM by AutoGen 5.10
 # From the definitions    sntp-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -50,7 +50,7 @@ This is the automatically generated usage text for sntp:
 
 @exampleindent 0
 @example
-sntp - standard SNTP program - Ver. 4.2.5p242-RC
+sntp - standard SNTP program - Ver. 4.2.5p238-RC
 USAGE:  sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... ...
   Flg Arg Option-Name    Description
    -4 no  ipv4           Force IPv4 DNS name resolution
@@ -86,8 +86,8 @@ Options are specified by doubled hyphens and their name
 or by a single hyphen and the flag character.
 
 The following option preset mechanisms are supported:
- - reading file /users/stenn/.ntprc
- - reading file /deacon/backroom/snaps/ntp-dev/sntp/.ntprc
+ - reading file /a/etc/amd.stage/thump2-g3/export/ntp/home/hart/.ntprc
+ - reading file /a/etc/amd.stage/thump2-g3/export/ntp/home/hart/ntp-dev-1142-79-1343/sntp/.ntprc
  - examining environment variables named SNTP_*
 
 .I sntp
@@ -112,7 +112,8 @@ This is the ``force ipv4 dns name resolution'' option.
 This option has some usage constraints.  It:
 @itemize @bullet
 @item
-is a member of the ipv4 class of options.
+must not appear in combination with any of the following options:
+ipv6.
 @end itemize
 
 Force DNS resolution of following host names on the command line
@@ -127,7 +128,8 @@ This is the ``force ipv6 dns name resolution'' option.
 This option has some usage constraints.  It:
 @itemize @bullet
 @item
-is a member of the ipv4 class of options.
+must not appear in combination with any of the following options:
+ipv4.
 @end itemize
 
 Force DNS resolution of following host names on the command line
index fa0b018d71c43d4e5fcea4d422f679bece5caffa..eb335acbf5cf8d90cc21412bf4d0cab2371eb17c 100644 (file)
@@ -1,7 +1,7 @@
 .TH SNTP 1 2009-11-17 "( 4.2.5p246-RC)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (sntp.1)
 .\"  
-.\"  It has been AutoGen-ed  November 17, 2009 at 07:33:01 AM by AutoGen 5.10
+.\"  It has been AutoGen-ed  November 17, 2009 at 07:35:07 PM by AutoGen 5.10
 .\"  From the definitions    sntp-opts.def
 .\"  and the template file   agman1.tpl
 .\"
@@ -156,14 +156,16 @@ to do this automatically.
 .TP
 .BR \-4 ", " \--ipv4
 Force IPv4 DNS name resolution.
-This option is a member of the ipv4 class of options.
+This option must not appear in combination with any of the following options:
+ipv6.
 .sp
 Force DNS resolution of following host names on the command line
 to the IPv4 namespace.
 .TP
 .BR \-6 ", " \--ipv6
 Force IPv6 DNS name resolution.
-This option is a member of the ipv4 class of options.
+This option must not appear in combination with any of the following options:
+ipv4.
 .sp
 Force DNS resolution of following host names on the command line
 to the IPv6 namespace.
index 62f19ec818dceed7a70f4e0097841007bbddd2e1..aeef0cda0d566e26f7c660dde489b85594046c05 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.c)
  *  
- *  It has been AutoGen-ed  November 17, 2009 at 07:33:15 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 17, 2009 at 05:38:44 PM by AutoGen 5.10
  *  From the definitions    ntp-keygen-opts.def
  *  and the template file   options
  *
@@ -752,7 +752,7 @@ tSCC    zDetail[]     = "\n\
 If there is no new host key, look for an existing one.\n\
 If one is not found, create it.\n";
 tSCC    zFullVersion[] = NTP_KEYGEN_FULL_VERSION;
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 495 */
+/* extracted from /usr/local/share/autogen/optcode.tpl near line 495 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -874,7 +874,7 @@ doOptModulus(tOptions* pOptions, tOptDesc* pOptDesc)
     pOptDesc->optArg.argInt = val;
 }
 #endif /* defined OPENSSL */
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
+/* extracted from /usr/local/share/autogen/optmain.tpl near line 109 */
 
 #if defined(TEST_NTP_KEYGEN_OPTS) /* TEST MAIN PROCEDURE: */
 
@@ -889,7 +889,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTP_KEYGEN_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 627 */
+/* extracted from /usr/local/share/autogen/optcode.tpl near line 627 */
 
 #if ENABLE_NLS
 #include <stdio.h>
index f3ec9cb0c053fb9f330a26824b9a0d03c9003d24..4b93831c62f146b6904632c9908a3d5e96b4831d 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.h)
  *  
- *  It has been AutoGen-ed  November 17, 2009 at 07:33:14 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 17, 2009 at 05:38:44 PM by AutoGen 5.10
  *  From the definitions    ntp-keygen-opts.def
  *  and the template file   options
  *
@@ -252,7 +252,7 @@ typedef enum {
                 ntp_keygenOptions.pzCurOpt  = NULL )
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntp_keygenOptions.pUsageProc)( &ntp_keygenOptions, c )
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 409 */
+/* extracted from /usr/local/share/autogen/opthead.tpl near line 409 */
 
 /* * * * * *
  *
index 66b03d57604ade58dee93b9124098a71df0520e6..0a87cc224164f72a58d6f39b53b4796d2a3af09a 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.texi)
 # 
-# It has been AutoGen-ed  November 17, 2009 at 07:33:17 AM by AutoGen 5.10
+# It has been AutoGen-ed  November 17, 2009 at 05:38:45 PM by AutoGen 5.10
 # From the definitions    ntp-keygen-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -50,8 +50,8 @@ This is the automatically generated usage text for ntp-keygen:
 
 @exampleindent 0
 @example
-Using OpenSSL version 90704f
-ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.5p242-RC
+Using OpenSSL version 90705f
+ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.5p238-RC
 USAGE:  ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
   Flg Arg Option-Name    Description
    -c Str certificate    certificate scheme
@@ -87,8 +87,8 @@ Options are specified by doubled hyphens and their name
 or by a single hyphen and the flag character.
 
 The following option preset mechanisms are supported:
- - reading file /users/stenn/.ntprc
- - reading file /deacon/backroom/snaps/ntp-dev/util/.ntprc
+ - reading file /a/etc/amd.stage/thump2-g3/export/ntp/home/hart/.ntprc
+ - reading file /a/etc/amd.stage/thump2-g3/export/ntp/home/hart/ntp-dev-1142/util/.ntprc
  - examining environment variables named NTP_KEYGEN_*
 
 If there is no new host key, look for an existing one.
index 438f49ae3fde417ae9bddd43ada179e16b07cc64..02051aa7b86187274d5c74a5e1530b2f12b03eb9 100644 (file)
@@ -1,7 +1,7 @@
 .TH NTP-KEYGEN 1 2009-11-17 "(ntp 4.2.5p246-RC)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntp-keygen.1)
 .\"  
-.\"  It has been AutoGen-ed  November 17, 2009 at 07:33:16 AM by AutoGen 5.10
+.\"  It has been AutoGen-ed  November 17, 2009 at 05:38:44 PM by AutoGen 5.10
 .\"  From the definitions    ntp-keygen-opts.def
 .\"  and the template file   agman1.tpl
 .\"