X-Git-Url: http://www.project-moonshot.org/gitweb/?p=openssh.git;a=blobdiff_plain;f=auth.c;fp=auth.c;h=ba27ec06e3f7f7cafb739c3745c85ad238d3b3dc;hp=33680b91bfece985507487910825a0bba1e68fe7;hb=991c385d7c6b1c8592b4057bf2e0708ddf9854e9;hpb=7936349b9e64ae69416d60e12997aafe997c455e diff --git a/auth.c b/auth.c index 33680b9..ba27ec0 100644 --- a/auth.c +++ b/auth.c @@ -275,7 +275,8 @@ auth_log(Authctxt *authctxt, int authenticated, char *method, char *info) authmsg, method, authctxt->valid ? "" : "invalid user ", - authctxt->user, + (authctxt->user && authctxt->user[0]) ? + authctxt->user : "unknown", get_remote_ipaddr(), get_remote_port(), info); @@ -587,7 +588,8 @@ getpwnamallow(const char *user) #endif if (pw == NULL) { logit("Invalid user %.100s from %.100s", - user, get_remote_ipaddr()); + (user && user[0]) ? user : "unknown", + get_remote_ipaddr()); #ifdef CUSTOM_FAILED_LOGIN record_failed_login(user, get_canonical_hostname(options.use_dns), "ssh");