]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1734. [cleanup] 'rndc-confgen -a -t' remove extra '/' in path.
authorMark Andrews <marka@isc.org>
Tue, 28 Sep 2004 07:11:25 +0000 (07:11 +0000)
committerMark Andrews <marka@isc.org>
Tue, 28 Sep 2004 07:11:25 +0000 (07:11 +0000)
                        [RT #12588]

CHANGES
bin/rndc/rndc-confgen.c

diff --git a/CHANGES b/CHANGES
index 7b2e5c9b9f38ab8e1c456c336f07dd0db6ae5ab1..c3561e7f2c184810939241effbf1a2968db99d1d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1734.  [cleanup]       'rndc-confgen -a -t' remove extra '/' in path.
+                       [RT #12588]
+
 1733.  [placeholder]   rt12658
 
 1732.  [placeholder]   rt12467
index 37a6ba8c08a127025efab13816aaf94438ecb31e..21f41de7780e5541f96653e16c1432ea5520d9e0 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rndc-confgen.c,v 1.18 2004/03/05 04:58:20 marka Exp $ */
+/* $Id: rndc-confgen.c,v 1.19 2004/09/28 07:11:25 marka Exp $ */
 
 #include <config.h>
 
@@ -273,7 +273,8 @@ main(int argc, char **argv) {
                        buf = isc_mem_get(mctx, len);
                        if (buf == NULL)
                                fatal("isc_mem_get(%d) failed\n", len);
-                       snprintf(buf, len, "%s/%s", chrootdir, keyfile);
+                       snprintf(buf, len, "%s%s%s", chrootdir,
+                                (*keyfile != '/') ? "/" : "", keyfile);
                        
                        write_key_file(buf, user, keyname, &key_txtbuffer);
                        isc_mem_put(mctx, buf, len);