+1734. [cleanup] 'rndc-confgen -a -t' remove extra '/' in path.
+ [RT #12588]
+
1733. [placeholder] rt12658
1732. [placeholder] rt12467
* 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>
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);