hiding files under a mount point.

Robert den Hartog rden at rden.gen.nz
Sun Apr 7 14:25:56 AEST 1991


In article <1991Apr3.140229.3474 at athena.mit.edu> jik at athena.mit.edu (Jonathan I. Kamens) writes:
>In article <MITCH.91Mar26123609 at hq.af.mil>, mitch at hq.af.mil (Mitch Wright) writes:
>|> Just write your own library routines that quickly unmount the fs, open the
>|> file, and then remount.
>
>  This will only work if no process has any files open on the filesystem
>you're trying to unmount.  In the case of a filesystem like /usr, it is very
>unlikely that no one will have any open files on it when you go to unmount it.
>
While at university we had a little project to read files in a directory with
no read/scan permission, but with read access to the device.  It was just a
matter of getting the inode number for the dir, read the blocks and get the
inode number for the file, then read the file.  By adding this together with
the source for ls, I had quite a sofisticated read anything combined ls/cat
program.  (this was v6, and we didn't have access to fsdb, anyway my little
program was more useful for my purposes.)

Why could the same thing not be used here, all one needs is to get the inode
number of the dir the file system is mounted on, and setuid or similar to the
owner of the device it is on.  Hence also lib routines could likewise be
written.
-- 
The possums are destroying our forests, the rabbits are destroying our farms,
the wasps are destroying our parks, human extravegance our environment,
but what's worse, the government is destroying us.

Hey, have a nice one.   Robert den Hartog. {rden|robert}@{rden|mercury}.gen.nz
	 ...If it don't work, yell it, I like bang paths, they work.



More information about the Comp.unix.questions mailing list