From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bKBWfQ+p; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 631615A026F for ; Tue, 07 Oct 2025 18:43:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1759855416; 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=QdqyiXqM0dWf8fzInZxZl3bUymiC4hrAv4YWz5bBqU0=; b=bKBWfQ+pVo3/cdqAmFgBobZB6dzqLT8bamdTPIvYxfDXOft/XxsygjxrNyhvSTH43vAbxW cX5BayT3ykTMJ5wzgdUdQxdvpP65VEErfxEvvH4lrSfZtLQLUqozRQvP4k+EauG/6pl0+Y tRjCjo6u8N0Pf0BVIX9H4BS1+koDGQM= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-511-qu1SYv30OUmTfjgA7PfAxA-1; Tue, 07 Oct 2025 12:43:35 -0400 X-MC-Unique: qu1SYv30OUmTfjgA7PfAxA-1 X-Mimecast-MFC-AGG-ID: qu1SYv30OUmTfjgA7PfAxA_1759855414 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2A3AE1800350; Tue, 7 Oct 2025 16:43:34 +0000 (UTC) Received: from [10.22.65.199] (unknown [10.22.65.199]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D783C19560A2; Tue, 7 Oct 2025 16:43:31 +0000 (UTC) Message-ID: <229a2d1d-f899-4eae-a23c-d0613d6f2593@redhat.com> Date: Tue, 7 Oct 2025 12:43:30 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] isolation: keep CAP_DAC_OVERRIDE initially To: Stefano Brivio , David Gibson References: <8635494bf4747935bc2179bdb37c8c2cbbe4ed55.1759839307.git.crobinso@redhat.com> <20251007180232.328feebc@elisabeth> From: Cole Robinson In-Reply-To: <20251007180232.328feebc@elisabeth> X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: _SvgjswoTmHUd5VhkDrhd1v75bdR6fF099z9JXChDVE_1759855414 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-MailFrom: crobinso@redhat.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation Message-ID-Hash: 6VAEYFT7BQNLYUS5FOPXWWDG5MFF5BIC X-Message-ID-Hash: 6VAEYFT7BQNLYUS5FOPXWWDG5MFF5BIC X-Mailman-Approved-At: Tue, 07 Oct 2025 18:49:26 +0200 CC: passt-dev@passt.top, "Richard W.M. Jones" , Yumei Huang X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 10/7/25 12:02 PM, Stefano Brivio wrote: > [Cc: Yumei as this is somewhat related to > https://archives.passt.top/passt-dev/20250926011714.5978-1-yuhuang@redhat.com/, > and David as he wrote most of this part] > > On Tue, 7 Oct 2025 08:16:39 -0400 > Cole Robinson wrote: > >> Reproducer that I'd expect to work >> >> $ cd $HOME >> $ sudo passt --runas $UID --socket foo.sock >> Failed to bind UNIX domain socket: Permission denied >> >> A more practical example is for libguestfs apps when run as user=root. >> >> + libguestfs connects to libvirt qemu:///system >> + libvirt qemu:///system defaults to user=qemu. >> + chowns passt runtime dir to user=qemu >> + libguestfs instead requests the VM run as user=root >> + patches in progress but we are blocked by this issue >> + passt is launched as root, but can't open socket in passt dir. >> >> Obviously libvirt needs improvements too. >> But it seems like this is a defect as well. > > Thanks for the patch! I think it's absolutely unproblematic to keep > CAP_DAC_OVERRIDE for a moment at the beginning. Did you figure out > exactly why it's needed by the way? > Last line in the list above should read: + passt is launched as root, but can't open socket in passt dir because it's owned by qemu.qemu >> Signed-off-by: Cole Robinson > > Should we add: > > Link: https://github.com/libguestfs/libguestfs/pull/218 > > ? Or it's misleading, or you omitted it for any other reason? > Works for me! I did not intentionally omit it Thanks, Cole