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

View: New views
5 Messages — Rating Filter:   Alert me  

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

by Shirish Pargaonkar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


_______________________________________________
linux-cifs-client mailing list
linux-cifs-client@...
https://lists.samba.org/mailman/listinfo/linux-cifs-client

umount.cifs.symlink.1.patch (1K) Download Attachment

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

by Jeff Layton-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, 26 Jul 2009 15:01:08 -0500
Shirish Pargaonkar <shirishpargaonkar@...> 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

Looks good to me.

Acked-by: Jeff Layton <jlayton@...>
_______________________________________________
linux-cifs-client mailing list
linux-cifs-client@...
https://lists.samba.org/mailman/listinfo/linux-cifs-client

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

by Jeff Layton-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, 26 Jul 2009 15:01:08 -0500
Shirish Pargaonkar <shirishpargaonkar@...> 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

Committed to samba master branch.

--
Jeff Layton <jlayton@...>
_______________________________________________
linux-cifs-client mailing list
linux-cifs-client@...
https://lists.samba.org/mailman/listinfo/linux-cifs-client

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

by Suresh Jayaraman-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jeff Layton wrote:
> On Sun, 26 Jul 2009 15:01:08 -0500
> Shirish Pargaonkar <shirishpargaonkar@...> 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 <jlayton@...>

Thanks,

--
Suresh Jayaraman

_______________________________________________
linux-cifs-client mailing list
linux-cifs-client@...
https://lists.samba.org/mailman/listinfo/linux-cifs-client

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

by Jeff Layton-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 28 Jul 2009 10:50:09 +0530
Suresh Jayaraman <sjayaraman@...> wrote:

> Jeff Layton wrote:
> > On Sun, 26 Jul 2009 15:01:08 -0500
> > Shirish Pargaonkar <shirishpargaonkar@...> 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 <jlayton@...>
>
> 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 <jlayton@...>
_______________________________________________
linux-cifs-client mailing list
linux-cifs-client@...
https://lists.samba.org/mailman/listinfo/linux-cifs-client