diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2000-09-27 21:41:35 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2000-09-27 21:41:35 +0000 |
commit | 1dff4a26113d715b8ce228efc1c8ed69e347c123 (patch) | |
tree | 457de76962ada1edfed6111867cd713b9483aa98 /usr.bin/ssh | |
parent | accc1fce1d73b6676f67fdeebfff7e0f990638f5 (diff) |
use key_type()
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/auth2.c | 14 | ||||
-rw-r--r-- | usr.bin/ssh/sshconnect2.c | 6 |
2 files changed, 11 insertions, 9 deletions
diff --git a/usr.bin/ssh/auth2.c b/usr.bin/ssh/auth2.c index ce67c3d3c71..765b48a760c 100644 --- a/usr.bin/ssh/auth2.c +++ b/usr.bin/ssh/auth2.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth2.c,v 1.15 2000/09/21 11:25:32 markus Exp $"); +RCSID("$OpenBSD: auth2.c,v 1.16 2000/09/27 21:41:34 markus Exp $"); #include <openssl/dsa.h> #include <openssl/rsa.h> @@ -410,8 +410,10 @@ user_dsa_key_allowed(struct passwd *pw, Key *key) if (fstat(fileno(f), &st) < 0 || (st.st_uid != 0 && st.st_uid != pw->pw_uid) || (st.st_mode & 022) != 0) { - snprintf(buf, sizeof buf, "DSA authentication refused for %.100s: " - "bad ownership or modes for '%s'.", pw->pw_name, file); + snprintf(buf, sizeof buf, + "%s authentication refused for %.100s: " + "bad ownership or modes for '%s'.", + key_type(key), pw->pw_name, file); fail = 1; } else { /* Check path to SSH_USER_PERMITTED_KEYS */ @@ -426,9 +428,9 @@ user_dsa_key_allowed(struct passwd *pw, Key *key) (st.st_uid != 0 && st.st_uid != pw->pw_uid) || (st.st_mode & 022) != 0) { snprintf(buf, sizeof buf, - "DSA authentication refused for %.100s: " + "%s authentication refused for %.100s: " "bad ownership or modes for '%s'.", - pw->pw_name, line); + key_type(key), pw->pw_name, line); fail = 1; break; } @@ -442,7 +444,7 @@ user_dsa_key_allowed(struct passwd *pw, Key *key) } } found_key = 0; - found = key_new(KEY_DSA); + found = key_new(key->type); while (fgets(line, sizeof(line), f)) { char *cp, *options = NULL; diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c index 855833c0695..eee09a19ca8 100644 --- a/usr.bin/ssh/sshconnect2.c +++ b/usr.bin/ssh/sshconnect2.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect2.c,v 1.20 2000/09/21 11:25:07 markus Exp $"); +RCSID("$OpenBSD: sshconnect2.c,v 1.21 2000/09/27 21:41:34 markus Exp $"); #include <openssl/bn.h> #include <openssl/rsa.h> @@ -534,8 +534,8 @@ userauth_pubkey_identity(Authctxt *authctxt, char *filename) char *passphrase; char prompt[300]; snprintf(prompt, sizeof prompt, - "Enter passphrase for DSA key '%.100s': ", - filename); + "Enter passphrase for %s key '%.100s': ", + key_type(k), filename); for (i = 0; i < options.number_of_password_prompts; i++) { passphrase = read_passphrase(prompt, 0); if (strcmp(passphrase, "") != 0) { |