From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien ROUCARIES Subject: Re: [PATCH 6/7] vfs: only add " (deleted)" where necessary Date: Mon, 2 Aug 2010 15:21:48 +0200 Message-ID: References: <20100802111955.025275647@szeredi.hu> <20100802112024.851698363@szeredi.hu> <215565.1280754056@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Miklos Szeredi , viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Valdis.Kletnieks@vt.edu Return-path: In-Reply-To: <215565.1280754056@localhost> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, Aug 2, 2010 at 3:00 PM, wrote: > On Mon, 02 Aug 2010 13:20:01 +0200, Miklos Szeredi said: > >> Index: linux-2.6/fs/dcache.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- linux-2.6.orig/fs/dcache.c =A0 =A0 =A0 =A02010-07-06 18:08:16.00= 0000000 +0200 >> +++ linux-2.6/fs/dcache.c =A0 =A0 2010-07-06 18:08:19.000000000 +020= 0 >> @@ -1977,8 +1977,7 @@ global_root: >> =A0 * @buffer: buffer to return value in >> =A0 * @buflen: buffer length >> =A0 * >> - * Convert a dentry into an ASCII path name. If the entry has been = deleted >> - * the string " (deleted)" is appended. Note that this is ambiguous= =2E >> + * Convert a dentry into an ASCII path name. >> =A0 * >> =A0 * Returns a pointer into the buffer or an error code if the >> =A0 * path was too long. > > I'd prefer the comment about it being ambiguous remain. =A0I'm waitin= g to see how > long it takes for somebody to create a security hole by creating a fi= le called > '/etc/some/thing/important (deleted)' and having some software Do The= Wrong > Thing instead to /etc/some/thing/important. > In order to close this kind of hole why not creating a deleted directory on /proc and redirect symbolic link to this directory. And do the same for unreachable. If we use the good permission it will work from a backaward compatibily point of view bastien