summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Steves <stevesk@cvs.openbsd.org>2002-09-20 18:41:30 +0000
committerKevin Steves <stevesk@cvs.openbsd.org>2002-09-20 18:41:30 +0000
commite30478e2bbf5c079bb9df747679ead9a9886bc3c (patch)
treef716783718486393ec76446b4843b8f992ba39ba
parentb4a7ae44ba68ee1209f686d659f47f77c759d963 (diff)
log illegal user here for missing privsep case (ssh2).
this is executed in the monitor. ok markus@
-rw-r--r--usr.bin/ssh/auth.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/ssh/auth.c b/usr.bin/ssh/auth.c
index 53bf745f320..e0d98dbfbba 100644
--- a/usr.bin/ssh/auth.c
+++ b/usr.bin/ssh/auth.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth.c,v 1.44 2002/08/08 23:54:52 stevesk Exp $");
+RCSID("$OpenBSD: auth.c,v 1.45 2002/09/20 18:41:29 stevesk Exp $");
#include <libgen.h>
@@ -407,7 +407,12 @@ getpwnamallow(const char *user)
struct passwd *pw;
pw = getpwnam(user);
- if (pw == NULL || !allowed_user(pw))
+ if (pw == NULL) {
+ log("Illegal user %.100s from %.100s",
+ user, get_remote_ipaddr());
+ return (NULL);
+ }
+ if (!allowed_user(pw))
return (NULL);
#ifdef HAVE_LOGIN_CAP
if ((lc = login_getclass(pw->pw_class)) == NULL) {