From nobody Mon Feb 9 04:45:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1583771034; cv=none; d=zohomail.com; s=zohoarc; b=AnjnzEHAqzdtAUlHUV5fIjloYsTHxIkywvv6er/EQBh8+x8jzC2wEPeeJ/RaE/wNQM6/oWApbAimSV18ogmkwKy+YTrRt5XcTbHHfI/z7lIbfncrmgh8zBijdNfHV8Z9Mm4mx17YBjlR2/uf7eSdRtu8Dl6GTVKWIkRAYDALv1E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583771034; 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=MMS5fE5qGNeaSj22xYxNLCWguBw30Clyno07D2EpiQk=; b=VtoLVAB0v8gPMqPQ8irF9CvNSGjx6BD44Z7+mgHZnz4QmJtSyLQzFAOoG8gtXOTpb15MwAvXGTC6nJN3zdXyF7OUshrWys14PjHpD+vGz0EvzkcV8Ix42usVuywXtfqVu+RJKx4r3CFMtt9k+2TjzLYx+n8XNdm/rv7GU0aT5xs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1583771034260465.1385040047785; Mon, 9 Mar 2020 09:23:54 -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-61-WZsyX0wDM3KrscbWTnUpsQ-1; Mon, 09 Mar 2020 12:23:50 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 77F058010EB; Mon, 9 Mar 2020 16:23:44 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 46AC473892; Mon, 9 Mar 2020 16:23:44 +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 D9CDD18089D5; Mon, 9 Mar 2020 16:23:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 029GNL6r020740 for ; Mon, 9 Mar 2020 12:23:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 49BEC90779; Mon, 9 Mar 2020 16:23:21 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id C3B959051C for ; Mon, 9 Mar 2020 16:23:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583771033; 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=MMS5fE5qGNeaSj22xYxNLCWguBw30Clyno07D2EpiQk=; b=eJTUqOv1+Pgvkbrjg+3Sw5u8kfm8PbQl+t4Ia/laXvdEXG1c/LVYn5MaVL6WHXSz00kqDW W+83t+1F4KrSB5lgR3laUPqB6lwPi7Ut21QqNTlior4dOFU8WIyob3UEEt6cHEdmIgQ9+O CI9uxfuCbDuZgkhAypyxKoX8l758K40= X-MC-Unique: WZsyX0wDM3KrscbWTnUpsQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 08/30] qemuDomainDeviceDiskDefPostParseRestoreSecAlias: Hardcode restored aliases Date: Mon, 9 Mar 2020 17:22:48 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.15 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" In order to be able to change the function generating the alias and thus also the aliases itself, we must hardcode the old format for the case of upgrading form libvirt which didn't record them in the status XML yet. Note that this code path is tested by 'tests/qemustatusxml2xmldata/disk-secinfo-upgrade-in.xml' Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_domain.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 70b1b5c4f2..72e651ecee 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -8993,16 +8993,14 @@ qemuDomainDeviceDiskDefPostParseRestoreSecAlias(vir= DomainDiskDefPtr disk, } if (restoreAuthSecret) { - if (!(authalias =3D qemuDomainGetSecretAESAlias(disk->info.alias, = false))) - return -1; + authalias =3D g_strdup_printf("%s-secret0", disk->info.alias); if (qemuStorageSourcePrivateDataAssignSecinfo(&priv->secinfo, &aut= halias) < 0) return -1; } if (restoreEncSecret) { - if (!(encalias =3D qemuDomainGetSecretAESAlias(disk->info.alias, t= rue))) - return -1; + encalias =3D g_strdup_printf("%s-luks-secret0", disk->info.alias); if (qemuStorageSourcePrivateDataAssignSecinfo(&priv->encinfo, &enc= alias) < 0) return -1; --=20 2.24.1