Xref: utzoo comp.unix.wizards:15375 comp.databases:2263 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!mtxinu!ed From: ed@mtxinu.COM (Ed Gould) Newsgroups: comp.unix.wizards,comp.databases Subject: Re: getcwd() and friends. Message-ID: <811@mtxinu.UUCP> Date: 4 Apr 89 23:59:10 GMT References: <3675@ficc.uu.net> <14689@rpp386.Dallas.TX.US> Reply-To: ed@mtxinu.COM (Ed Gould) Organization: mt Xinu, Berkeley Lines: 20 >>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. >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. Worse than that, the permission required to open a directory is "r" (since one may not open a directory for writing), whereas the permission required to change to one is "x". Hence, Unix protection would be completely violated by the existance of fchdir(). -- Ed Gould mt Xinu, 2560 Ninth St., Berkeley, CA 94710 USA ed@mtxinu.COM +1 415 644 0146 "I'll fight them as a woman, not a lady. I'll fight them as an engineer."