rndc-confgen.c revision 33b8db1bb3f0aa3a39db459e6a32a1082b8dce13
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (C) 2004, 2005, 2007-2009, 2011 Internet Systems Consortium, Inc. ("ISC")
693d70f96fc2b3c1830580edcc29146afd6a9f61Mark Andrews * Copyright (C) 2001, 2003 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Permission to use, copy, modify, and/or distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * purpose with or without fee is hereby granted, provided that the above
693d70f96fc2b3c1830580edcc29146afd6a9f61Mark Andrews * copyright notice and this permission notice appear in all copies.
693d70f96fc2b3c1830580edcc29146afd6a9f61Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
693d70f96fc2b3c1830580edcc29146afd6a9f61Mark Andrews * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
693d70f96fc2b3c1830580edcc29146afd6a9f61Mark Andrews * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
693d70f96fc2b3c1830580edcc29146afd6a9f61Mark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
693d70f96fc2b3c1830580edcc29146afd6a9f61Mark Andrews * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
693d70f96fc2b3c1830580edcc29146afd6a9f61Mark Andrews * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
693d70f96fc2b3c1830580edcc29146afd6a9f61Mark Andrews * PERFORMANCE OF THIS SOFTWARE.
693d70f96fc2b3c1830580edcc29146afd6a9f61Mark Andrews/* $Id: rndc-confgen.c,v 1.7 2011/03/12 04:59:46 tbox Exp $ */
693d70f96fc2b3c1830580edcc29146afd6a9f61Mark Andrews * rndc-confgen generates configuration files for rndc. It can be used
693d70f96fc2b3c1830580edcc29146afd6a9f61Mark Andrews * as a convenient alternative to writing the rndc.conf file and the
693d70f96fc2b3c1830580edcc29146afd6a9f61Mark Andrews * corresponding controls and key statements in named.conf by hand.
* rndc.key file and avoid the need for a rndc.conf file and a
#include <config.h>
#include <stdlib.h>
#include <stdarg.h>
#include "util.h"
#include "keygen.h"
const char *progname;
ISC_PLATFORM_NORETURN_PRE static void
-k keyname: the name as it will be used in named.conf and rndc.conf\n\
int ch;
int port;
int keysize;
int len;
switch (ch) {
usage(0);
usage(0);
if (argc > 0)
if (keyonly) {
char *buf;
# Start of rndc.conf\n\
# End of rndc.conf\n\
# Use with the following in named.conf, adjusting the allow list as needed:\n\
# End of named.conf\n",
if (show_final_mem)