Wizard-level questions

Barry Shein bzs at world.std.com
Thu Jan 31 08:36:40 AEST 1991


From: greywolf at 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 at world.std.com          | uunet!world!bzs
Purveyors to the Trade | Voice: 617-739-0202        | Login: 617-739-WRLD



More information about the Comp.unix.wizards mailing list