Return to BSD News archive
Xref: sserve comp.os.386bsd.bugs:2586 comp.os.386bsd.questions:14382 Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!uchinews!vixen.cso.uiuc.edu!howland.reston.ans.net!news.cac.psu.edu!news.pop.psu.edu!hudson.lm.com!news.galt.com!phred.ws.cc.cmu.edu!alex From: alex@pc.cc.cmu.edu (alex wetmore) Newsgroups: comp.os.386bsd.bugs,comp.os.386bsd.questions Subject: Re: chroot() in FreeBSD 1.1.5.1 Followup-To: comp.os.386bsd.bugs,comp.os.386bsd.questions Date: 11 Nov 1994 16:37:46 GMT Organization: Phred Networking Lines: 18 Distribution: world Message-ID: <3a06kq$9bs@dagny.galt.com> References: <39vvl6$90m@clavin.uprc.com> NNTP-Posting-Host: phred.ws.cc.cmu.edu X-Newsreader: TIN [version 1.2 PL2] > Big question: why can't normal users call chroot??? Dirname is the address of the pathname of a directory, terminated by an ASCII NUL. Chroot() causes dirname to become the root directory, that is, the starting point for path searches of pathnames beginning with `/'. In order for a directory to become the root directory a process must have execute (search) access for that directory. It should be noted that chroot() has no effect on the process's current directory. This call is restricted to the super-user. I'm not sure why its implemented this way. I thought I would find an answer in Leffler, et al, but I just checked and it didn't say. The source code for the system call doesn't say either. alex