summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/auth.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2010-06-22 04:49:47 +0000
committerdjm <djm@openbsd.org>2010-06-22 04:49:47 +0000
commit4497fd87f56b966ba36b572e24938865f73fec11 (patch)
tree1f7741dd64c746580857a9b6af95b62bfb6e5f10 /usr.bin/ssh/auth.c
parentstandardise error messages when attempting to open private key (diff)
downloadwireguard-openbsd-4497fd87f56b966ba36b572e24938865f73fec11.tar.xz
wireguard-openbsd-4497fd87f56b966ba36b572e24938865f73fec11.zip
queue auth debug messages for bad ownership or permissions on the user's
keyfiles. These messages will be sent after the user has successfully authenticated (where our client will display them with LogLevel=debug). bz#1554; ok dtucker@
Diffstat (limited to 'usr.bin/ssh/auth.c')
-rw-r--r--usr.bin/ssh/auth.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/auth.c b/usr.bin/ssh/auth.c
index bde41df2db2..f3919306145 100644
--- a/usr.bin/ssh/auth.c
+++ b/usr.bin/ssh/auth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth.c,v 1.87 2010/05/07 11:30:29 djm Exp $ */
+/* $OpenBSD: auth.c,v 1.88 2010/06/22 04:49:47 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -307,6 +307,8 @@ check_key_in_hostfiles(struct passwd *pw, Key *key, const char *host,
logit("Authentication refused for %.100s: "
"bad owner or modes for %.200s",
pw->pw_name, user_hostfile);
+ auth_debug_add("Ignored %.200s: bad ownership or modes",
+ user_hostfile);
} else {
temporarily_use_uid(pw);
host_status = check_host_in_hostfile(user_hostfile,
@@ -430,6 +432,7 @@ auth_openfile(const char *file, struct passwd *pw, int strict_modes,
secure_filename(f, file, pw, line, sizeof(line)) != 0) {
fclose(f);
logit("Authentication refused: %s", line);
+ auth_debug_add("Ignored %s: %s", file_type, line);
return NULL;
}