Messages in this thread | | | Date | Sun, 2 Mar 2003 14:04:30 +0100 | From | DervishD <> | Subject | Re: About /etc/mtab and /proc/mounts |
| |
Hi J.W. :)
jw schultz dixit: > The idea of storing the list of mounted filesystems on a > mounted filesystem is a bad idea from the get-go.
I'm with you on this, with an exception. It's a bad idea provided you have some way to know what filesystems are mounted, together with the options, etc... /bin/mount knows all those options, obviously, and the kernel not always (AFAIK). Don't know why.
> Let the data reside in the kernel and have a procfs or sysfs > entity for it. A symlink from /etc/mtab can keep the old > tools happy.
That's what I propose, too. Even if this lead to technical difficulties, /etc/mtab is, IMHO, obsolete and a better solution tried instead. Obviously I don't have such a solution, but I think that a procfs based solution and a symlink for mtab will work quite good. I know: some systems don't have procfs, but I think that those systems will have a read-only /etc anyway... Other solution is to link /etc/mtab to a point at /var. If 'mount' treats specially the mtab if it is a symlink... well, IMHO this is not correct. Yes, this can lead to an attack, but: 'mount' is a setuid program, and only root can symlink /etc/mtab, true?
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/
| |