From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12E96C4727C for ; Wed, 30 Sep 2020 19:38:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C691920709 for ; Wed, 30 Sep 2020 19:38:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728031AbgI3Tit (ORCPT ); Wed, 30 Sep 2020 15:38:49 -0400 Received: from gateway23.websitewelcome.com ([192.185.50.129]:35408 "EHLO gateway23.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725799AbgI3Tit (ORCPT ); Wed, 30 Sep 2020 15:38:49 -0400 X-Greylist: delayed 1335 seconds by postgrey-1.27 at vger.kernel.org; Wed, 30 Sep 2020 15:38:49 EDT Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway23.websitewelcome.com (Postfix) with ESMTP id E7E171F5E278 for ; Wed, 30 Sep 2020 14:16:25 -0500 (CDT) Received: from gator3309.hostgator.com ([192.254.250.173]) by cmsmtp with SMTP id NhaTk10vZLFNkNhaTk88sA; Wed, 30 Sep 2020 14:16:25 -0500 X-Authority-Reason: nr=8 Received: from [96.232.34.132] (port=57125 helo=[192.168.1.133]) by gator3309.hostgator.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1kNhaR-0037nu-VB; Wed, 30 Sep 2020 14:16:24 -0500 Subject: Re: [PATCH V9 2/4] fuse: Trace daemon creds To: Miklos Szeredi , Alessio Balsini Cc: Akilesh Kailash , Amir Goldstein , David Anderson , Giuseppe Scrivano , Jann Horn , Jens Axboe , Martijn Coenen , Palmer Dabbelt , Paul Lawrence , Stefano Duo , Zimuzo Ezeozue , fuse-devel , kernel-team , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200924131318.2654747-1-balsini@android.com> <20200924131318.2654747-3-balsini@android.com> From: Antonio SJ Musumeci Message-ID: Date: Wed, 30 Sep 2020 15:16:20 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3309.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - spawn.link X-BWhitelist: no X-Source-IP: 96.232.34.132 X-Source-L: No X-Exim-ID: 1kNhaR-0037nu-VB X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([192.168.1.133]) [96.232.34.132]:57125 X-Source-Auth: trapexit@spawn.link X-Email-Count: 16 X-Source-Cap: YmlsZTtiaWxlO2dhdG9yMzMwOS5ob3N0Z2F0b3IuY29t X-Local-Domain: yes Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Archived-At: List-Archive: List-Post: On 9/30/2020 2:45 PM, Miklos Szeredi wrote: > On Thu, Sep 24, 2020 at 3:13 PM Alessio Balsini wrote: >> Add a reference to the FUSE daemon credentials, so that they can be used to >> temporarily raise the user credentials when accessing lower file system >> files in passthrough. > Hmm, I think it would be better to store the creds of the ioctl() > caller together with the open file. The mounter may deliberately > have different privileges from the process doing the actual I/O. > > Thanks, > Miklos In my usecase I'm changing euid/egid of the thread to whichever the uid/gid was passed to the server which is otherwise running as root.