From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [patch 2/8] allow unprivileged umount Date: Sat, 21 Apr 2007 01:01:58 -0700 Message-ID: <4629C4F6.5070907@zytor.com> References: <20070420102532.385211890@szeredi.hu> <20070420102626.825263599@szeredi.hu> <20070421005506.6a315bec.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Miklos Szeredi , serue@us.ibm.com, viro@ftp.linux.org.uk, linuxram@us.ibm.com, ebiederm@xmission.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, containers@lists.osdl.org To: Andrew Morton Return-path: Received: from terminus.zytor.com ([192.83.249.54]:39091 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030307AbXDUIFe (ORCPT ); Sat, 21 Apr 2007 04:05:34 -0400 In-Reply-To: <20070421005506.6a315bec.akpm@linux-foundation.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Andrew Morton wrote: > On Fri, 20 Apr 2007 12:25:34 +0200 Miklos Szeredi wrote: > >> +static bool permit_umount(struct vfsmount *mnt, int flags) >> +{ >> >> ... >> >> + return mnt->mnt_uid == current->uid; >> +} > > Yes, this seems very wrong. I'd have thought that comparing user_struct*'s > would get us a heck of a lot closer to being able to support aliasing of > UIDs between different namespaces. > Not to mention it should be fsuid, not uid. -hpa