From owner-freebsd-hackers@freebsd.org Sun Sep 27 22:24:07 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B1E8F373E70 for ; Sun, 27 Sep 2020 22:24:07 +0000 (UTC) (envelope-from leres@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C00Yg4FX5z4V2N; Sun, 27 Sep 2020 22:24:07 +0000 (UTC) (envelope-from leres@freebsd.org) Received: from ice.alameda.xse.com (unknown [IPv6:2600:1700:a570:11f0:f2ad:4eff:fe0b:a065]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: leres) by smtp.freebsd.org (Postfix) with ESMTPSA id 1E8F415B0A; Sun, 27 Sep 2020 22:24:07 +0000 (UTC) (envelope-from leres@freebsd.org) Subject: Re: Is it possible to exit the chroot(2) environment? To: Kyle Evans , Yuri References: <9fa46833-63c2-a77f-98dd-111f6502dc74@rawbw.com> <3d17ea59-0e85-4e33-f426-deec99f07b83@rawbw.com> Cc: Freebsd hackers list From: Craig Leres Message-ID: <4702ab92-0cee-133d-62c9-1cfa787379e6@freebsd.org> Date: Sun, 27 Sep 2020 15:24:05 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Sep 2020 22:24:07 -0000 Don't forget about fchdir(), I've used it (in non-chroot()) programs to implement pushd/popd functionality in a recursive function. Craig