Re: About /etc/mtab and /proc/mounts

From: DervishD (raul@pleyades.net)
Date: Tue Mar 04 2003 - 06:08:16 EST


    Hi Kasper :)

 Kasper Dupont dixit:
> > If 'mount' treats specially the
> > mtab if it is a symlink... well, IMHO this is not correct. Yes, this
> The reason for mount not to update /etc/mtab if it is a symlink is
> not security concerns, but rather that it could be a symlink to
> /proc/mounts. Another problem is the way the update is actually
> done. A lockfile named /etc/mtab~ is created, and a new mtab is
> written to /etc/mtab.tmp which is later renamed on top of mtab.

    The lockfile was the first reason why we did the symlink. The
/etc was readonly and mount failed.
 
> But if we
> are going to change mount in non-trivial ways, we should aim for a
> better longterm solution.

    You're completely right ;) But, just as I told before, I have no
good solution. I don't remember clearly, but I think that we use
finally another solution for the embedded system, by using a 'fake'
etc, writeable, and after booting, mounting a readonly etc over the
old one, or something like that. Pretty good (I suppose) for the
embedded system, but not a solution for everyday use, IMHO.

    By now I will do with /etc/mtab, but I think I will replace it
with a symlink to /proc, no matter if I lose options, etc... And
really I would like to write my own mount, just for my system, as
I've already done with other binaries. That's what I like free
software: I can write my own software without doing all the work from
zero, using the brains of people far more clever than me for helping
in the effort ;))

    BTW, thanks for your interest in the issue :))

    Raśl
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 07 2003 - 22:00:24 EST