Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp638547pxb; Wed, 27 Jan 2021 17:39:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJzMTVL7Mvkjfdu6w/eO85soCFEMRpM+YX5wL8uJ2rT86ES19aU8BZLN/4qs5Gfitc8cEulR X-Received: by 2002:a05:6402:4310:: with SMTP id m16mr11708924edc.207.1611797947628; Wed, 27 Jan 2021 17:39:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611797947; cv=none; d=google.com; s=arc-20160816; b=Z1LS0Itqup3zNIq8V/C2LFZcC8kxaeIG8YgOdaxoa0mm97j4FkDxIyIP8RSVOmIuoi Y5wLRBkWvJikwzla9nAl/rx8+NAspwO2pG41tmnozV0sVWgM3x8cIZXoiBX5jbx3PDEx yeG6JtRCZ+fv6ZziC9uUnjqll/5Ko/GSrXczsNDTFNXvILoSvXKe3+Ivj7u4nq1ZqBfA oDFoNOkW5nH1qlaBl5bdFPwn/bMDT9xJxcX4/HmFqSI4RE/wb18i1PAufgbYLu00PXw6 jLESRJLhldpucZP6E5IVYc8qKyIgvy0Sz0OBecSTlOdIuEn8HP+ql6FL1lBm+wHMGh9a fOaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=65FVE3sIUI1qUS2aQ7B54EcM5lYLq0ggA4200iyt3fI=; b=GzrRZDL37jw7XHb8Ip4As/y78BNIeCRVCqc81R8kYrbipDeprq2tZOGYQ5X1gKcNkA lHmFAfkC/KCXqH7ZPSnjpD9XnsEqJumHtJj1mTaoReQxwCNNOiCqnynWsinhqqEkk/F2 sPZewqvXI0k20IeuvWIEnQNk/mZLdR7zBB4zUvJv1bCPKoQGRc8DAQxgcrtpMruF98sH 48SttLc7nXupIljkI7w7ZCbeOoR25xnTto0RxPWGrXpA0EvwtZF4SRRR0huW4Ld5rUNy +fcTYc3h6tgoG/CPuVJo2LNz4tiHG1GFjc+jXLabZIjftZjXd3xGwCJ0J7S1SsUD+CBQ Dh2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FgSFYzCy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp21si1592773ejc.108.2021.01.27.17.38.43; Wed, 27 Jan 2021 17:39:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FgSFYzCy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231701AbhA0T45 (ORCPT + 99 others); Wed, 27 Jan 2021 14:56:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231367AbhA0T4z (ORCPT ); Wed, 27 Jan 2021 14:56:55 -0500 Received: from mail-ua1-x92e.google.com (mail-ua1-x92e.google.com [IPv6:2607:f8b0:4864:20::92e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B2EEC061573 for ; Wed, 27 Jan 2021 11:56:15 -0800 (PST) Received: by mail-ua1-x92e.google.com with SMTP id a16so1168938uad.9 for ; Wed, 27 Jan 2021 11:56:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=65FVE3sIUI1qUS2aQ7B54EcM5lYLq0ggA4200iyt3fI=; b=FgSFYzCyE34qUmN13bvroMyOtKF4VyncZ+cUZ5HSu69JWJk+QTFqGb7j0O2X1eiJ8g UtOe3fYCKSUxh067OeTaWjsA+ydU68z/cSfkMr89AJTIqXkLOoTyT8HslXiiXcJ6Uz3p PrS7xdLGOgp6JzRpvL157N8nsTlhaTjvQ9B6+Oe6RB+qaRXhOfM2cyEFFCtGU9rqj2Dq UBMk6jH30QVUfd/ymjM7UCFYi/y7Zd6yEUBub7CNfCs/wZHom+Je6rQewERs/odcUFKf 7mPeRblP4B4BowltsI0VvkRy/wLteLlsP5tWSVuwdOVFykB2eriH7sTmykitYLGOxwEn lWFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=65FVE3sIUI1qUS2aQ7B54EcM5lYLq0ggA4200iyt3fI=; b=iyQcjR1UN0rUUSryvrMcyIutPHhHnrURJ1HQ2h7YC3zRxkAbd1eGIYUj6BD/bVtaY6 VsaWhvTsvwrVvSQI/hTn0eU2V3/jB0DeieJfIfI+0q2NE1pmCOIg5Yam2ZV/k0ZulxUh gle3LwzqIaFkvtRO1oGem5G6q5no0Z7ipktTtssvQ3VkmurE3glmlEMHkAGexOnsmWem HjlGu37q4Tsp1nKtaeIEOPesODfvyJbBKZnhIKLymBZTHa1nh7sp5iBIr8tjovlGSiC+ d2zIDnZizIaBXYn+Zz6+nyERrNvjcuydaYxesfDO7nIyLDCXDhyk/EJkutWx6qd46/NV sJkg== X-Gm-Message-State: AOAM532PvfCXYLa9lw5f/wG03iLJPISN9bjO3KdP/OUfAZYJ02QSFc9s /tImzIoOYeSo4iTfIBDpoF0+74ZTV2nmO5XsXVRdmoAw6HZJ/w== X-Received: by 2002:ab0:2eb0:: with SMTP id y16mr9240152uay.123.1611777374340; Wed, 27 Jan 2021 11:56:14 -0800 (PST) MIME-Version: 1.0 References: <20210123205516.2738060-1-zenczykowski@gmail.com> In-Reply-To: From: =?UTF-8?Q?Maciej_=C5=BBenczykowski?= Date: Wed, 27 Jan 2021 11:56:03 -0800 Message-ID: Subject: Re: [PATCH] configfs: make directories inherit uid/gid from creator To: Greg Kroah-Hartman Cc: Linux Kernel Mailing List , Joel Becker , Christoph Hellwig Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Currently a non-root process can create directories, but cannot > > create stuff in the directories it creates. > > Isn't that on purpose? Is it? What's the use case of being able to create empty directories you can't use? Why allow their creation in the first place then? > > + (void)configfs_setattr(dentry, &ia); > > No need for (void), here, right? Just being clear we're ignoring any potential error return. > And this feels like a big user-visible change, what is going to break > with this? That I don't know, but it's unlikely to break anything, since it's virtually impossible to use as it is now. If non-root creates the directory, it's currently root-owned, so can only be used by root (or something with appropriate caps). Something with capabilities will be able to use it even if it is no longer owned by root.