Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2856795lqt; Tue, 23 Apr 2024 03:59:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWVBCjpNe9niYYWQT9IvCdt0sO5EzhpWLgZ6BZzGXGvLtd/dVRHKyMcPVaNxSFMCy+FVD2qWu5UyfVfsqoVJQXPdgmSe4zWax+P63mFLQ== X-Google-Smtp-Source: AGHT+IFG3Sg5i8YMUENiYcvQzlyB+toRYfKcHYOxVTpZrXLzfNc92teIp/GOobNxAl2C9Drj/TRY X-Received: by 2002:a05:6a00:21c6:b0:6ea:b395:ca67 with SMTP id t6-20020a056a0021c600b006eab395ca67mr15907724pfj.29.1713869957367; Tue, 23 Apr 2024 03:59:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713869957; cv=pass; d=google.com; s=arc-20160816; b=dgZIqMj0Fdh+9tDHiOs5b3RuFDA/3oElCpzRn2mJWR8WZWwDl39dL51Vz+o+lKsjP0 OjBI/LMBTGrqzdVQ06/pIekilqKA4wnRn9oMoMoY96gKdPyJsC2u33NqHo53zjC5e6yN 5KBD69Wu4Bz56PKBq7pr1VhV9JqOyMJ7FurXqp12KX5ZQavQnxdhYGa8A62m1+hekHVr NtKDjhGWnWCogXu6nI0uhqItKfa6IETokfQOC+VvJhVAIiAxgA//YZ+st0IvpIeJMDZ6 RjFLs9A/5DbupBMecyD6psWLfzpjX44sFVlPl8vhPOBG5EiwRYgIHqBYIETVxe5JW2F5 pIaA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=mMx9swMS61DtwxCxz+rf6ZcLr+qj4g5NB1qqBI2FYfc=; fh=NFjkFKSge5r4Uobr5CI52yhOIPA2Y8tikKNb+BPAMoY=; b=Smep6cKDOf+IdYKmrW6w/e0uOtkjVfy8sxYmfboyTgcC5Ko0U2ER6EgVJIFj2bJRVe 84nM+zMUmfKV6TZ0d3Bmt1PCnZT5LZnTExxI0D7OlQN8LuJQDSRzssYG89pzn9Z0bMj7 I+zeqCBKVDPChphPwbsi3m6uiatTk8wgkGfYpiIkUgIzt2asGHZSqYrcgJpG13v1QK8C jg6erlYjoBm8o6s3Tn0SMPmecPr9iUKTL905cQxWyQj0pxx6Eg8FEP/RjxUl406/ikWt XkHGePfzMeHbiMI9zXOOH1VtdVYgnUQYODVkhuU1IJ4eMLpqvKOBWTFcfSxILRjxfC/w o/2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@samba.org header.s=42 header.b=rFw7Pipw; arc=pass (i=1 spf=pass spfdomain=samba.org dkim=pass dkdomain=samba.org dmarc=pass fromdomain=samba.org); spf=pass (google.com: domain of linux-kernel+bounces-154933-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154933-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=samba.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d18-20020a63ed12000000b005cdfaea88adsi9197269pgi.774.2024.04.23.03.59.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 03:59:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154933-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@samba.org header.s=42 header.b=rFw7Pipw; arc=pass (i=1 spf=pass spfdomain=samba.org dkim=pass dkdomain=samba.org dmarc=pass fromdomain=samba.org); spf=pass (google.com: domain of linux-kernel+bounces-154933-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154933-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=samba.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 675FF2841ED for ; Tue, 23 Apr 2024 10:58:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5D6F77F13; Tue, 23 Apr 2024 10:58:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (3072-bit key) header.d=samba.org header.i=@samba.org header.b="rFw7Pipw" Received: from hr2.samba.org (hr2.samba.org [144.76.82.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 476A554BF4; Tue, 23 Apr 2024 10:58:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=144.76.82.148 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713869913; cv=none; b=BgV10Osqx5Num1WT5IakzsTOAzku5s6hynLuylIB1hq/WP2z31ZiNcrF4r3HYOGqEP5NXzsvxe2HhGQlwH4JY+B78HgcNzMduN5OS1DASe3iBRIe2FTkUAPlBltXjPyM05AgB0/plEdmUvQoQ93x18Kaxy7wgNnkXThVN+ZDLno= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713869913; c=relaxed/simple; bh=Rncnh7ZhSNEX3awwKWopqVkmtLCPXwdQ6MAPyaR9g2M=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Wi7u0WBxAmasqD+RZixo4qGFpX95RfIP0gxGYrVSVI1uCEX6oUE63oWjyFnuP9zrurFzoqJSA6OWub8BzBTvUthUIEUJ4AILadJhJRkpLtCUjuVPbrJOLjpnfhoEJ8NRKGgeMpD7V7YvyZltT5RjzE/zG5P5XpZnm9lNrSoPRsQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=samba.org; spf=pass smtp.mailfrom=samba.org; dkim=pass (3072-bit key) header.d=samba.org header.i=@samba.org header.b=rFw7Pipw; arc=none smtp.client-ip=144.76.82.148 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=samba.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samba.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42; h=From:Cc:To:Date:Message-ID; bh=mMx9swMS61DtwxCxz+rf6ZcLr+qj4g5NB1qqBI2FYfc=; b=rFw7PipwGvsozchJmgVbvLmwLX T83Y5OkcdFKR4FJHKj56blal67tnqCnik8k35+v2kHBp0mzfi2qMECEyENSet0FEu1aFpwu+cl/LG fPBBK4GSSNe9eDP3vASmXSLSeA7KYdo5kqLOtFqdzHHtv0KmraBLLFHgKBycdVGEcTdV1JtaU1nN4 IvWgsuLHHW2GhMqXFwsCsX0pNdOpuyIsIVyWfZwM+TQTfvb5ZjsAXppVYW23l6cSCi1wRkCx3XR1u GupEZJjsCF196wdsRb2ThDds7YZ+s2hI6sZF021tr0F/kr04yEHRdj+Y3e7F16N3pxSXNPYahvxKi 07ToC/Tp0dgFsIZonBoacMZf4pHVkeVF5gnyDsAHbO+Zn4lU3SrcR2JUkAY22HFacy8Dyxc4iQwRx WZMtsxN7R91oFswL1VrHHITEbGEJA0rAlVrUt0/+HcHAHyRWPPrIs2AgHSCnyW0plLJmM8+4/EmDy Td+OA5fHOLJmYeOKW+4gA6Ej; Received: from [127.0.0.2] (localhost [127.0.0.1]) by hr2.samba.org with esmtpsa (TLS1.3:ECDHE_SECP256R1__ECDSA_SECP256R1_SHA256__CHACHA20_POLY1305:256) (Exim) id 1rzDr0-007rgx-0R; Tue, 23 Apr 2024 10:58:26 +0000 Message-ID: Date: Tue, 23 Apr 2024 12:58:25 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/2] implement OA2_INHERIT_CRED flag for openat2() To: Stas Sergeev , linux-kernel@vger.kernel.org Cc: Eric Biederman , Alexander Viro , Andy Lutomirski , Christian Brauner , Jan Kara , Jeff Layton , Chuck Lever , Alexander Aring , linux-fsdevel@vger.kernel.org, Paolo Bonzini , =?UTF-8?Q?Christian_G=C3=B6ttsche?= , Linux API Mailing List References: <20240423104824.10464-1-stsp2@yandex.ru> Content-Language: en-US, de-DE From: Stefan Metzmacher In-Reply-To: <20240423104824.10464-1-stsp2@yandex.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Am 23.04.24 um 12:48 schrieb Stas Sergeev: > This patch-set implements the OA2_INHERIT_CRED flag for openat2() syscall. > It is needed to perform an open operation with the creds that were in > effect when the dir_fd was opened. This allows the process to pre-open > some dirs and switch eUID (and other UIDs/GIDs) to the less-privileged > user, while still retaining the possibility to open/create files within > the pre-opened directory set. > > Changes in v2: > - capture full struct cred instead of just fsuid/fsgid. > Suggested by Stefan Metzmacher > > CC: Stefan Metzmacher > CC: Eric Biederman > CC: Alexander Viro > CC: Andy Lutomirski > CC: Christian Brauner > CC: Jan Kara > CC: Jeff Layton > CC: Chuck Lever > CC: Alexander Aring > CC: linux-fsdevel@vger.kernel.org > CC: linux-kernel@vger.kernel.org I guess this is something that should cc linux-api@vger.kernel.org ... metze