X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.3 required=5.0	tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE
X-Spam-Check-By: sourceware.org
X-USANET-Source: 165.212.120.254 IN   aeolus@electric-cloud.com s1hub3.EXCHPROD.USA.NET
X-USANET-MsgId: XID991oigRaz4864Xo1
From: John Carey <aeolus@electric-cloud.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Date: Tue, 7 Sep 2010 16:59:20 +0000
Subject: RE: 1.7.7: Cannot unmount certain user bind mounts
Message-ID: <3C031C390CBF1E4A8CE1F74DE7ECAF3A158EDA703B@MBX8.EXCHPROD.USA.NET>
References: <3C031C390CBF1E4A8CE1F74DE7ECAF3A158EDA702F@MBX8.EXCHPROD.USA.NET>,<20100904085040.GD16534@calimero.vinschen.de>
In-Reply-To: <20100904085040.GD16534@calimero.vinschen.de>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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.
>=20
> 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

