Commit a769eca4 authored by Mark Andrews's avatar Mark Andrews

cleanup

document "rndc -k"
parent 907ec2c6
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Copyright * Copyright
*/ */
/* $Id: os.h,v 1.2 2001/08/03 23:06:46 gson Exp $ */ /* $Id: os.h,v 1.3 2001/08/06 04:25:07 marka Exp $ */
#ifndef RNDC_OS_H #ifndef RNDC_OS_H
#define RNDC_OS_H 1 #define RNDC_OS_H 1
...@@ -10,17 +10,12 @@ ...@@ -10,17 +10,12 @@
#include <isc/lang.h> #include <isc/lang.h>
#include <stdio.h> #include <stdio.h>
/*
* OS specific paths that may be overriden at runtime by rndc_os_init().
*/
ISC_LANG_BEGINDECLS ISC_LANG_BEGINDECLS
FILE *safe_create(const char *filename); FILE *safe_create(const char *filename);
/* /*
* Create and open 'filename' for writing. * Open 'filename' for writing, truncate if necessary. If the file was
* Return NULL if 'filename' already exists. * created ensure that only the owner can read/write it.
*/ */
int set_user(FILE *fd, const char *user); int set_user(FILE *fd, const char *user);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: rndc.c,v 1.75 2001/08/03 05:56:13 marka Exp $ */ /* $Id: rndc.c,v 1.76 2001/08/06 04:25:03 marka Exp $ */
/* /*
* Principal Author: DCL * Principal Author: DCL
...@@ -50,11 +50,6 @@ ...@@ -50,11 +50,6 @@
#include <isccc/types.h> #include <isccc/types.h>
#include <isccc/util.h> #include <isccc/util.h>
#if 0
#define RNDC_MAIN
#include <rndc/os.h>
#endif
#include "util.h" #include "util.h"
#ifdef HAVE_ADDRINFO #ifdef HAVE_ADDRINFO
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--> -->
<!-- $Id: rndc.docbook,v 1.6 2001/06/10 13:57:53 tale Exp $ --> <!-- $Id: rndc.docbook,v 1.7 2001/08/06 04:25:04 marka Exp $ -->
<refentry> <refentry>
<refentryinfo> <refentryinfo>
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
<cmdsynopsis> <cmdsynopsis>
<command>rndc</command> <command>rndc</command>
<arg><option>-c <replaceable class="parameter">config-file</replaceable></option></arg> <arg><option>-c <replaceable class="parameter">config-file</replaceable></option></arg>
<arg><option>-k <replaceable class="parameter">key-file</replaceable></option></arg>
<arg><option>-s <replaceable class="parameter">server</replaceable></option></arg> <arg><option>-s <replaceable class="parameter">server</replaceable></option></arg>
<arg><option>-p <replaceable class="parameter">port</replaceable></option></arg> <arg><option>-p <replaceable class="parameter">port</replaceable></option></arg>
<arg><option>-V</option></arg> <arg><option>-V</option></arg>
...@@ -91,6 +92,20 @@ ...@@ -91,6 +92,20 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>-k <replaceable class="parameter">key-file</replaceable></term>
<listitem>
<para>
Use <replaceable class="parameter">key-file</replaceable>
as the key file instead of the default,
<filename>/etc/rndc.key</filename>. The key in
<filename>/etc/rndc.key</filename> will be used to authenticate
commands sent to the server if the <replaceable class="parameter">config-file</replaceable>
does not exist.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>-s <replaceable class="parameter">server</replaceable></term> <term>-s <replaceable class="parameter">server</replaceable></term>
<listitem> <listitem>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: os.c,v 1.2 2001/08/04 08:15:02 marka Exp $ */ /* $Id: os.c,v 1.3 2001/08/06 04:25:08 marka Exp $ */
#include <config.h> #include <config.h>
...@@ -61,7 +61,6 @@ safe_create(const char *filename) { ...@@ -61,7 +61,6 @@ safe_create(const char *filename) {
fd = open(filename, flags, S_IRUSR|S_IWUSR); fd = open(filename, flags, S_IRUSR|S_IWUSR);
if (fd == -1) if (fd == -1)
return (NULL); return (NULL);
(void)fchmod(fd, S_IRUSR|S_IWUSR);
f = fdopen(fd, "w"); f = fdopen(fd, "w");
if (f == NULL) if (f == NULL)
close(fd); close(fd);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: util.h,v 1.4 2001/07/17 20:29:19 gson Exp $ */ /* $Id: util.h,v 1.5 2001/08/06 04:25:05 marka Exp $ */
#ifndef RNDC_UTIL_H #ifndef RNDC_UTIL_H
#define RNDC_UTIL_H 1 #define RNDC_UTIL_H 1
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
if (result != ISC_R_SUCCESS) \ if (result != ISC_R_SUCCESS) \
fatal("%s: %s", name, isc_result_totext(result)); \ fatal("%s: %s", name, isc_result_totext(result)); \
else \ else \
notify(name); \ notify("%s", name); \
} while (0) } while (0)
ISC_LANG_BEGINDECLS ISC_LANG_BEGINDECLS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment