summaryrefslogtreecommitdiff
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 6ac5d2527..2c8c0bfdd 100644
--- a/auth2.c
+++ b/auth2.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: auth2.c,v 1.15 2000/09/21 11:25:32 markus Exp $"); 26RCSID("$OpenBSD: auth2.c,v 1.16 2000/09/27 21:41:34 markus Exp $");
27 27
28#include <openssl/dsa.h> 28#include <openssl/dsa.h>
29#include <openssl/rsa.h> 29#include <openssl/rsa.h>
@@ -472,8 +472,10 @@ user_dsa_key_allowed(struct passwd *pw, Key *key)
472 if (fstat(fileno(f), &st) < 0 || 472 if (fstat(fileno(f), &st) < 0 ||
473 (st.st_uid != 0 && st.st_uid != pw->pw_uid) || 473 (st.st_uid != 0 && st.st_uid != pw->pw_uid) ||
474 (st.st_mode & 022) != 0) { 474 (st.st_mode & 022) != 0) {
475 snprintf(buf, sizeof buf, "DSA authentication refused for %.100s: " 475 snprintf(buf, sizeof buf,
476 "bad ownership or modes for '%s'.", pw->pw_name, file); 476 "%s authentication refused for %.100s: "
477 "bad ownership or modes for '%s'.",
478 key_type(key), pw->pw_name, file);
477 fail = 1; 479 fail = 1;
478 } else { 480 } else {
479 /* Check path to SSH_USER_PERMITTED_KEYS */ 481 /* Check path to SSH_USER_PERMITTED_KEYS */
@@ -488,9 +490,9 @@ user_dsa_key_allowed(struct passwd *pw, Key *key)
488 (st.st_uid != 0 && st.st_uid != pw->pw_uid) || 490 (st.st_uid != 0 && st.st_uid != pw->pw_uid) ||
489 (st.st_mode & 022) != 0) { 491 (st.st_mode & 022) != 0) {
490 snprintf(buf, sizeof buf, 492 snprintf(buf, sizeof buf,
491 "DSA authentication refused for %.100s: " 493 "%s authentication refused for %.100s: "
492 "bad ownership or modes for '%s'.", 494 "bad ownership or modes for '%s'.",
493 pw->pw_name, line); 495 key_type(key), pw->pw_name, line);
494 fail = 1; 496 fail = 1;
495 break; 497 break;
496 } 498 }
@@ -504,7 +506,7 @@ user_dsa_key_allowed(struct passwd *pw, Key *key)
504 } 506 }
505 } 507 }
506 found_key = 0; 508 found_key = 0;
507 found = key_new(KEY_DSA); 509 found = key_new(key->type);
508 510
509 while (fgets(line, sizeof(line), f)) { 511 while (fgets(line, sizeof(line), f)) {
510 char *cp, *options = NULL; 512 char *cp, *options = NULL;