summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--auth.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a06ff76d..315a37328 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
120021015 120021015
2 - (bal) Fix bug id 383 and only call loginrestrict for AIX if not root.
3
420021015
2 - (tim) [contrib/caldera/openssh.spec] make ssh-agent setgid nobody 5 - (tim) [contrib/caldera/openssh.spec] make ssh-agent setgid nobody
3 6
420021004 720021004
@@ -764,4 +767,4 @@
764 save auth method before monitor_reset_key_state(); bugzilla bug #284; 767 save auth method before monitor_reset_key_state(); bugzilla bug #284;
765 ok provos@ 768 ok provos@
766 769
767$Id: ChangeLog,v 1.2494 2002/10/15 20:16:55 tim Exp $ 770$Id: ChangeLog,v 1.2495 2002/10/16 00:13:52 mouring Exp $
diff --git a/auth.c b/auth.c
index 48720da8f..4e1dc1641 100644
--- a/auth.c
+++ b/auth.c
@@ -202,7 +202,13 @@ allowed_user(struct passwd * pw)
202 } 202 }
203 203
204#ifdef WITH_AIXAUTHENTICATE 204#ifdef WITH_AIXAUTHENTICATE
205 if (loginrestrictions(pw->pw_name, S_RLOGIN, NULL, &loginmsg) != 0) { 205 /*
206 * Don't check loginrestrictions() for root account (use
207 * PermitRootLogin to control logins via ssh), or if running as
208 * non-root user (since loginrestrictions will always fail).
209 */
210 if ( (pw->pw_uid != 0) && (geteuid() == 0) &&
211 loginrestrictions(pw->pw_name, S_RLOGIN, NULL, &loginmsg) != 0) {
206 if (loginmsg && *loginmsg) { 212 if (loginmsg && *loginmsg) {
207 /* Remove embedded newlines (if any) */ 213 /* Remove embedded newlines (if any) */
208 char *p; 214 char *p;