mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
2624. [func] 'named-checkconf -p' will print out the parsed
configuration. [RT #18871]
This commit is contained in:
parent
6d5852f318
commit
3bc4221346
3 changed files with 34 additions and 5 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
2624. [func] 'named-checkconf -p' will print out the parsed
|
||||
configuration. [RT #18871]
|
||||
|
||||
2623. [bug] Named started seaches for DS non-optimally. [RT #19915]
|
||||
|
||||
2622. [bug] Printing of named.conf grammar was broken. [RT #19919]
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: named-checkconf.c,v 1.48 2009/02/16 23:48:04 tbox Exp $ */
|
||||
/* $Id: named-checkconf.c,v 1.49 2009/07/13 06:57:21 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
|
@ -387,6 +387,15 @@ load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx) {
|
|||
return (result);
|
||||
}
|
||||
|
||||
static void
|
||||
output(void *closure, const char *text, int textlen) {
|
||||
UNUSED(closure);
|
||||
if (fwrite(text, 1, textlen, stdout) != (size_t)textlen) {
|
||||
perror("fwrite");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/*% The main processing routine */
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
|
|
@ -399,10 +408,11 @@ main(int argc, char **argv) {
|
|||
int exit_status = 0;
|
||||
isc_entropy_t *ectx = NULL;
|
||||
isc_boolean_t load_zones = ISC_FALSE;
|
||||
isc_boolean_t print = ISC_FALSE;
|
||||
|
||||
isc_commandline_errprint = ISC_FALSE;
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv, "dhjt:vz")) != EOF) {
|
||||
while ((c = isc_commandline_parse(argc, argv, "dhjt:pvz")) != EOF) {
|
||||
switch (c) {
|
||||
case 'd':
|
||||
debug++;
|
||||
|
|
@ -421,6 +431,10 @@ main(int argc, char **argv) {
|
|||
}
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
print = ISC_TRUE;
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
printf(VERSION "\n");
|
||||
exit(0);
|
||||
|
|
@ -481,6 +495,8 @@ main(int argc, char **argv) {
|
|||
exit_status = 1;
|
||||
}
|
||||
|
||||
if (print && exit_status == 0)
|
||||
cfg_print(config, output, NULL);
|
||||
cfg_obj_destroy(parser, &config);
|
||||
|
||||
cfg_parser_destroy(&parser);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: named-checkconf.docbook,v 1.19 2007/06/19 06:58:03 marka Exp $ -->
|
||||
<!-- $Id: named-checkconf.docbook,v 1.20 2009/07/13 06:57:21 marka Exp $ -->
|
||||
<refentry id="man.named-checkconf">
|
||||
<refentryinfo>
|
||||
<date>June 14, 2000</date>
|
||||
|
|
@ -58,6 +58,7 @@
|
|||
<arg><option>-j</option></arg>
|
||||
<arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg choice="req">filename</arg>
|
||||
<arg><option>-p</option></arg>
|
||||
<arg><option>-z</option></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
|
@ -87,8 +88,7 @@
|
|||
<term>-t <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Chroot to <filename>directory</filename> so that
|
||||
include
|
||||
Chroot to <filename>directory</filename> so that include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
</para>
|
||||
|
|
@ -105,6 +105,16 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-p</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print out the <filename>named.conf</filename> and included files
|
||||
in canonical form if no errors were detected.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-z</term>
|
||||
<listitem>
|
||||
|
|
|
|||
Loading…
Reference in a new issue