RE: 1.7.7: Cannot unmount certain user bind mounts

2010-09-07 Thread John Carey
On Sep 04 01:50 Corinna Vinschen wrote:
> On Sep  3 17:19, John Carey wrote:
> > A user mount whose only non-default option is "bind"
> > cannot be unmounted if its target is a system mount;
> > please see the end of this email for a test case.
> >
> > It looks to me as if the MOUNT_SYSTEM bit is copied from
> > the bind target by mount() in winsup/cygwin/mount.cc.
> 
> Right.  I fixed this in CVS.  I also fixed the problem that bind mounts
> in the user's fstab file were preserving the targets MOUNT_SYSTEM flag.
> And while I was at it, I found that `mount -a' also adds the
> MOUNT_SYSTEM flag if the added mount is from /etc/fstab.  That wasn't
> intended either.  Every mount added via mount(2) is supposed to be a
> user mount.

Thanks for the fix!

-- John

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: 1.7.7: Cannot unmount certain user bind mounts

2010-09-04 Thread Corinna Vinschen
On Sep  3 17:19, John Carey wrote:
> A user mount whose only non-default option is "bind"
> cannot be unmounted if its target is a system mount;
> please see the end of this email for a test case.
> 
> It looks to me as if the MOUNT_SYSTEM bit is copied from
> the bind target by mount() in winsup/cygwin/mount.cc.

Right.  I fixed this in CVS.  I also fixed the problem that bind mounts
in the user's fstab file were preserving the targets MOUNT_SYSTEM flag.
And while I was at it, I found that `mount -a' also adds the
MOUNT_SYSTEM flag if the added mount is from /etc/fstab.  That wasn't
intended either.  Every mount added via mount(2) is supposed to be a
user mount.


Thanks for the testcase,
Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple