+* [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
*/
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 ))
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 ));
} 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 );
/*
* 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
*
#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)
/*
#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 */
/*
#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 */
/*
#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 */
/*
#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 */
/*
*/
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 },
#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
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: */
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>
/*
* 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
*
* 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'
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 */
/* * * * * *
*
#
# 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
@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
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
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
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)
@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
.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
.\"
.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.
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.
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
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
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
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_;
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,
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_;
};
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
/*
* 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
*
#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)
/*
*/
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 },
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
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: */
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>
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
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
/*
* 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
*
* 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'
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 */
/* * * * * *
*
#
# 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
@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
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
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
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
.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
.\"
.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.
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 );
/*
* 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
*
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
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: */
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>
/*
* 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
*
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 */
/* * * * * *
*
#
# 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
@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
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
.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
.\"
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, "");
/*
* 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
*
#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
(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: */
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>
/*
* 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
*
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 */
/* * * * * *
*
#
# 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
@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
char *progname = "sntp"; /* for msyslog */
-int ai_fam_pref;
+int ai_fam_pref = AF_UNSPEC;
volatile int debug;
struct key *keys = NULL;
}
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);
/*
* 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
*
#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)
/*
*/
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 },
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
(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: */
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>
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
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
_EndOfDoc_;
};
+
flag = {
name = normalverbose;
value = d;
/*
* 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
*
* 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'
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 */
/* * * * * *
*
#
# 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
@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
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
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
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
.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
.\"
.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.
/*
* 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
*
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
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: */
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>
/*
* 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
*
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 */
/* * * * * *
*
#
# 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
@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
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.
.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
.\"