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=-7.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,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 177DFC48BC2 for ; Mon, 21 Jun 2021 13:54:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA64661042 for ; Mon, 21 Jun 2021 13:54:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230292AbhFUN4w (ORCPT ); Mon, 21 Jun 2021 09:56:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45249 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229747AbhFUN4v (ORCPT ); Mon, 21 Jun 2021 09:56:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624283677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W6MGuavx6twbb/Q17ohA/BfaVJ/Bc9SFHn9Ch8eWwEM=; b=ZTgJRx9OcWTz6nl9MmvBc8RINEwDCwiFHZtQTXXiQMM6nEZt81uMuvMyG0n1RL54WA7VuN 7xLla8vCzhvL8ckL+o9S6mG3BXPVQ9RDidgoXO0m2Ycijuq6XHv0ohbL/gKyVLe4C3btsh C3vHRgVYRNm8zr1Bb3G2NtvhOOTyZGA= Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-402-YvNAKIvJO7GBa4r5tH31sA-1; Mon, 21 Jun 2021 09:54:36 -0400 X-MC-Unique: YvNAKIvJO7GBa4r5tH31sA-1 Received: by mail-ot1-f72.google.com with SMTP id e16-20020a0568302010b02903feaaa5cf10so9293809otp.8 for ; Mon, 21 Jun 2021 06:54:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=W6MGuavx6twbb/Q17ohA/BfaVJ/Bc9SFHn9Ch8eWwEM=; b=bicfYkSCWZuaLJJTyOYnt6STD1G2NMXFdVqHTUsEfdezPUf1a9Bu9ePb9Wuu62bIpF /GywtIEnTjVCGTrCOGlT9ZYsdXVx3ql9DLqk4BTg85oT6gBgbkQoCdDh79vQMkYAbiIU TOUOeXio9ZhSc7AVfI0UA47tE+abV98sSPP7xc12/7EozIwCepXVWNANImx/IZY+CO1G xLRHh59Hx79dqpIwaZFJw9dCIJFWneMluw5ZGm2z8m37U345GHvTTsObVpzh/2g15sd4 qkyFMblkFUezCTO4d692enGsavis+AvdBMAgJEPgYoMhP4zQazxb24asZ9twalrCYKxS ukbw== X-Gm-Message-State: AOAM531p6KdKlATxbgDrH2fLFR8ZS+XZcRLDYy0AqTWqtq2vmpDNDDFr 07sZsCGE+fAbXAX2dkQJykE8sOiaOJv5frNiuo/M+X1Yt6bGZsSG9YIgkzOORBw6vvTh0N+xPLO RSCZ9T7ebk8JMEMMd4m0ZzwqOoEvOeqaLoc18lttotQS/deII4uld0E9kMJmNL/6FiZMDvb9+LQ == X-Received: by 2002:a9d:6484:: with SMTP id g4mr20666955otl.331.1624283675264; Mon, 21 Jun 2021 06:54:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9gLvrQ1EIeX4G4mLsyuw8nbCdFPUgfViIEUWkdMzDU/6Ta9UolDlhooUW7oL86dB0u0Fp9Q== X-Received: by 2002:a9d:6484:: with SMTP id g4mr20666933otl.331.1624283675020; Mon, 21 Jun 2021 06:54:35 -0700 (PDT) Received: from [192.168.0.173] (ip68-102-25-99.ks.ok.cox.net. [68.102.25.99]) by smtp.gmail.com with ESMTPSA id f12sm1232858ooh.38.2021.06.21.06.54.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Jun 2021 06:54:34 -0700 (PDT) Subject: Re: [PATCH] fuse: Send FUSE_WRITE_KILL_SUIDGID for killpriv v1 To: Miklos Szeredi Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210423151919.195033-1-ckuehl@redhat.com> From: Connor Kuehl Message-ID: <74f1eff1-570d-03b1-7a27-1ec343c5c3ab@redhat.com> Date: Mon, 21 Jun 2021 08:54:33 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/21/21 3:26 AM, Miklos Szeredi wrote: > On Fri, 23 Apr 2021 at 17:19, Connor Kuehl wrote: >> >> FUSE doesn't seem to be adding the FUSE_WRITE_KILL_SUIDGID flag on write >> requests for FUSE connections that support FUSE_HANDLE_KILLPRIV but not >> FUSE_HANDLE_KILLPRIV_V2. >> >> However, the FUSE userspace header states: >> >> FUSE_HANDLE_KILLPRIV: fs handles killing suid/sgid/cap on >> write/chown/trunc >> ^^^^^ >> >> To improve backwards compatibility with file servers that don't support >> FUSE_HANDLE_KILLPRIV_V2, add the FUSE_WRITE_KILL_SUIDGID flag to write >> requests if FUSE_HANDLE_KILLPRIV has been negotiated -OR- if the >> conditions for FUSE_HANDLE_KILLPRIV_V2 support are met. > > > If server does not support FUSE_HANDLE_KILLPRIV_V2, then it does not > support FUSE_WRITE_KILL_SUIDGID either. The two were introduced > together and the latter is only meaningful if the > FUSE_HANDLE_KILLPRIV_V2 feature was negotiated. > > What am I missing? You're not missing anything, this patch is wrong. Let's nack this. Thanks! Connor