Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265686AbTGDC5d (ORCPT ); Thu, 3 Jul 2003 22:57:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265726AbTGDC5d (ORCPT ); Thu, 3 Jul 2003 22:57:33 -0400 Received: from rwcrmhc12.comcast.net ([216.148.227.85]:65014 "EHLO rwcrmhc12.comcast.net") by vger.kernel.org with ESMTP id S265686AbTGDC5c (ORCPT ); Thu, 3 Jul 2003 22:57:32 -0400 Message-ID: <3F04F403.2000809@kegel.com> Date: Thu, 03 Jul 2003 20:26:59 -0700 From: Dan Kegel User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: de-de, en MIME-Version: 1.0 To: linux-kernel@vger.kernel.org Subject: chroot bug if arg not absolute path? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 793 Lines: 21 On my Debian 3.0 system running the 2.4.18 kernel, I ran into a funny problem: /usr/sbin/chroot, or the chroot() system call followed by the chdir() system call, seem to work if their argument is not an absolute path; that is, scandir("/bin") can see the files in the jail, but execlp("/bin/sh", "/bin/sh", 0) fails to find the /bin/sh in the jail, and sets errno to ENOENT. Is this a bug, or do I have a screw loose behind the wheel? - Dan -- Dan Kegel http://www.kegel.com http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/