From: Matthias Urlichs (urlichs@smurf.sub.org)
Date: 02/13/93


From: urlichs@smurf.sub.org (Matthias Urlichs)
Subject: Re: A warning
Date: 13 Feb 1993 21:32:17 +0100

In comp.os.linux, article <+-93x!g@rpi.edu>,
  jfritz@rdrc.rpi.edu writes:
> Another useful thing to put into /proc would be the /etc/mtab database
> maintained by mount(). This information has always seemed as a kludge
> keeping it in a file. This will allow a misbehaved mount program to
> fix things. It may also be necessary when (if) user mode file
> systems, or non-root mounts become usable.
>
Good point. However, it isn't that simple because internaly, Linux just
stores inodes and device numbers. The easy hack would be to store the
device names and paths in the kernel, but I don't really like to do that.

Letting mount scan for the correct device in /dev is probably not avoidable.
But I'd like to re-build the path to the root from within the kernel instead
of relying on the user never to rename a directory.
A case could probably be made for storing the path in the kernel, verifying
that it is still correct (and accessible to the user?!?) before returning
it, and either print an error message or rebuild the correct path in the
kernel. However, that would require a rooted path to the mount point.

NB: Are there any problems with non-root mounts, other than requiring
writability of the directory and turning off setuid()/setgid() to all
uids (except the one of the current user of course -- come to think of it,
the NOSUID flag doesn't seem to be implemented yet -- has anybody done it
already, or should I just do it?)

-- 
Birth, n.:
        The first and direst of all disasters.
                -- Ambrose Bierce, "The Devil's Dictionary"
-- 
Matthias Urlichs  --  urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de   /(o\
Humboldtstrasse 7 -- 7500 Karlsruhe 1 -- Germany  --  +49-721-9612521     \o)/