diff options
author | kris <kris@FreeBSD.org> | 2000-06-03 09:58:15 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2000-06-03 09:58:15 +0000 |
commit | a55fcaa060a8a5296437da631991116b28e265bd (patch) | |
tree | 2957447454494c2046af5187ecd51e430756eba6 /crypto/openssh/auth.c | |
parent | 0a76acd42d2d8bc381424757c0a50f026a2c4324 (diff) | |
download | FreeBSD-src-a55fcaa060a8a5296437da631991116b28e265bd.zip FreeBSD-src-a55fcaa060a8a5296437da631991116b28e265bd.tar.gz |
Resolve conflicts
Diffstat (limited to 'crypto/openssh/auth.c')
-rw-r--r-- | crypto/openssh/auth.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/crypto/openssh/auth.c b/crypto/openssh/auth.c index 2497e15..5e64cf0 100644 --- a/crypto/openssh/auth.c +++ b/crypto/openssh/auth.c @@ -7,7 +7,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth.c,v 1.6 2000/04/26 21:28:31 markus Exp $"); +RCSID("$OpenBSD: auth.c,v 1.7 2000/05/17 21:37:24 deraadt Exp $"); #include "xmalloc.h" #include "rsa.h" @@ -47,14 +47,21 @@ allowed_user(struct passwd * pw) { struct stat st; struct group *grp; + char *shell; int i; /* Shouldn't be called if pw is NULL, but better safe than sorry... */ if (!pw) return 0; + /* + * Get the shell from the password data. An empty shell field is + * legal, and means /bin/sh. + */ + shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell; + /* deny if shell does not exists or is not executable */ - if (stat(pw->pw_shell, &st) != 0) + if (stat(shell, &st) != 0) return 0; if (!((st.st_mode & S_IFREG) && (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)))) return 0; |