From owner-freebsd-security Sun Sep 26 16: 8:48 1999 Delivered-To: freebsd-security@freebsd.org Received: from bekool.com (ns2.netquick.net [216.48.34.2]) by hub.freebsd.org (Postfix) with ESMTP id 9E6BD14A0B; Sun, 26 Sep 1999 16:08:44 -0700 (PDT) (envelope-from trouble@hackfurby.com) Received: from angelsguardian.netquick.net ([199.72.47.239] helo=hackfurby.com) by bekool.com with esmtp (Exim 3.03 #1) id 11VNi9-0008bZ-00; Sun, 26 Sep 1999 23:28:06 +0000 Message-ID: <37F007C0.C068FB21@hackfurby.com> Date: Mon, 27 Sep 1999 19:11:44 -0500 From: TrouBle Reply-To: trouble@hackfurby.com X-Mailer: Mozilla 4.61 [en] (X11; I; FreeBSD 3.3-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Carol Deihl , freebsd-security@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: chroot could chdir? (was Re: about jail) References: <199909251302.RAA58030@grendel.sovlink.ru> <19990925171712.A80535@zenon.net> <37EEA27E.244DCF9A@tinker.com> <37F00602.96D098D3@hackfurby.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I actually currently use -----SNIP - EDITED FOR SECURITY ------------- syslog (LOG_NOTICE,"Changing directory/root to %s",path if (chdir (path) || chroot (path)) return 1; }else{ syslog (LOG_NOTICE,"No ("EDITED FOR SECURITY" ) directory for %s: using main" } } execv (argv[0],argv+1); return 1; } -------END - SNIP -------------------------- > > > At the very end of chroot(), could it just > > vrele(fdp->fd_cdir); > > fdp->fd_cdir = nd.ni_vp; > > before it returns, setting the current dir to the same place it > > just chrooted to? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message