From nobody Fri Mar 29 15:54:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 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=1600275912; cv=none; d=zohomail.com; s=zohoarc; b=YnwQVkjpwsXnzujkLODVVYjZ8kxpXUgLkZ/zAtwZQWDFIFoUDmunI4m257HDK6RAqKEWlInPF4IfBHEAS+7T87p0b5PrJUXaRH6NiywNcPll8wxXVZaJaZ9ooWqF5EmimpM4TO011KWF9Rl9RMM8AJaSgwWk9NjnOc1+/n3EJ+U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600275912; 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=iVVmX+51BjKBaIAfYt/noeTC/412bku+PBHaBVi8Jw4=; b=ZZ1udPaUwrczHvCZf7N/mRWo7SXmPISsy7QIqz4HcpGe+cvhBBvanlVPE6KZgSNFe6BYKAAhvXhlLMu6NtH681s6mXZ8MOg/+oxhRm7GYM9Ge4HY7lVsUyDmakH8x153DY1z/mKjMhizcwUdM0ItldEjbtjLjlt4qy3G1MXoobY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1600275912765898.1452114587447; Wed, 16 Sep 2020 10:05:12 -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-532-1RjUWiXKPmu8XIcc5Zv85g-1; Wed, 16 Sep 2020 13:05:09 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 87EE01018724; Wed, 16 Sep 2020 17:05:03 +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 63A0B5DEB3; Wed, 16 Sep 2020 17:05:03 +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 1322944A6A; Wed, 16 Sep 2020 17:05:03 +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 08GH4xDi001727 for ; Wed, 16 Sep 2020 13:04:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4987E7EB7C; Wed, 16 Sep 2020 17:04:59 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-113-248.ams2.redhat.com [10.36.113.248]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7695E76E16; Wed, 16 Sep 2020 17:04:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600275911; 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=iVVmX+51BjKBaIAfYt/noeTC/412bku+PBHaBVi8Jw4=; b=aEUGt+rX8U9ZB77rYimcZkoiQH8e3Mc4hJCvwgNvA/EfTLBHhhy+r2deLT8S18PiP5mJNZ 7mHbrfSpAjRxje2eLCcEvzjNO/3svQFmLHDNcSqtVUb9H/Uj7c9V5AafByIt2mVDwJovkW 6UYXAEh1RvrQIPzeAvocBPlIpb99ifE= X-MC-Unique: 1RjUWiXKPmu8XIcc5Zv85g-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 1/2] util: detect LUKS encryption scheme in qcow2 files Date: Wed, 16 Sep 2020 18:04:51 +0100 Message-Id: <20200916170452.1564481-2-berrange@redhat.com> In-Reply-To: <20200916170452.1564481-1-berrange@redhat.com> References: <20200916170452.1564481-1-berrange@redhat.com> 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.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Crypt method number 2 indicates LUKS format. Signed-off-by: Daniel P. Berrang=C3=A9 --- src/util/virstoragefile.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 97a346db28..42341150e5 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -290,6 +290,22 @@ static struct FileEncryptionInfo const qcow2Encryption= Info[] =3D { =20 .payloadOffset =3D -1, }, + { + .format =3D VIR_STORAGE_ENCRYPTION_FORMAT_LUKS, + + .magicOffset =3D 0, + .magic =3D NULL, + .endian =3D LV_BIG_ENDIAN, + + .versionOffset =3D -1, + .versionSize =3D 0, + .versionNumbers =3D {}, + + .modeOffset =3D QCOW2_HDR_CRYPT, + .modeValue =3D 2, + + .payloadOffset =3D -1, + }, { 0 } }; =20 --=20 2.26.2 From nobody Fri Mar 29 15:54:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1600275976; cv=none; d=zohomail.com; s=zohoarc; b=NTw+8RVQJeLuikMR/3SMwnVLdDAv1MSP97qPlgxBAmRKK8rf803p7toqFKib4Bm4DWN/P6t8cLoooDx07V61WmaIcH0Bra5zD05+v+XPrp8a+RtyrzzHRrCcmkgKn3QT5OKbKnUz4gSRByBbbK9Q9fvwrkJbW+pe8NXW+hU11dM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600275976; 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=y88V4z4xJF4w0o4Nr5riMvlibxztJofKzashOnsHS08=; b=QKS30Jx3QFqgHWw13X35ncmnmbY7raLxiw20PXM6bR7vO4x07Ao1QbewWSjsVcNhhSHMQNv93lR1tNLqneETinGqgIQVlU4+KO3L19k/DYTfetPqAHkmW6Y5eDfmeFU8YsSUxJ41q3R3dQWG9uuzL15U4ULvox6xJL+vs6PrsvA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1600275976260978.4920569602502; Wed, 16 Sep 2020 10:06:16 -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-255-AaF9WlyvPZeTM79MAsSpVA-1; Wed, 16 Sep 2020 13:05:16 -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 B7DD5800138; Wed, 16 Sep 2020 17:05:08 +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 70CBE1C4; Wed, 16 Sep 2020 17:05:08 +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 3983344A73; Wed, 16 Sep 2020 17:05:08 +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 08GH50hQ001747 for ; Wed, 16 Sep 2020 13:05:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id BA4C07EEA7; Wed, 16 Sep 2020 17:05:00 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-113-248.ams2.redhat.com [10.36.113.248]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACBCA76E16; Wed, 16 Sep 2020 17:04:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600275975; 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=y88V4z4xJF4w0o4Nr5riMvlibxztJofKzashOnsHS08=; b=UIq2SPsQQLhFIF0MSqKo7LaVSmfT1WmlHl3vMlyxXmvu7+GI7qQ3O8wXbrzo5S/oYSFnDx 6eJOCP1ewhqHf+AJcOa+hhGF+GFqJpx4x5MTglUCn3YL1T1032ykcEXy8fvuXuZog9OErv ZCLl/8Z9ptbfMkwPz0QIHTMQjd9Qd3A= X-MC-Unique: AaF9WlyvPZeTM79MAsSpVA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] storage: add support for qcow2 LUKS encryption Date: Wed, 16 Sep 2020 18:04:52 +0100 Message-Id: <20200916170452.1564481-3-berrange@redhat.com> In-Reply-To: <20200916170452.1564481-1-berrange@redhat.com> References: <20200916170452.1564481-1-berrange@redhat.com> 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.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The storage driver was wired up to support creating raw volumes in LUKS format, but was never adapted to support LUKS-in-qcow2. This is trivial as it merely requires the encryption properties to be prefixed with the "encrypt." prefix, and "encrypt.format=3Dluks" when creating the volume. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Han Han --- src/storage/storage_util.c | 70 +++++++++++++++++++++++++++++--------- src/util/virqemu.c | 23 +++++++++---- src/util/virqemu.h | 1 + 3 files changed, 72 insertions(+), 22 deletions(-) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index cf82ea0a87..e5e4fe428f 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -707,7 +707,7 @@ storageBackendCreateQemuImgOpts(virStorageEncryptionInf= oDefPtr encinfo, virStorageFileFormatTypeToString(info->backingFo= rmat)); =20 if (encinfo) - virQEMUBuildQemuImgKeySecretOpts(&buf, encinfo, info->secretAlias); + virQEMUBuildQemuImgKeySecretOpts(&buf, info->format, encinfo, info= ->secretAlias); =20 if (info->preallocate) { if (info->size_arg > info->allocation) @@ -761,7 +761,8 @@ storageBackendCreateQemuImgCheckEncryption(int format, { virStorageEncryptionPtr enc =3D vol->target.encryption; =20 - if (format =3D=3D VIR_STORAGE_FILE_RAW) { + if (format =3D=3D VIR_STORAGE_FILE_RAW || + format =3D=3D VIR_STORAGE_FILE_QCOW2) { if (enc->format !=3D VIR_STORAGE_ENCRYPTION_FORMAT_LUKS) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unsupported volume encryption format %d"), @@ -927,21 +928,34 @@ storageBackendCreateQemuImgSecretObject(virCommandPtr= cmd, } =20 =20 -/* Add a --image-opts to the qemu-img resize command line: +/* Add a --image-opts to the qemu-img resize command line for use + * with encryption: * --image-opts driver=3Dluks,file.filename=3D$volpath,key-secret=3D$se= cretAlias + * or + * --image-opts driver=3Dqcow2,file.filename=3D$volpath,encrypt.key-sec= ret=3D$secretAlias * - * NB: format=3Draw is assumed */ static int storageBackendResizeQemuImgImageOpts(virCommandPtr cmd, + int format, const char *path, const char *secretAlias) { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; g_autofree char *commandStr =3D NULL; + const char *encprefix; + const char *driver; =20 - virBufferAsprintf(&buf, "driver=3Dluks,key-secret=3D%s,file.filename= =3D", - secretAlias); + if (format =3D=3D VIR_STORAGE_FILE_QCOW2) { + driver =3D "qcow2"; + encprefix =3D "encrypt."; + } else { + driver =3D "luks"; + encprefix =3D ""; + } + + virBufferAsprintf(&buf, "driver=3D%s,%skey-secret=3D%s,file.filename= =3D", + driver, encprefix, secretAlias); virQEMUBuildBufferEscapeComma(&buf, path); =20 commandStr =3D virBufferContentAndReset(&buf); @@ -1006,6 +1020,16 @@ virStorageBackendCreateQemuImgSetInfo(virStoragePool= ObjPtr pool, return -1; } } + if (inputvol && inputvol->target.format =3D=3D VIR_STORAGE_FILE_RAW && + inputvol->target.encryption) { + if (vol->target.encryption->format =3D=3D VIR_STORAGE_ENCRYPTION_F= ORMAT_LUKS) { + info->type =3D "luks"; + } else { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Only luks encryption is supported for raw fi= les")); + return -1; + } + } =20 if (inputvol && storageBackendCreateQemuImgSetInput(inputvol, convertStep, info) <= 0) @@ -1056,6 +1080,8 @@ virStorageBackendCreateQemuImgCmdFromVol(virStoragePo= olObjPtr pool, virStorageEncryptionPtr inputenc =3D inputvol ? inputvol->target.encry= ption : NULL; virStorageEncryptionInfoDefPtr encinfo =3D NULL; g_autofree char *inputSecretAlias =3D NULL; + const char *encprefix; + const char *inputencprefix; =20 virCheckFlags(VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA, NULL); =20 @@ -1134,24 +1160,34 @@ virStorageBackendCreateQemuImgCmdFromVol(virStorage= PoolObjPtr pool, virCommandAddArgFormat(cmd, "%lluK", info.size_arg); } else { /* source */ - if (inputenc) + if (inputenc) { + if (inputvol->target.format =3D=3D VIR_STORAGE_FILE_QCOW2) + inputencprefix =3D "encrypt."; + else + inputencprefix =3D ""; virCommandAddArgFormat(cmd, - "driver=3Dluks,file.filename=3D%s,key-s= ecret=3D%s", - info.inputPath, inputSecretAlias); - else + "driver=3D%s,file.filename=3D%s,%skey-s= ecret=3D%s", + info.inputType, info.inputPath, inputen= cprefix, inputSecretAlias); + } else { virCommandAddArgFormat(cmd, "driver=3D%s,file.filename=3D%s", info.inputType ? info.inputType : "raw", info.inputPath); + } =20 /* dest */ - if (enc) + if (enc) { + if (vol->target.format =3D=3D VIR_STORAGE_FILE_QCOW2) + encprefix =3D "encrypt."; + else + encprefix =3D ""; + virCommandAddArgFormat(cmd, - "driver=3D%s,file.filename=3D%s,key-sec= ret=3D%s", - info.type, info.path, info.secretAlias); - else + "driver=3D%s,file.filename=3D%s,%skey-s= ecret=3D%s", + info.type, info.path, encprefix, info.s= ecretAlias); + } else { virCommandAddArgFormat(cmd, "driver=3D%s,file.filename=3D%s", info.type, info.path); - + } } VIR_FREE(info.secretAlias); =20 @@ -2276,7 +2312,9 @@ storageBackendResizeQemuImg(virStoragePoolObjPtr pool, secretAlias) < 0) goto cleanup; =20 - if (storageBackendResizeQemuImgImageOpts(cmd, vol->target.path, + if (storageBackendResizeQemuImgImageOpts(cmd, + vol->target.format, + vol->target.path, secretAlias) < 0) goto cleanup; } diff --git a/src/util/virqemu.c b/src/util/virqemu.c index 25d6fd35c5..bbb38eed75 100644 --- a/src/util/virqemu.c +++ b/src/util/virqemu.c @@ -28,6 +28,7 @@ #include "virqemu.h" #include "virstring.h" #include "viralloc.h" +#include "virstoragefile.h" =20 #define VIR_FROM_THIS VIR_FROM_NONE =20 @@ -407,36 +408,46 @@ virQEMUBuildBufferEscapeComma(virBufferPtr buf, const= char *str) */ void virQEMUBuildQemuImgKeySecretOpts(virBufferPtr buf, + int format, virStorageEncryptionInfoDefPtr encinfo, const char *alias) { - virBufferAsprintf(buf, "key-secret=3D%s,", alias); + const char *encprefix; + + if (format =3D=3D VIR_STORAGE_FILE_QCOW2) { + virBufferAsprintf(buf, "encrypt.format=3Dluks,"); + encprefix =3D "encrypt."; + } else { + encprefix =3D ""; + } + + virBufferAsprintf(buf, "%skey-secret=3D%s,", encprefix, alias); =20 if (!encinfo->cipher_name) return; =20 - virBufferAddLit(buf, "cipher-alg=3D"); + virBufferAsprintf(buf, "%scipher-alg=3D", encprefix); virQEMUBuildBufferEscapeComma(buf, encinfo->cipher_name); virBufferAsprintf(buf, "-%u,", encinfo->cipher_size); if (encinfo->cipher_mode) { - virBufferAddLit(buf, "cipher-mode=3D"); + virBufferAsprintf(buf, "%scipher-mode=3D", encprefix); virQEMUBuildBufferEscapeComma(buf, encinfo->cipher_mode); virBufferAddLit(buf, ","); } if (encinfo->cipher_hash) { - virBufferAddLit(buf, "hash-alg=3D"); + virBufferAsprintf(buf, "%shash-alg=3D", encprefix); virQEMUBuildBufferEscapeComma(buf, encinfo->cipher_hash); virBufferAddLit(buf, ","); } if (!encinfo->ivgen_name) return; =20 - virBufferAddLit(buf, "ivgen-alg=3D"); + virBufferAsprintf(buf, "%sivgen-alg=3D", encprefix); virQEMUBuildBufferEscapeComma(buf, encinfo->ivgen_name); virBufferAddLit(buf, ","); =20 if (encinfo->ivgen_hash) { - virBufferAddLit(buf, "ivgen-hash-alg=3D"); + virBufferAsprintf(buf, "%sivgen-hash-alg=3D", encprefix); virQEMUBuildBufferEscapeComma(buf, encinfo->ivgen_hash); virBufferAddLit(buf, ","); } diff --git a/src/util/virqemu.h b/src/util/virqemu.h index b1296cb657..be14c04d51 100644 --- a/src/util/virqemu.h +++ b/src/util/virqemu.h @@ -60,6 +60,7 @@ char *virQEMUBuildDriveCommandlineFromJSON(virJSONValuePt= r src); =20 void virQEMUBuildBufferEscapeComma(virBufferPtr buf, const char *str); void virQEMUBuildQemuImgKeySecretOpts(virBufferPtr buf, + int format, virStorageEncryptionInfoDefPtr enc, const char *alias) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); --=20 2.26.2