if (fdp->fd_rdir != NULL) {
vrele(fdp->fd_rdir);
vrele(fdp->fd_cdir);
VREF(nd.ni_vp);
fdp->fd_cdir = nd.ni_vp;
}
to this:
/* Don't allow chroots to chroot */
if (fdp->fd_rdir != NULL) {
return(EPERM);
}
Are there any legitimate cases where a chrooted thing chroots
again nowadays? I can imagine where it'd be useful, but I'm not sure how
widely it'd be used...perhaps make double chroots optional at compile
time?
--
dustin sallings The world is watching America,
http://2852210114/~dustin/ and America is watching TV.