From nobody Fri Nov 21 10:07:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1762883048; cv=none; d=zohomail.com; s=zohoarc; b=TEd4QezhY5N0yY7w19YWUULDg36nvDxkzERP4ADo71HD2o033TBojyVEBmI8nSSnUMP/JJ/MPZZr5jeQsJChWC1pXKPMT2s597aDDn/ruZ1x3CA4qy2ClJ89UkAbGjyu7IVpgU6Uiu/zHsGhpR7R6c9bp6jFH/2RwsEGMttt/w0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762883048; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=bcx0zoIAtARZR9Y6oIQDZSG2+TG4Bfxfrm1Iq6rn8XQ=; b=ZANXFheV/2IqTzCdXy1YS096sF/BybCT2OiBxjq+5GEcYGcuiAjXLkxbC8Xg4Spnxxi3LVo0IKfxSA3rzkSERHtfkwqWiptRuhMcGe1wZhp7McMIjCW5AUpm5/Ol3mgowePC+uYvAs46mE1KntwAo4hf6LLci70H4/9pYMTzvBk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1762883048137231.14140775026704; Tue, 11 Nov 2025 09:44:08 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 707493F344; Tue, 11 Nov 2025 12:44:06 -0500 (EST) Received: from [172.19.199.29] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id C89B44426C; Tue, 11 Nov 2025 12:40:37 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id C47F2441A0; Tue, 11 Nov 2025 12:40:05 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id E147B44151 for ; Tue, 11 Nov 2025 12:40:04 -0500 (EST) 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-648-kBbP8_E9MYOI7OW2TXphaw-1; Tue, 11 Nov 2025 12:40:02 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 0697C180034D for ; Tue, 11 Nov 2025 17:40:02 +0000 (UTC) Received: from colepc.home (unknown [10.22.82.11]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5C0CF195608E; Tue, 11 Nov 2025 17:40:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762882804; 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=bcx0zoIAtARZR9Y6oIQDZSG2+TG4Bfxfrm1Iq6rn8XQ=; b=YCju5VmPJ5REIC0GZGyV8C+eWrGhNStAGC80y5hvSlTvPwDDf/WFFWyy6P/iYLIyPn3tIt 0pQm2YNSGVFDofJ+naADsbtr8bR6ND9dWPFjVyeZGmm7QqSXhb1DHI7mTycti6XL4EXYAu f1e/lz50bEc/kkdTwikJUtV55o8Mv7M= X-MC-Unique: kBbP8_E9MYOI7OW2TXphaw-1 X-Mimecast-MFC-AGG-ID: kBbP8_E9MYOI7OW2TXphaw_1762882802 To: devel@lists.libvirt.org Subject: [PATCH 2/4] selinux: Don't remember labels for shareable SCSI devices Date: Tue, 11 Nov 2025 12:39:54 -0500 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Jbr7W0jDRTWvIj_sQ0F94SP8C7MEyGCC7o4U_gRQbY4_1762882802 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: YEBCIP2VMTXEZS7EXP2WBSQL3VGDWERM X-Message-ID-Hash: YEBCIP2VMTXEZS7EXP2WBSQL3VGDWERM X-MailFrom: crobinso@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Cole Robinson X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Cole Robinson via Devel Reply-To: Cole Robinson X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1762883066649153000 Content-Type: text/plain; charset="utf-8" For shareable/readonly devices, label restore is skipped entirely in virSecuritySELinuxRestoreSCSILabel. So requesting remember=3Dtrue here doesn't accomplish anything Signed-off-by: Cole Robinson --- src/security/security_selinux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/security/security_selinux.c b/src/security/security_selinu= x.c index 19e550460c..3a91ea46d3 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -2171,10 +2171,10 @@ virSecuritySELinuxSetSCSILabel(virSCSIDevice *dev, =20 if (virSCSIDeviceGetShareable(dev)) return virSecuritySELinuxSetFilecon(mgr, file, - data->file_context, true); + data->file_context, false); else if (virSCSIDeviceGetReadonly(dev)) return virSecuritySELinuxSetFilecon(mgr, file, - data->content_context, true); + data->content_context, false); else return virSecuritySELinuxSetFilecon(mgr, file, secdef->imagelabel, true); --=20 2.51.1