[lkml]   [1999]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Why is chmod(2)?
    Mitchell Blank Jr wrote:
    > I am *very* wary of this idea. A year or two ago there was a big hole
    > in the BSD's because you could do:
    > i = open("foo", 0)
    > without any access to "foo" and get a filedescriptor without read or
    > write access.

    Try it on Linux ;-) O_RDONLY is 0, O_WRONLY is 1, O_RDWR is 2, O_NOACCESS
    is 3. In order to open anything with O_NOACCESS, you're required to have
    both read _and_ write access.

    - Werner

    / Werner Almesberger, ICA, EPFL, CH /

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:54    [W:0.031 / U:12.268 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site