diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | auth.c | 5 |
2 files changed, 7 insertions, 3 deletions
@@ -18,6 +18,9 @@ | |||
18 | - markus@cvs.openbsd.org 2002/03/14 16:56:33 | 18 | - markus@cvs.openbsd.org 2002/03/14 16:56:33 |
19 | [auth-rh-rsa.c auth-rsa.c auth.h] | 19 | [auth-rh-rsa.c auth-rsa.c auth.h] |
20 | split auth_rsa() for better readability and privsep; ok provos@ | 20 | split auth_rsa() for better readability and privsep; ok provos@ |
21 | - itojun@cvs.openbsd.org 2002/03/15 11:00:38 | ||
22 | [auth.c] | ||
23 | fix file type checking (use S_ISREG). ok by markus | ||
21 | 24 | ||
22 | 20020317 | 25 | 20020317 |
23 | - (tim) [configure.ac] Assume path given with --with-pid-dir=PATH is wanted, | 26 | - (tim) [configure.ac] Assume path given with --with-pid-dir=PATH is wanted, |
@@ -7864,4 +7867,4 @@ | |||
7864 | - Wrote replacements for strlcpy and mkdtemp | 7867 | - Wrote replacements for strlcpy and mkdtemp |
7865 | - Released 1.0pre1 | 7868 | - Released 1.0pre1 |
7866 | 7869 | ||
7867 | $Id: ChangeLog,v 1.1929 2002/03/22 01:12:58 mouring Exp $ | 7870 | $Id: ChangeLog,v 1.1930 2002/03/22 01:15:33 mouring Exp $ |
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: auth.c,v 1.35 2002/03/01 13:12:10 markus Exp $"); | 26 | RCSID("$OpenBSD: auth.c,v 1.36 2002/03/15 11:00:38 itojun Exp $"); |
27 | 27 | ||
28 | #ifdef HAVE_LOGIN_H | 28 | #ifdef HAVE_LOGIN_H |
29 | #include <login.h> | 29 | #include <login.h> |
@@ -110,7 +110,8 @@ allowed_user(struct passwd * pw) | |||
110 | pw->pw_name, shell); | 110 | pw->pw_name, shell); |
111 | return 0; | 111 | return 0; |
112 | } | 112 | } |
113 | if (!((st.st_mode & S_IFREG) && (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)))) { | 113 | if (S_ISREG(st.st_mode) == 0 || |
114 | (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)) == 0) { | ||
114 | log("User %.100s not allowed because shell %.100s is not executable", | 115 | log("User %.100s not allowed because shell %.100s is not executable", |
115 | pw->pw_name, shell); | 116 | pw->pw_name, shell); |
116 | return 0; | 117 | return 0; |