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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to