Line 1304 seems incorrect. Call to ask_filename() doesn't modify fname, and hence is of no use. 1293 /* 1294 * Print the SSHFP RR. 1295 */ 1296 static int 1297 do_print_resource_record(struct passwd *pw, char *fname, char *hname) 1298 { 1299 Key *public; 1300 char *comment = NULL; 1301 struct stat st; 1302 1303 if (fname == NULL) 1304 ask_filename(pw, "Enter file in which the key is"); 1305 if (stat(fname, &st) < 0) { 1306 if (errno == ENOENT) 1307 return 0; 1308 perror(fname); 1309 exit(1); 1310 } 1311 public = key_load_public(fname, &comment); 1312 if (public != NULL) { 1313 export_dns_rr(hname, public, stdout, print_generic); 1314 key_free(public); 1315 xfree(comment); 1316 return 1; 1317 } 1318 if (comment) 1319 xfree(comment); 1320 1321 printf("failed to read v2 public key from %s.\n", fname); 1322 exit(1); 1323 }
Created attachment 2310 [details] Skip asking for filename This code is unreachable: the function will never be called with a null filename anyway (see main), so we can just skip asking.
fix applied - this will be in openssh-6.3. Thanks!
closing resolved bugs as of 8.6p1 release