summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/session.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2010-06-18 03:16:04 +0000
committerDamien Miller <djm@cvs.openbsd.org>2010-06-18 03:16:04 +0000
commitd555e2fd899dc78266293c93f5d5f2364ffa8f78 (patch)
tree7f04e50756b0e2ed968be93b2ba0c2a488c7ff98 /usr.bin/ssh/session.c
parent73ce923e90d0ee88e72062211788af6acda6b4ee (diff)
Missing check for chroot_director == "none" (we already checked against
NULL); bz#1564 from Jan.Pechanec AT Sun.COM
Diffstat (limited to 'usr.bin/ssh/session.c')
-rw-r--r--usr.bin/ssh/session.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c
index f9922dea428..354df1f9302 100644
--- a/usr.bin/ssh/session.c
+++ b/usr.bin/ssh/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.253 2010/04/23 22:42:05 djm Exp $ */
+/* $OpenBSD: session.c,v 1.254 2010/06/18 03:16:03 djm Exp $ */
/*
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
@@ -1410,7 +1410,8 @@ do_child(Session *s, const char *command)
if (chdir(pw->pw_dir) < 0) {
/* Suppress missing homedir warning for chroot case */
r = login_getcapbool(lc, "requirehome", 0);
- if (r || options.chroot_directory == NULL)
+ if (r || options.chroot_directory == NULL ||
+ strcasecmp(options.chroot_directory, "none") == 0)
fprintf(stderr, "Could not chdir to home "
"directory %s: %s\n", pw->pw_dir,
strerror(errno));