Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!psuvax1!flee From: flee@shire.cs.psu.edu (Felix Lee) Newsgroups: comp.unix.wizards Subject: Re: getcwd() and friends. Message-ID: Date: 9 Apr 89 07:44:27 GMT References: <3675@ficc.uu.net> <14689@rpp386.Dallas.TX.US> <811@mtxinu.UUCP> <4438@psuvax1.cs.psu.edu> <2001@unisoft.UUCP> <4445@psuvax1.cs.psu.edu> <1410@auspex.auspex.com> Sender: news@psuvax1.cs.psu.edu Organization: Penn State University Computer Science Lines: 16 In-reply-to: guy@auspex.auspex.com's message of 9 Apr 89 01:00:42 GMT In article <1410@auspex.auspex.com>, guy@auspex.auspex.com (Guy Harris) writes: >>For one thing, we could introduce O_CHMOD to open for mode changes. >No, not worth it. "fchmod" can - and does - already check whether you >have permission to do a "chmod". Er, the point is to fchmod a file that you don't have permission to open. You need to open a file for no access (O_OPEN?). The idea is to localize file accesses to the open() call, making it easier to interpose user-level file access hooks. If open flags were orthogonal, then O_OPEN would be 0 and the various read/write/etc. modes would be or'ed together. -- Felix Lee flee@shire.cs.psu.edu *!psuvax1!shire!flee