From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: [RFC][PATCH 4/3] vfs: Allow rmdir to remove mounts in all but the current mount namespace Date: Fri, 11 Oct 2013 18:39:53 -0700 Message-ID: <87d2nb8dxy.fsf@xmission.com> References: <8761v7h2pt.fsf@tw-ebiederman.twitter.com> <87li281wx6.fsf_-_@xmission.com> <87a9ioo37a.fsf_-_@xmission.com> <20131007043919.GB10284@mail.hallyn.com> <87vc191sf2.fsf@xmission.com> <87d2ngyb02.fsf@xmission.com> <20131008160601.GJ14242@tucsk.piliscsaba.szeredi.hu> <20131008161135.GK14242@tucsk.piliscsaba.szeredi.hu> <87li23trll.fsf@tw-ebiederman.twitter.com> <87vc15mjuw.fsf@xmission.com> <87iox38fkv.fsf@xmission.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Andy Lutomirski , "Serge E. Hallyn" , Al Viro , Linux-Fsdevel , Kernel Mailing List , Rob Landley , Linus Torvalds To: Miklos Szeredi Return-path: In-Reply-To: <87iox38fkv.fsf@xmission.com> (Eric W. Biederman's message of "Fri, 11 Oct 2013 18:04:32 -0700") Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org ebiederm@xmission.com (Eric W. Biederman) writes: > Miklos Szeredi writes: > >> On Thu, Oct 10, 2013 at 1:43 PM, Eric W. Biederman >>> Miklos if you as the fuse maintainer aren't worried about network >>> filesystems, and multiple namespaces I won't worry either. Especially >>> since modern versions of fuse aren't affected. >> >> I think the above conditions (local mount blocks unlink/rename) are >> enough to prevent most of the problems, of which there aren't many in >> any case. > > Dumb question. > > What prevents someone setting up a race between the fusermount > permission checks and replacing the destination with a symlink, perhaps > to /etc/shadow? > > Do we need a MS_NOFOLLOW? Doh! mount(".",...) works just fine.. My apologies for the silly question. Eric