summaryrefslogtreecommitdiff
path: root/auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth.c')
-rw-r--r--auth.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/auth.c b/auth.c
index 066b50d6b..48720da8f 100644
--- a/auth.c
+++ b/auth.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: auth.c,v 1.43 2002/05/17 14:27:55 millert Exp $"); 26RCSID("$OpenBSD: auth.c,v 1.45 2002/09/20 18:41:29 stevesk Exp $");
27 27
28#ifdef HAVE_LOGIN_H 28#ifdef HAVE_LOGIN_H
29#include <login.h> 29#include <login.h>
@@ -256,6 +256,14 @@ auth_log(Authctxt *authctxt, int authenticated, char *method, char *info)
256 get_remote_ipaddr(), 256 get_remote_ipaddr(),
257 get_remote_port(), 257 get_remote_port(),
258 info); 258 info);
259
260#ifdef WITH_AIXAUTHENTICATE
261 if (authenticated == 0 && strcmp(method, "password") == 0)
262 loginfailed(authctxt->user,
263 get_canonical_hostname(options.verify_reverse_mapping),
264 "ssh");
265#endif /* WITH_AIXAUTHENTICATE */
266
259} 267}
260 268
261/* 269/*
@@ -392,7 +400,7 @@ check_key_in_hostfiles(struct passwd *pw, Key *key, const char *host,
392 400
393/* 401/*
394 * Check a given file for security. This is defined as all components 402 * Check a given file for security. This is defined as all components
395 * of the path to the file must either be owned by either the owner of 403 * of the path to the file must be owned by either the owner of
396 * of the file or root and no directories must be group or world writable. 404 * of the file or root and no directories must be group or world writable.
397 * 405 *
398 * XXX Should any specific check be done for sym links ? 406 * XXX Should any specific check be done for sym links ?
@@ -476,7 +484,12 @@ getpwnamallow(const char *user)
476 struct passwd *pw; 484 struct passwd *pw;
477 485
478 pw = getpwnam(user); 486 pw = getpwnam(user);
479 if (pw == NULL || !allowed_user(pw)) 487 if (pw == NULL) {
488 log("Illegal user %.100s from %.100s",
489 user, get_remote_ipaddr());
490 return (NULL);
491 }
492 if (!allowed_user(pw))
480 return (NULL); 493 return (NULL);
481#ifdef HAVE_LOGIN_CAP 494#ifdef HAVE_LOGIN_CAP
482 if ((lc = login_getclass(pw->pw_class)) == NULL) { 495 if ((lc = login_getclass(pw->pw_class)) == NULL) {