2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

don't die if a key wasn't found

This commit is contained in:
Brian Wellington
2001-03-30 20:00:18 +00:00
parent cf8cc51238
commit 2f8380972f

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rndc.c,v 1.48 2001/03/28 20:17:09 bwelling Exp $ */
/* $Id: rndc.c,v 1.49 2001/03/30 20:00:18 bwelling Exp $ */
/*
* Principal Author: DCL
@@ -489,7 +489,11 @@ main(int argc, char **argv) {
if (strcasecmp(cfg_obj_asstring(cfg_map_getname(key)),
keyname) == 0)
break;
key = NULL;
}
if (elt == NULL) {
fprintf(stderr, "%s: no key definition for name %s\n",
progname, keyname);
exit(1);
}
(void)cfg_map_get(key, "secret", &secretobj);