Messages in this thread |  | | | Date | Thu, 23 Mar 2000 18:14:46 -0800 | | From | Mitchell Blank Jr <> | | Subject | Re: fcntl(2) and other file systems like XFS |
| |
Jamie Lokier wrote: > On a file with permission 400 or 200 or 000: > > open("f", 0x4) = -1 EACCES (Permission denied) > > Oh dear, you need to read _and_ write permission to open this file with > mode O_NONE. And then you can't read or write it :-)
Yes, that's very important. There was a long-standing security bug in *BSD's where you could open("/dev/whatever", 0) with no permission on the inode and then do ioctl()s at it. Under linux, you're only allowed to create these special file handles if you have complete permission to open the file. It's counter-intuitive, but correct.
-Mitch
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
|  |