lkml.org 
[lkml]   [2004]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: silent semantic changes with reiser4
    Linus Torvalds wrote:
    > And it would be perfectly ok for O_DIRECTORY to open such a file, as long
    > as it opens the directory branch, not the special device.

    What about:

    cd /dev/into_directory_branch/
    run_setuid_program

    -> calls pwd
    pwd opens("."), (".."), ("../..") etc.

    -> the setuid program thus ends up opening a device or fifo,
    when it does pwd's path walk. Yes it could use the getcwd
    syscall, but some programs do their own path walk.

    > I advocated (long ago) something like this for /dev handling, just because
    > I think it would make sense to have
    >
    > /dev/hda <- special file
    > /dev/hda/part1 <- partition 1 (aka /dev/hda1)
    >
    > which just seems like a very obvious and intuitive interface to me. Of
    > course, we have so much legacy in /dev that there's no real point to doing
    > this, but it's still an appealing approach, I think.

    It also fits the container idea very well:

    /dev/hda/part1/ <- the filesystem inside partition 1

    That's not a contrivance, it's what I'd expect to happen if
    /dev/hda is an ordinary file containing a disk image:

    image.bin <- hard disk image (a regular file)
    image.bin/part1 <- partition 1
    image.bin/part1/ <- the filesystem inside partition 1

    That's assuming there's a format handler which recognises that image.

    -- Jamie
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:05    [W:4.178 / U:0.288 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site