[lsd-devel] stat()
Adam Martin
adam at fsl.cs.sunysb.edu
Sun Oct 30 16:32:43 EST 2005
On 2005 Oct 30 , at 11:46, Justin Hibbits wrote:
> I found a problem with requiring stat() to use a file descriptor.
>
> open() only allows the given modes of access. However, you don't need
> read/write/execute/delete/append or whatever permissions in order to
> stat a
> file in *NIX, and that would cause some problems if someone were to
> try to
> stat a file they have no permission to in a directory they can read.
>
> We should rethink this.
>
You wouldn't need read support for a stat. Just opening with NULL
permissions would be sufficient for a stat.
Open() in LSD associates an fd with an actual file, and permissions to
do stuff. As long as you know the file exists, and can stat it under
*NIX conditions (As a baseline), you can open with NO permissions, and
stat that fd.
--
Adam David Alan Martin
More information about the Lsd-devel
mailing list