Date: Mon, 27 Sep 1999 19:11:44 -0500 From: TrouBle <trouble@hackfurby.com> To: Carol Deihl <carol@tinker.com>, freebsd-security@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: chroot could chdir? (was Re: about jail) Message-ID: <37F007C0.C068FB21@hackfurby.com> References: <199909251302.RAA58030@grendel.sovlink.ru> <19990925171712.A80535@zenon.net> <37EEA27E.244DCF9A@tinker.com> <37F00602.96D098D3@hackfurby.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37F007C0.C068FB21>
