From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from syrinx.knorrie.org ([82.94.188.77]:53664 "EHLO syrinx.knorrie.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751273AbdIPNkg (ORCPT ); Sat, 16 Sep 2017 09:40:36 -0400 Received: from [IPv6:2001:980:4a41:fb::12] (unknown [IPv6:2001:980:4a41:fb::12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by syrinx.knorrie.org (Postfix) with ESMTPSA id 4D4C0253D2FA for ; Sat, 16 Sep 2017 15:40:34 +0200 (CEST) Subject: Re: subvolume list as user? From: Hans van Kranenburg To: linux-btrfs@vger.kernel.org References: <20170916094504.GL32347@rus.uni-stuttgart.de> <684fb723-4270-9589-b80b-e60ccc6dadfe@mendix.com> Message-ID: Date: Sat, 16 Sep 2017 15:40:33 +0200 MIME-Version: 1.0 In-Reply-To: <684fb723-4270-9589-b80b-e60ccc6dadfe@mendix.com> Content-Type: text/plain; charset=utf-8 Sender: linux-btrfs-owner@vger.kernel.org List-ID: On 09/16/2017 02:39 PM, Hans van Kranenburg wrote: > On 09/16/2017 11:45 AM, Ulli Horlacher wrote: >> Every user can create subvolumes (and root cannot prevent it!). >> But how can a user list these subvolumes? >> >> tux@xerus:/test/tux: btrfs subvolume create test >> Create subvolume './test' > > From your other posts I don't quickly get if you actually do want to > have this possible, or accept that it's currently like that and try to > do damage control by having users also remove their things again. > > Actually, if you don't want this I think it's quite easily to patch your > kernel with one or two lines of code to disallow it. > >> tux@xerus:/test/tux: btrfs subvolume list . >> ERROR: can't perform the search - Operation not permitted > > Yes, because the SEARCH ioctl only allows root to directly query any of > the filesystem metadata from kernel memory. subvolume list uses this > SEARCH ioctl to find it's info. its! Argh! D: -- Hans van Kranenburg