]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
cleanup
authorMark Andrews <marka@isc.org>
Mon, 6 Aug 2001 04:25:08 +0000 (04:25 +0000)
committerMark Andrews <marka@isc.org>
Mon, 6 Aug 2001 04:25:08 +0000 (04:25 +0000)
document "rndc -k"

bin/rndc/include/rndc/os.h
bin/rndc/rndc.c
bin/rndc/rndc.docbook
bin/rndc/unix/os.c
bin/rndc/util.h

index 292f7b6a14a4cabb389b04c772bc1499a8dd4a3d..c27e5600b87dc9bb33b83358c686e07fce32a5b8 100644 (file)
@@ -2,7 +2,7 @@
  * 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
 #define RNDC_OS_H 1
 #include <isc/lang.h>
 #include <stdio.h>
 
-/*
- * OS specific paths that may be overriden at runtime by rndc_os_init().
- */
-
-
 ISC_LANG_BEGINDECLS
 
 FILE *safe_create(const char *filename);
 /*
- * Create and open 'filename' for writing.
- * Return NULL if 'filename' already exists.
+ * Open 'filename' for writing, truncate if necessary.  If the file was
+ * created ensure that only the owner can read/write it.
  */
 
 int set_user(FILE *fd, const char *user);
index 85d4b1acd22aaf6225f9b69040b289eabab6f004..7fdf3311f12e60ae8565887ef53080a7e68a1331 100644 (file)
@@ -15,7 +15,7 @@
  * 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
 #include <isccc/types.h>
 #include <isccc/util.h>
 
-#if 0
-#define RNDC_MAIN
-#include <rndc/os.h>
-#endif
-
 #include "util.h"
 
 #ifdef HAVE_ADDRINFO
index c6502f9d1729d114efc53e230fc5ecee81fdc905..2e58aabbc75b05695ccfc9e7981c21c25b7d97fa 100644 (file)
@@ -16,7 +16,7 @@
  - 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>
   <refentryinfo>
@@ -38,6 +38,7 @@
     <cmdsynopsis>
       <command>rndc</command>
       <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>-p <replaceable class="parameter">port</replaceable></option></arg>
       <arg><option>-V</option></arg>
        </listitem>
       </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>
         <term>-s <replaceable class="parameter">server</replaceable></term>
        <listitem>
index 1e4cf8a9c70f428aac93db9b52d6de4ac8b315d9..04a90801e03f2ee8de58638c2632773cd44378de 100644 (file)
@@ -15,7 +15,7 @@
  * 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>
 
@@ -61,7 +61,6 @@ safe_create(const char *filename) {
        fd = open(filename, flags, S_IRUSR|S_IWUSR);
        if (fd == -1)
                return (NULL);
-       (void)fchmod(fd, S_IRUSR|S_IWUSR);
        f = fdopen(fd, "w");
        if (f == NULL)
                close(fd);
index 5ad58e15c5133aec78640f8de3a6a90224e09ebd..ebc43e5d4178bdb910f56bf8208dbb18c220bfa6 100644 (file)
@@ -15,7 +15,7 @@
  * 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
 #define RNDC_UTIL_H 1
@@ -33,7 +33,7 @@
                if (result != ISC_R_SUCCESS) \
                        fatal("%s: %s", name, isc_result_totext(result)); \
                else \
-                       notify(name); \
+                       notify("%s", name); \
        } while (0)
 
 ISC_LANG_BEGINDECLS