Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!sun-barr!decwrl!world!bzs From: bzs@world.std.com (Barry Shein) Newsgroups: comp.unix.wizards Subject: Re: Wizard-level questions Message-ID: Date: 30 Jan 91 21:36:40 GMT References: <16048@sdcc6.ucsd.edu> <1991Jan26.142403.22812@mp.cs.niu.edu> <3330@unisoft.UUCP> Sender: bzs@world.std.com (Barry Shein) Organization: The World Lines: 49 In-Reply-To: greywolf@unisoft.UUCP's message of 30 Jan 91 03:12:23 GMT From: greywolf@unisoft.UUCP (The Grey Wolf) >But one I've been wondering about is, why not an istat(dev, ino, statbuf) >call? > >It's been argued that getting statistics about a certain inode would be >insecure, but I fail to see the logic on this one. Of course, it might >not be too useful, but I bet there are some times where it might be. That's your answer, it's insecure, it violates the model that you need access to the intervening directories to get to a file in any way. Simple models like that tend to be reasonably secure, models based on speculating on what possible mischief could such a feature be put to tend not to be. You find out what was missed in the speculation the hard way. You might want to read up on "covert channels" for starters, the information that a particular file is changing can be interesting (e.g. whether a particular type of logging has been enabled.) >Also, I think there might be some usefulness in having an iname(dev,ino) >system call (restricted to the super-user). What is this supposed to return? Being as file names are not unique and can require a search of the entire file system to find, I assume that's not what you had in mind. The kernel has no magic to find out this information, try the "find" command, nothing less will work (w/o complete re-work of the file system, that is, one can always propose total redesigns to unix which solves any problem at hand.) >The idea of dealing with inode numbers outside the kernel might not be >such a horrible idea. I believe this is partly the philosophy behind >the inode_pagedaemon in MACH (I vaguely recall seeing something like this >on a Mach machine we have here -- the term might be wrong). There's not much you can't do with inodes, as far as information querying goes, right now. Looking at a directory gives you inode to file name mapping, you can do stat's for more info, etc. I think you're presuming some sort of magic on the part of the kernel that basically doesn't exist. I doubt the features in Mach you allude to answer any of these interests. Last I checked enabling that user-level pagedaemon stuff mostly resulted in the kernel panicking all the time and sites generally left it off. The whole thing is rather strange, IMHO. -- -Barry Shein Software Tool & Die | bzs@world.std.com | uunet!world!bzs Purveyors to the Trade | Voice: 617-739-0202 | Login: 617-739-WRLD