Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!comp.vuw.ac.nz!am.dsir.govt.nz!marcamd!mercury!kcbbs!rden!rden From: rden@rden.gen.nz (Robert den Hartog) Newsgroups: comp.unix.questions Subject: Re: hiding files under a mount point. Message-ID: <1991Apr7.042556.2018@rden.gen.nz> Date: 7 Apr 91 04:25:56 GMT References: <1991Mar18.045734.5114@brolga.cc.uq.oz.au> <1991Apr3.140229.3474@athena.mit.edu> Sender: rden@rden.gen.nz (Robert den Hartog) Reply-To: rden@rden.gen.nz (Robert den Hartog) Organization: Private User Lines: 22 In article <1991Apr3.140229.3474@athena.mit.edu> jik@athena.mit.edu (Jonathan I. Kamens) writes: >In article , mitch@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.