Cc: Christoph Hellwig <hch@...>, Hans Reiser <reiser@...>, Alex Zarochentsev <zam@...>, <linux-fsdevel@...>, <linux-kernel@...>, Alexander Lyamin aka FLX <flx@...>, ReiserFS List <reiserfs-list@...>
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.
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