ALT Linux repositórios
S: | 9.16.44-alt1 |
5.0: | 9.3.6-alt5 |
4.1: | 9.3.6-alt4.M41.2 |
+updates: | 9.3.6-alt4.M41.1 |
4.0: | 9.3.6-alt4.M41.1 |
+updates: | 9.3.6-alt4.M41.1 |
3.0: | 9.2.4.rel-alt2 |
Group :: Sistema/Servidores
RPM: bind
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: bind-9.2.4rc5-alt-rndc-confgen.patch
Download
Download
diff -uprk.orig bind-9.2.4rc5.orig/bin/rndc/rndc-confgen.c bind-9.2.4rc5/bin/rndc/rndc-confgen.c
--- bind-9.2.4rc5.orig/bin/rndc/rndc-confgen.c 2004-03-09 09:09:26 +0300
+++ bind-9.2.4rc5/bin/rndc/rndc-confgen.c 2004-06-30 17:13:39 +0400
@@ -45,7 +45,7 @@
#include "util.h"
-#define DEFAULT_KEYLENGTH 128 /* Bits. */
+#define DEFAULT_KEYLENGTH 256 /* Bits. */
#define DEFAULT_KEYNAME "rndc-key"
#define DEFAULT_SERVER "127.0.0.1"
#define DEFAULT_PORT 953
@@ -134,6 +134,7 @@ main(int argc, char **argv) {
char *chrootdir = NULL;
char *user = NULL;
isc_boolean_t keyonly = ISC_FALSE;
+ isc_boolean_t gen_key_only = ISC_FALSE;
int len;
keydef = keyfile = RNDC_KEYFILE;
@@ -149,11 +150,14 @@ main(int argc, char **argv) {
port = DEFAULT_PORT;
while ((ch = isc_commandline_parse(argc, argv,
- "ab:c:hk:Mmp:r:s:t:u:Vy")) != -1) {
+ "Aab:c:hk:Mmp:r:s:t:u:Vy")) != -1) {
switch (ch) {
case 'a':
keyonly = ISC_TRUE;
break;
+ case 'A':
+ gen_key_only = ISC_TRUE;
+ break;
case 'b':
keysize = strtol(isc_commandline_argument, &p, 10);
if (*p != '\0' || keysize < 0)
@@ -262,7 +266,11 @@ main(int argc, char **argv) {
isc_entropy_detach(&ectx);
dst_lib_destroy();
- if (keyonly) {
+ if (gen_key_only) {
+ printf("%.*s\n",
+ (int)isc_buffer_usedlength(&key_txtbuffer),
+ (char *)isc_buffer_base(&key_txtbuffer));
+ } else if (keyonly) {
write_key_file(keyfile, chrootdir == NULL ? user : NULL,
keyname, &key_txtbuffer);