Re: [patch] do not attempt to update /etc/mtab if it is symbolic link

Jeff Layton <[email protected]>
Newsgroups gmane.linux.file-systems.cifs
Message-ID <[email protected]>
On Tue, 28 Jul 2009 10:50:09 +0530
Suresh Jayaraman <[email protected]> wrote:

> Jeff Layton wrote:
> > On Sun, 26 Jul 2009 15:01:08 -0500
> > Shirish Pargaonkar <[email protected]> wrote:
> > 
> >> If /etc/mtab is a symbolic link to e.g. /proc/mounts, do not update it.
> >>
> >> This is a fix for a bug reported in 4675 on samba bugzilla
> 
> While trying to lookup whether linking /etc/mtab to /proc/mounts is a
> defined/expected behavior, I came across this:
> 
> To quote `mount' man page:
> 
> "When the proc filesystem is mounted (say at /proc), the files /etc/mtab
> and  /proc/mounts  have  very similar contents. The former has somewhat
> more information, such as the mount options used, but is not
> necessarily  up-to-date  (cf.  the  -n option below). It is possible to
> replace /etc/mtab by a symbolic link to /proc/mounts, and especially
> when you have  very large numbers of mounts things will be much faster
> with that symlink, but some information is lost that way, and in
> particular working  with the loop device will be less convenient, and
> using the "user" option will fail."
> 
> So, wondering whether this has anything to do with the failure reported
> on Samba bugzilla 5118 ("user" fstab option vs "user" mount.cifs option)
> as the case was "user" option is expected to work (note: both of them
> reported on Debian which apparently links fstab to /proc/mounts)
> 
> I have not looked at the code, so I might be wrong..
> 
> > Looks good to me.
> > 
> > Acked-by: Jeff Layton <[email protected]>
> 
> Thanks,
> 
> -- 
> Suresh Jayaraman

I don't think that's the case. I'm not sure why it wasn't working for
the reporter there, but it should work now with the changes that I
checked in recently to mount.cifs to fix the setuid behavior.

-- 
Jeff Layton <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.