summaryrefslogtreecommitdiffstats
path: root/auth2.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-09-30 14:20:03 +1100
committerDamien Miller <djm@mindrot.org>2000-09-30 14:20:03 +1100
commitd344494346f60d8f8d94ed71f126f6541a80babc (patch)
tree13e531626e0a509bf99980c7c76fc57a753b1987 /auth2.c
parentcf3888d396899f82a8ab1f60c6579cbc7887672c (diff)
- (djm) CVS OpenBSD sync:
- markus@cvs.openbsd.org 2000/09/26 13:59:59 [clientloop.c] use debug2 - markus@cvs.openbsd.org 2000/09/27 15:41:34 [auth2.c sshconnect2.c] use key_type() - markus@cvs.openbsd.org 2000/09/28 12:03:18 [channels.c] debug -> debug2 cleanup
Diffstat (limited to 'auth2.c')
-rw-r--r--auth2.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/auth2.c b/auth2.c
index 6ac5d252..2c8c0bfd 100644
--- a/auth2.c
+++ b/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>
@@ -472,8 +472,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 */
@@ -488,9 +490,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;
}
@@ -504,7 +506,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;