Xref: utzoo comp.unix.wizards:15382 comp.databases:2267 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!nuchat!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.unix.wizards,comp.databases Subject: Re: getcwd() and friends. Message-ID: <3684@ficc.uu.net> Date: 5 Apr 89 04:53:34 GMT References: <3675@ficc.uu.net> <14689@rpp386.Dallas.TX.US> Organization: Xenix Support Lines: 23 In article <3675@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes: >One thing that really would make things a lot easier would be a fchdir() >call, that took a file descriptor and tried to chdir to it. All the info >that UNIX needs for the chdir is available via the fd. In article <14689@rpp386.Dallas.TX.US>, jfh@rpp386.Dallas.TX.US (John F. Haugh II) writes: > However ... all of the information needed for a chdir() is not present > in the file descriptor. It is possible to be handed a file descriptor > which you would not be able to have opened because some component of > the search path denies access now, but at some point in the past did > allow access. That's an issue worth considering, but I'm not sure that it's really a security problem. After all, you could always spawn a child in a directory and send it messages over a pipe. Same thing, just a little more complex. It would be really nice to be able to pass an fd to another program, too. -- Peter da Silva, Xenix Support, Ferranti International Controls Corporation. Business: uunet.uu.net!ficc!peter, peter@ficc.uu.net, +1 713 274 5180. Personal: ...!texbell!sugar!peter, peter@sugar.hackercorp.com.