summaryrefslogtreecommitdiff
path: root/auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth.c')
-rw-r--r--auth.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/auth.c b/auth.c
index 3bfcfd8e2..c3063e422 100644
--- a/auth.c
+++ b/auth.c
@@ -19,6 +19,9 @@ RCSID("$OpenBSD: auth.c,v 1.6 2000/04/26 21:28:31 markus Exp $");
19#include "compat.h" 19#include "compat.h"
20#include "channels.h" 20#include "channels.h"
21#include "match.h" 21#include "match.h"
22#ifdef HAVE_LOGIN_H
23#include <login.h>
24#endif
22 25
23#include "bufaux.h" 26#include "bufaux.h"
24#include "ssh2.h" 27#include "ssh2.h"
@@ -111,8 +114,20 @@ allowed_user(struct passwd * pw)
111 } 114 }
112 115
113#ifdef WITH_AIXAUTHENTICATE 116#ifdef WITH_AIXAUTHENTICATE
114 if (loginrestrictions(pw->pw_name,S_LOGIN,NULL,&loginmsg) != 0) 117 if (loginrestrictions(pw->pw_name,S_RLOGIN,NULL,&loginmsg) != 0) {
118 if (loginmsg && *loginmsg) {
119 /* Remove embedded newlines (if any) */
120 char *p;
121 for (p = loginmsg; *p; p++)
122 if (*p == '\n')
123 *p = ' ';
124 /* Remove trailing newline */
125 *--p = '\0';
126 log("Login restricted for %s: %.100s",
127 pw->pw_name, loginmsg);
128 }
115 return 0; 129 return 0;
130 }
116#endif /* WITH_AIXAUTHENTICATE */ 131#endif /* WITH_AIXAUTHENTICATE */
117 132
118 /* We found no reason not to let this user try to log on... */ 133 /* We found no reason not to let this user try to log on... */