summaryrefslogtreecommitdiff
path: root/auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth.c')
-rw-r--r--auth.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/auth.c b/auth.c
index 26dce5b67..de004515f 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.35 2002/03/01 13:12:10 markus Exp $"); 26RCSID("$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;