summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--auth.c13
2 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 183a9c629..49aec1dd0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
120010318 120010318
2 - (bal) Fixed scp type casing issue which causes "scp: protocol error: 2 - (bal) Fixed scp type casing issue which causes "scp: protocol error:
3 size not delimited" fatal errors when tranfering. 3 size not delimited" fatal errors when tranfering.
4 - OpenBSD CVS Sync
5 - markus@cvs.openbsd.org 2001/03/17 17:27:59
6 [auth.c]
7 check /etc/shells, too
4 8
520010317 920010317
6 - Support usrinfo() on AIX. Based on patch from Gert Doering 10 - Support usrinfo() on AIX. Based on patch from Gert Doering
@@ -4590,4 +4594,4 @@
4590 - Wrote replacements for strlcpy and mkdtemp 4594 - Wrote replacements for strlcpy and mkdtemp
4591 - Released 1.0pre1 4595 - Released 1.0pre1
4592 4596
4593$Id: ChangeLog,v 1.969 2001/03/17 18:07:46 mouring Exp $ 4597$Id: ChangeLog,v 1.970 2001/03/17 23:13:27 mouring Exp $
diff --git a/auth.c b/auth.c
index 3e31a448d..14e7f7e71 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.19 2001/03/02 18:54:31 deraadt Exp $"); 26RCSID("$OpenBSD: auth.c,v 1.20 2001/03/17 17:27:59 markus Exp $");
27 27
28#ifdef HAVE_LOGIN_H 28#ifdef HAVE_LOGIN_H
29#include <login.h> 29#include <login.h>
@@ -57,7 +57,7 @@ int
57allowed_user(struct passwd * pw) 57allowed_user(struct passwd * pw)
58{ 58{
59 struct stat st; 59 struct stat st;
60 char *shell; 60 char *shell, *cp;
61 int i; 61 int i;
62#ifdef WITH_AIXAUTHENTICATE 62#ifdef WITH_AIXAUTHENTICATE
63 char *loginmsg; 63 char *loginmsg;
@@ -95,6 +95,15 @@ allowed_user(struct passwd * pw)
95 */ 95 */
96 shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell; 96 shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell;
97 97
98 /* disallow anyone who does not have a standard shell */
99 setusershell();
100 while ((cp = getusershell()) != NULL)
101 if (strcmp(cp, shell) == 0)
102 break;
103 endusershell();
104 if (cp == NULL)
105 return 0;
106
98 /* deny if shell does not exists or is not executable */ 107 /* deny if shell does not exists or is not executable */
99 if (stat(shell, &st) != 0) 108 if (stat(shell, &st) != 0)
100 return 0; 109 return 0;