diff --git a/bin/rndc/include/rndc/os.h b/bin/rndc/include/rndc/os.h index 292f7b6a14a4cabb389b04c772bc1499a8dd4a3d..c27e5600b87dc9bb33b83358c686e07fce32a5b8 100644 --- a/bin/rndc/include/rndc/os.h +++ b/bin/rndc/include/rndc/os.h @@ -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 @@ -10,17 +10,12 @@ #include #include -/* - * 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); diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index 85d4b1acd22aaf6225f9b69040b289eabab6f004..7fdf3311f12e60ae8565887ef53080a7e68a1331 100644 --- a/bin/rndc/rndc.c +++ b/bin/rndc/rndc.c @@ -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 @@ -50,11 +50,6 @@ #include #include -#if 0 -#define RNDC_MAIN -#include -#endif - #include "util.h" #ifdef HAVE_ADDRINFO diff --git a/bin/rndc/rndc.docbook b/bin/rndc/rndc.docbook index c6502f9d1729d114efc53e230fc5ecee81fdc905..2e58aabbc75b05695ccfc9e7981c21c25b7d97fa 100644 --- a/bin/rndc/rndc.docbook +++ b/bin/rndc/rndc.docbook @@ -16,7 +16,7 @@ - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --> - + @@ -38,6 +38,7 @@ rndc + @@ -91,6 +92,20 @@ + + -k key-file + + + Use key-file + as the key file instead of the default, + /etc/rndc.key. The key in + /etc/rndc.key will be used to authenticate + commands sent to the server if the config-file + does not exist. + + + + -s server diff --git a/bin/rndc/unix/os.c b/bin/rndc/unix/os.c index 1e4cf8a9c70f428aac93db9b52d6de4ac8b315d9..04a90801e03f2ee8de58638c2632773cd44378de 100644 --- a/bin/rndc/unix/os.c +++ b/bin/rndc/unix/os.c @@ -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 @@ -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); diff --git a/bin/rndc/util.h b/bin/rndc/util.h index 5ad58e15c5133aec78640f8de3a6a90224e09ebd..ebc43e5d4178bdb910f56bf8208dbb18c220bfa6 100644 --- a/bin/rndc/util.h +++ b/bin/rndc/util.h @@ -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