From nobody Sat Feb 7 04:40:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1593620164; cv=none; d=zohomail.com; s=zohoarc; b=FcO2cvra2zSBeeEjqFGN2pyi/qoNfHp5e6JgbqmYu0YcOWI6wWfOo3vfDKbCDb1FkudJrNA+bFvtw6a+eFDkZm9cbFuaYKtI4uVnWnUf74SZohzBhfH/GMIFzp9rfvX2wToq48vblHmJv2PQOtiyFhp+zV+HS5gfPwaY6CAyr/c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593620164; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=05tENvqegO7cxqM+r9sC7x4fvs2m70XvHAatoFf717I=; b=DJ7OMr4qiXDgvZ0cNmkH/onZPs7yi2rD7bTEGSi4Yc/zl5dmJQoKq1YlEf+8EJslEewEGP9Ak2mlxzbzfbfS8iEAUMNiuu7qXTxcgWCfYwE1oHTP/LEELP9u539q0R8nnyMbDYXbOstE/c6BhN9O9P+XNUj7v+P+N6Mv1+ztKPU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1593620164788466.8688123558022; Wed, 1 Jul 2020 09:16:04 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-101-BLKfdbspNDeaf1sH0g1nmQ-1; Wed, 01 Jul 2020 12:15:46 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AC87E75E49; Wed, 1 Jul 2020 16:15:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8C32679223; Wed, 1 Jul 2020 16:15:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5BE006C9CC; Wed, 1 Jul 2020 16:15:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 061GFOUc005244 for ; Wed, 1 Jul 2020 12:15:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6E8A75C3F8; Wed, 1 Jul 2020 16:15:24 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.194.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id E21505C1C5 for ; Wed, 1 Jul 2020 16:15:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593620163; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=05tENvqegO7cxqM+r9sC7x4fvs2m70XvHAatoFf717I=; b=D9W14Yxbn6YMMM4nyHtQ0HlmSVpiaDJZ5tY/kmcvX1XOzHTmumb1Y+6KMQXBhR7cRGgY0W HSNpEDjp+KUmX1X5MKHzc5mJG6NTDCfCZAOw8OYfAVLHqIf8RYf0KZ/NreJb5JWazIOu9s nTmTHujnOrXP47LGUWZph8imJRhq7p4= X-MC-Unique: BLKfdbspNDeaf1sH0g1nmQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 6/7] secdrivers: Rename @stdin_path argument of virSecurityDomainSetAllLabel() Date: Wed, 1 Jul 2020 18:15:06 +0200 Message-Id: <29169de24f45a2ef739e55070a7b03050cc0c1d5.1593620041.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The argument (if not NULL) points to the file the domain is restoring from. On QEMU command line this used to be '-incoming $path', but we've switched to passing FD ages ago and thus this argument is used only in AppArmor (which loads the profile on domain start). Anyway, the argument does not refer to stdin, rename it to 'incomingPath' then. Signed-off-by: Michal Privoznik --- src/security/security_apparmor.c | 8 ++++---- src/security/security_dac.c | 2 +- src/security/security_driver.h | 2 +- src/security/security_manager.c | 4 ++-- src/security/security_manager.h | 2 +- src/security/security_nop.c | 2 +- src/security/security_selinux.c | 2 +- src/security/security_stack.c | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/security/security_apparmor.c b/src/security/security_appar= mor.c index 583e872614..3f6a213b43 100644 --- a/src/security/security_apparmor.c +++ b/src/security/security_apparmor.c @@ -455,7 +455,7 @@ AppArmorGenSecurityLabel(virSecurityManagerPtr mgr G_GN= UC_UNUSED, static int AppArmorSetSecurityAllLabel(virSecurityManagerPtr mgr, virDomainDefPtr def, - const char *stdin_path, + const char *incomingPath, bool chardevStdioLogd G_GNUC_UNUSED, bool migrated G_GNUC_UNUSED) { @@ -464,10 +464,10 @@ AppArmorSetSecurityAllLabel(virSecurityManagerPtr mgr, if (!secdef || !secdef->relabel) return 0; =20 - /* Reload the profile if stdin_path is specified. Note that + /* Reload the profile if incomingPath is specified. Note that GenSecurityLabel() will have already been run. */ - if (stdin_path) - return reload_profile(mgr, def, stdin_path, true); + if (incomingPath) + return reload_profile(mgr, def, incomingPath, true); =20 return 0; } diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 23fe351a32..dd701ef28b 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -2142,7 +2142,7 @@ virSecurityDACSetSysinfoLabel(virSecurityManagerPtr m= gr, static int virSecurityDACSetAllLabel(virSecurityManagerPtr mgr, virDomainDefPtr def, - const char *stdin_path G_GNUC_UNUSED, + const char *incomingPath G_GNUC_UNUSED, bool chardevStdioLogd, bool migrated G_GNUC_UNUSED) { diff --git a/src/security/security_driver.h b/src/security/security_driver.h index f0ba77032d..08cdf94598 100644 --- a/src/security/security_driver.h +++ b/src/security/security_driver.h @@ -82,7 +82,7 @@ typedef int (*virSecurityDomainReleaseLabel) (virSecurity= ManagerPtr mgr, virDomainDefPtr sec); typedef int (*virSecurityDomainSetAllLabel) (virSecurityManagerPtr mgr, virDomainDefPtr sec, - const char *stdin_path, + const char *incomingPath, bool chardevStdioLogd, bool migrated); typedef int (*virSecurityDomainRestoreAllLabel) (virSecurityManagerPtr mgr, diff --git a/src/security/security_manager.c b/src/security/security_manage= r.c index c073d8cc0d..9a242f9189 100644 --- a/src/security/security_manager.c +++ b/src/security/security_manager.c @@ -856,14 +856,14 @@ int virSecurityManagerCheckAllLabel(virSecurityManage= rPtr mgr, int virSecurityManagerSetAllLabel(virSecurityManagerPtr mgr, virDomainDefPtr vm, - const char *stdin_path, + const char *incomingPath, bool chardevStdioLogd, bool migrated) { if (mgr->drv->domainSetSecurityAllLabel) { int ret; virObjectLock(mgr); - ret =3D mgr->drv->domainSetSecurityAllLabel(mgr, vm, stdin_path, + ret =3D mgr->drv->domainSetSecurityAllLabel(mgr, vm, incomingPath, chardevStdioLogd, migrated); virObjectUnlock(mgr); diff --git a/src/security/security_manager.h b/src/security/security_manage= r.h index 277151848e..1c9e166174 100644 --- a/src/security/security_manager.h +++ b/src/security/security_manager.h @@ -121,7 +121,7 @@ int virSecurityManagerCheckAllLabel(virSecurityManagerP= tr mgr, virDomainDefPtr sec); int virSecurityManagerSetAllLabel(virSecurityManagerPtr mgr, virDomainDefPtr sec, - const char *stdin_path, + const char *incomingPath, bool chardevStdioLogd, bool migrated); int virSecurityManagerRestoreAllLabel(virSecurityManagerPtr mgr, diff --git a/src/security/security_nop.c b/src/security/security_nop.c index de5da1ee1c..385a747f5b 100644 --- a/src/security/security_nop.c +++ b/src/security/security_nop.c @@ -119,7 +119,7 @@ virSecurityDomainReleaseLabelNop(virSecurityManagerPtr = mgr G_GNUC_UNUSED, static int virSecurityDomainSetAllLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED, virDomainDefPtr sec G_GNUC_UNUSED, - const char *stdin_path G_GNUC_UNUSED, + const char *incomingPath G_GNUC_UNUSED, bool chardevStdioLogd G_GNUC_UNUSED, bool migrated G_GNUC_UNUSED) { diff --git a/src/security/security_selinux.c b/src/security/security_selinu= x.c index 6b0581e4d9..52ff4fab0f 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -3169,7 +3169,7 @@ virSecuritySELinuxSetSysinfoLabel(virSecurityManagerP= tr mgr, static int virSecuritySELinuxSetAllLabel(virSecurityManagerPtr mgr, virDomainDefPtr def, - const char *stdin_path G_GNUC_UNUSED, + const char *incomingPath G_GNUC_UNUSED, bool chardevStdioLogd, bool migrated G_GNUC_UNUSED) { diff --git a/src/security/security_stack.c b/src/security/security_stack.c index 624431d4ef..2480c47f70 100644 --- a/src/security/security_stack.c +++ b/src/security/security_stack.c @@ -341,7 +341,7 @@ virSecurityStackRestoreHostdevLabel(virSecurityManagerP= tr mgr, static int virSecurityStackSetAllLabel(virSecurityManagerPtr mgr, virDomainDefPtr vm, - const char *stdin_path, + const char *incomingPath, bool chardevStdioLogd, bool migrated) { @@ -350,7 +350,7 @@ virSecurityStackSetAllLabel(virSecurityManagerPtr mgr, =20 for (; item; item =3D item->next) { if (virSecurityManagerSetAllLabel(item->securityManager, vm, - stdin_path, chardevStdioLogd, + incomingPath, chardevStdioLogd, migrated) < 0) goto rollback; } --=20 2.26.2