version 1.112, 2001/10/06 00:14:50 |
version 1.113, 2001/10/06 11:18:19 |
|
|
if (f == NULL) |
if (f == NULL) |
return 0; |
return 0; |
fflush(stdout); |
fflush(stdout); |
|
fprintf(stderr, "%s", prompt); |
while (1) { |
while (1) { |
fprintf(stderr, "%s", prompt); |
|
if (fgets(buf, sizeof(buf), f) == NULL) { |
if (fgets(buf, sizeof(buf), f) == NULL) { |
fprintf(stderr, "\n"); |
fprintf(stderr, "\n"); |
strlcpy(buf, "no", sizeof buf); |
strlcpy(buf, "no", sizeof buf); |
|
|
else if (strcmp(buf, "no") == 0) |
else if (strcmp(buf, "no") == 0) |
retval = 0; |
retval = 0; |
else |
else |
fprintf(stderr, "Please type 'yes' or 'no'.\n"); |
fprintf(stderr, "Please type 'yes' or 'no': "); |
|
|
if (retval != -1) { |
if (retval != -1) { |
if (f != stdin) |
if (f != stdin) |
|
|
"(yes/no)? ", host, ip, type, fp); |
"(yes/no)? ", host, ip, type, fp); |
xfree(fp); |
xfree(fp); |
if (!confirm(prompt)) { |
if (!confirm(prompt)) { |
log("Aborted by user!"); |
|
goto fail; |
goto fail; |
} |
} |
} |
} |
|
|
} else if (options.strict_host_key_checking == 2) { |
} else if (options.strict_host_key_checking == 2) { |
if (!confirm("Are you sure you want " |
if (!confirm("Are you sure you want " |
"to continue connecting (yes/no)? ")) { |
"to continue connecting (yes/no)? ")) { |
log("Aborted by user!"); |
|
goto fail; |
goto fail; |
} |
} |
} |
} |