Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752116AbZI1OKZ (ORCPT ); Mon, 28 Sep 2009 10:10:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751967AbZI1OKY (ORCPT ); Mon, 28 Sep 2009 10:10:24 -0400 Received: from mail2.shareable.org ([80.68.89.115]:53179 "EHLO mail2.shareable.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751849AbZI1OKY (ORCPT ); Mon, 28 Sep 2009 10:10:24 -0400 Date: Mon, 28 Sep 2009 15:10:25 +0100 From: Jamie Lokier To: Miklos Szeredi Cc: Valdis.Kletnieks@vt.edu, linux@treblig.org, agruen@suse.de, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] vfs: new O_NODE open flag Message-ID: <20090928141025.GF19778@shareable.org> References: <200909250223.58664.agruen@suse.de> <20090925123747.GA31228@gallifrey> <9988.1253899252@turing-police.cc.vt.edu> <20090925183523.GA6065@gallifrey> <19645.1253913514@turing-police.cc.vt.edu> <20090928132845.GC19778@shareable.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 965 Lines: 23 Miklos Szeredi wrote: > > Hmm. I have just tried, and you _can _use open("/proc/self/fd/%d", > > O_RDWR) to re-open with more permissions when you can't access the > > path which /proc/self/fd/%d pretends to link to. It looks a bit > > dubious, as you might have been passed an O_RDONLY descriptor with the > > intention that you can't write to it... Oh well! > > True, /proc gives you access to the underlying "path" of an open file > descriptor. If you don't want that, don't mount /proc in your limited > namespace. I wasn't using a limited namespace. Just a directory without permission to be searched, and as a regular user - which is historically supposed to prevent you from opening files in it. -- Jamie -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/