From d555e2fd899dc78266293c93f5d5f2364ffa8f78 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 18 Jun 2010 03:16:04 +0000 Subject: Missing check for chroot_director == "none" (we already checked against NULL); bz#1564 from Jan.Pechanec AT Sun.COM --- usr.bin/ssh/session.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin/ssh/session.c') 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 , 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)); -- cgit v1.2.3