From nobody Sun May 19 10:11:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1676484329; cv=none; d=zohomail.com; s=zohoarc; b=i37wd30QzpbC8EvGso77vwf2pQm+jJ8Qb42gDLThg+2045UBfftmsesZw/VT7gdaCrQnXQhLbhzKtx9y5RWmfdH+pXfsHj0QuWeK9QKTXNksv4hKYhCkfxvY3WRE7x18Kv0JMBMnzsozzNQFcbD7F5uIsLT74Xt0CwjU2ZoxX+A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676484329; h=Content-Type:Content-Transfer-Encoding:Cc: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=Dyy/1RzvkVp1pdcd4XazalgcwoIuoecJZnqiF2nDZkw=; b=hxK11VKlLQHLHVnu+lXXg8HrPrE8BIw0oVCgjslRgqnNby4wb71RKr36mA346dsav4lWP4xaRZjqKqXykTDP8UDUgNkt3qmnpdOOZV8U1mU9Je1wHbxHhZQz+NdV6PXzTLw5U7FZlTOf6k9VR2TTXdNIPnnI8fZMSS0TvGUwPDc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676484329860854.7671790273816; Wed, 15 Feb 2023 10:05:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSLsL-00050p-ST; Wed, 15 Feb 2023 12:47:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSLsK-0004zl-AY for qemu-devel@nongnu.org; Wed, 15 Feb 2023 12:47:24 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSLsI-0005CN-Ii for qemu-devel@nongnu.org; Wed, 15 Feb 2023 12:47:23 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-183-BtrkAbymNheruMBZZrsNMw-1; Wed, 15 Feb 2023 12:47:19 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D1C813811F34; Wed, 15 Feb 2023 17:47:17 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.33.36.254]) by smtp.corp.redhat.com (Postfix) with ESMTP id F046140C1423; Wed, 15 Feb 2023 17:47:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676483242; 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=Dyy/1RzvkVp1pdcd4XazalgcwoIuoecJZnqiF2nDZkw=; b=XegZQbpDikIeufpXYfwDLCnlaBgBKXdPTUTRsSFwC+TOkxE2p0K9iJHkrlsvdldJX8JVdE fvGj9+junoccB/GEgzp45GCfHiNyyxK2OKjFKUvdJRGBNXrk34c5q1GeJvtNQZsgqTrk+/ gCll+YbuM2mhn6dg0v5ylUGg95cPzJA= X-MC-Unique: BtrkAbymNheruMBZZrsNMw-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Ronnie Sahlberg , Kevin Wolf , libvir-list@redhat.com, Gerd Hoffmann , Paolo Bonzini , Peter Lieven , Hanna Reitz , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Antoine Damhet Subject: [PULL 1/5] crypto: TLS: introduce `check_pending` Date: Wed, 15 Feb 2023 17:47:08 +0000 Message-Id: <20230215174712.1894516-2-berrange@redhat.com> In-Reply-To: <20230215174712.1894516-1-berrange@redhat.com> References: <20230215174712.1894516-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1676484330598100003 From: Antoine Damhet The new `qcrypto_tls_session_check_pending` function allows the caller to know if data have already been consumed from the backend and is already available. Signed-off-by: Antoine Damhet Signed-off-by: Daniel P. Berrang=C3=A9 --- crypto/tlssession.c | 14 ++++++++++++++ include/crypto/tlssession.h | 11 +++++++++++ 2 files changed, 25 insertions(+) diff --git a/crypto/tlssession.c b/crypto/tlssession.c index b302d835d2..1e98f44e0d 100644 --- a/crypto/tlssession.c +++ b/crypto/tlssession.c @@ -493,6 +493,13 @@ qcrypto_tls_session_read(QCryptoTLSSession *session, } =20 =20 +size_t +qcrypto_tls_session_check_pending(QCryptoTLSSession *session) +{ + return gnutls_record_check_pending(session->handle); +} + + int qcrypto_tls_session_handshake(QCryptoTLSSession *session, Error **errp) @@ -615,6 +622,13 @@ qcrypto_tls_session_read(QCryptoTLSSession *sess, } =20 =20 +size_t +qcrypto_tls_session_check_pending(QCryptoTLSSession *session) +{ + return 0; +} + + int qcrypto_tls_session_handshake(QCryptoTLSSession *sess, Error **errp) diff --git a/include/crypto/tlssession.h b/include/crypto/tlssession.h index 15b9cef086..571049bd0e 100644 --- a/include/crypto/tlssession.h +++ b/include/crypto/tlssession.h @@ -248,6 +248,17 @@ ssize_t qcrypto_tls_session_read(QCryptoTLSSession *se= ss, char *buf, size_t len); =20 +/** + * qcrypto_tls_session_check_pending: + * @sess: the TLS session object + * + * Check if there are unread data in the TLS buffers that have + * already been read from the underlying data source. + * + * Returns: the number of bytes available or zero + */ +size_t qcrypto_tls_session_check_pending(QCryptoTLSSession *sess); + /** * qcrypto_tls_session_handshake: * @sess: the TLS session object --=20 2.39.1 From nobody Sun May 19 10:11:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1676483950; cv=none; d=zohomail.com; s=zohoarc; b=LtLscOuEyqw8S48LnJARbneq73wqRoPJv+FWJ6mRX9GwChMdHSR8Fhc2yg8gvbPaAk7x3R169N/1fFDpqTX/JHQTXF72RikIptUX4m4O+VKUC+DzuDwIESYi8asJ67z+Q20UbPa+y0STPr3IiPIIDEHm2oMoWaxSg6VfpQ49MWQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676483950; h=Content-Type:Content-Transfer-Encoding:Cc: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=drAf2ZqbcEMpmG5RYs9TvH1b9uvNGa+eyhPOGwfB6JQ=; b=Hr8ivlkRnTn4vjApK4iU3l5NK4OXHYJLlCIFFw7f8vl6nB1mVbX8KzC4Z0kErurKUHX/TSvlBNohiry8dR6LyzFWBSfFaOaE1hFo7m7RSqRV81VY/VqVOybFbG0zfMmPKil+nzQZfi557MsMfwQYlry1gSVL2juwC775E8ccXeU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676483950012990.2584566854783; Wed, 15 Feb 2023 09:59:10 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSLsO-00058J-KR; Wed, 15 Feb 2023 12:47:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSLsN-00055z-7r for qemu-devel@nongnu.org; Wed, 15 Feb 2023 12:47:27 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSLsL-0005Cr-KE for qemu-devel@nongnu.org; Wed, 15 Feb 2023 12:47:26 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-224-EWOO4m2DMke7sUzJ4M3M7A-1; Wed, 15 Feb 2023 12:47:20 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0212285C713; Wed, 15 Feb 2023 17:47:20 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.33.36.254]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C4FD408573E; Wed, 15 Feb 2023 17:47:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676483244; 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=drAf2ZqbcEMpmG5RYs9TvH1b9uvNGa+eyhPOGwfB6JQ=; b=Fc97kRq45mw64Pm16RRWK401j5vIMlooxj6rayiPgvaBkWpv63bK/u2D4n3UG3u4nsZ9yu 3fZJ+wWwyv1puBKOCkHrbJCyouDvpbG0hESACpDbrUl60Q2GuYU0NH9jzJc3Hu4SYUOJoN JLHGh3VWKEFlqezdz9ssXPS2AQSAH2c= X-MC-Unique: EWOO4m2DMke7sUzJ4M3M7A-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Ronnie Sahlberg , Kevin Wolf , libvir-list@redhat.com, Gerd Hoffmann , Paolo Bonzini , Peter Lieven , Hanna Reitz , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Antoine Damhet , Charles Frey Subject: [PULL 2/5] io/channel-tls: fix handling of bigger read buffers Date: Wed, 15 Feb 2023 17:47:09 +0000 Message-Id: <20230215174712.1894516-3-berrange@redhat.com> In-Reply-To: <20230215174712.1894516-1-berrange@redhat.com> References: <20230215174712.1894516-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1676483950259100001 From: Antoine Damhet Since the TLS backend can read more data from the underlying QIOChannel we introduce a minimal child GSource to notify if we still have more data available to be read. Signed-off-by: Antoine Damhet Signed-off-by: Charles Frey Signed-off-by: Daniel P. Berrang=C3=A9 --- io/channel-tls.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/io/channel-tls.c b/io/channel-tls.c index c730cb8ec5..8052945ba0 100644 --- a/io/channel-tls.c +++ b/io/channel-tls.c @@ -389,12 +389,76 @@ static void qio_channel_tls_set_aio_fd_handler(QIOCha= nnel *ioc, qio_channel_set_aio_fd_handler(tioc->master, ctx, io_read, io_write, o= paque); } =20 +typedef struct QIOChannelTLSSource QIOChannelTLSSource; +struct QIOChannelTLSSource { + GSource parent; + QIOChannelTLS *tioc; +}; + +static gboolean +qio_channel_tls_source_check(GSource *source) +{ + QIOChannelTLSSource *tsource =3D (QIOChannelTLSSource *)source; + + return qcrypto_tls_session_check_pending(tsource->tioc->session) > 0; +} + +static gboolean +qio_channel_tls_source_prepare(GSource *source, gint *timeout) +{ + *timeout =3D -1; + return qio_channel_tls_source_check(source); +} + +static gboolean +qio_channel_tls_source_dispatch(GSource *source, GSourceFunc callback, + gpointer user_data) +{ + return G_SOURCE_CONTINUE; +} + +static void +qio_channel_tls_source_finalize(GSource *source) +{ + QIOChannelTLSSource *tsource =3D (QIOChannelTLSSource *)source; + + object_unref(OBJECT(tsource->tioc)); +} + +static GSourceFuncs qio_channel_tls_source_funcs =3D { + qio_channel_tls_source_prepare, + qio_channel_tls_source_check, + qio_channel_tls_source_dispatch, + qio_channel_tls_source_finalize +}; + +static void +qio_channel_tls_read_watch(QIOChannelTLS *tioc, GSource *source) +{ + GSource *child; + QIOChannelTLSSource *tlssource; + + child =3D g_source_new(&qio_channel_tls_source_funcs, + sizeof(QIOChannelTLSSource)); + tlssource =3D (QIOChannelTLSSource *)child; + + tlssource->tioc =3D tioc; + object_ref(OBJECT(tioc)); + + g_source_add_child_source(source, child); +} + static GSource *qio_channel_tls_create_watch(QIOChannel *ioc, GIOCondition condition) { QIOChannelTLS *tioc =3D QIO_CHANNEL_TLS(ioc); + GSource *source =3D qio_channel_create_watch(tioc->master, condition); + + if (condition & G_IO_IN) { + qio_channel_tls_read_watch(tioc, source); + } =20 - return qio_channel_create_watch(tioc->master, condition); + return source; } =20 QCryptoTLSSession * --=20 2.39.1 From nobody Sun May 19 10:11:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1676486381; cv=none; d=zohomail.com; s=zohoarc; b=JsG2bzV9XtVRW+kHxdKOWaJ5malajLvRCDjNJGI2jwLxRXc4hCCF83/rAO6BRAJPPX0VvRJKBjo/s9TSBwoTh7s104QlmIMS/xQPND37RlFKK2NP+pfnSdyd0zimtIDYSn8c+zSe+678aQ8RAxvGUUbQh2HJ4bgHOVML9kkHHjI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676486381; h=Content-Type:Content-Transfer-Encoding:Cc: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=EnLTdQW1YqznaNEhJmicdWjmAUdsZw1qkvHUetsxoAQ=; b=dj4zMkow/IsA5G4dlid3UrbxdzZL8sXBpopV4dZPh8ha0nfsiu98UYA1MW1ATORsPwswdjX3OPN+zRr5/26Md9tK34/L57Qrz28YuiifV+R7JRDTwC8DWxnCJ4X+osYTI3ewX+iGxvSenUxhPSmb4dsPHbWsR60BJiliZ1JZZr0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676486381820854.1030569703682; Wed, 15 Feb 2023 10:39:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSLsP-00058g-96; Wed, 15 Feb 2023 12:47:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSLsN-000563-DN for qemu-devel@nongnu.org; Wed, 15 Feb 2023 12:47:27 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSLsL-0005Cv-Qa for qemu-devel@nongnu.org; Wed, 15 Feb 2023 12:47:27 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-113-6nsTdQyVMviZUB7UU2V4PQ-1; Wed, 15 Feb 2023 12:47:23 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4BFEA1C0755F; Wed, 15 Feb 2023 17:47:22 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.33.36.254]) by smtp.corp.redhat.com (Postfix) with ESMTP id 419CB40C10FA; Wed, 15 Feb 2023 17:47:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676483245; 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=EnLTdQW1YqznaNEhJmicdWjmAUdsZw1qkvHUetsxoAQ=; b=XcTIt1t+O2g+6LWHFv2ARuMrgu15WU2rgOAtD0JhPFk8GHLjE/0ToG29NF69FUlvT4KYrI 8dioStaUoQGAYk0JYxEZ6cQ3HWHGWeu5F9C7TKvrrY+RE7fpQ7kew3E1jjX1B8Yv6zjcSy dlO9CmQpfsTY75MheODqcMRs6pDs/i0= X-MC-Unique: 6nsTdQyVMviZUB7UU2V4PQ-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Ronnie Sahlberg , Kevin Wolf , libvir-list@redhat.com, Gerd Hoffmann , Paolo Bonzini , Peter Lieven , Hanna Reitz , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Markus Armbruster , Fabiano Rosas Subject: [PULL 3/5] block: mention 'password-secret' option for -iscsi Date: Wed, 15 Feb 2023 17:47:10 +0000 Message-Id: <20230215174712.1894516-4-berrange@redhat.com> In-Reply-To: <20230215174712.1894516-1-berrange@redhat.com> References: <20230215174712.1894516-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_FILL_THIS_FORM_SHORT=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1676486383892100003 The 'password-secret' option was added commit b189346eb1784df95ed6fed610411dbf23d19e1f Author: Daniel P. Berrang=C3=A9 Date: Thu Jan 21 14:19:21 2016 +0000 iscsi: add support for getting CHAP password via QCryptoSecret API but was not mentioned in the command line docs Reviewed-by: Markus Armbruster Reviewed-by: Fabiano Rosas Signed-off-by: Daniel P. Berrang=C3=A9 --- qemu-options.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 88e93c6103..e79ff4d8fb 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1892,8 +1892,8 @@ SRST ERST =20 DEF("iscsi", HAS_ARG, QEMU_OPTION_iscsi, - "-iscsi [user=3Duser][,password=3Dpassword]\n" - " [,header-digest=3DCRC32C|CR32C-NONE|NONE-CRC32C|NONE\n" + "-iscsi [user=3Duser][,password=3Dpassword][,password-secret=3Dsecret-= id]\n" + " [,header-digest=3DCRC32C|CR32C-NONE|NONE-CRC32C|NONE]\n" " [,initiator-name=3Dinitiator-iqn][,id=3Dtarget-iqn]\n" " [,timeout=3Dtimeout]\n" " iSCSI session parameters\n", QEMU_ARCH_ALL) --=20 2.39.1 From nobody Sun May 19 10:11:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1676484781; cv=none; d=zohomail.com; s=zohoarc; b=FnW9b6G72NHin11HWdtvNhEJ1XoZ2GwceXZ7XjPinDp0ngyGrvbXb+lBp8L0ZQ2/xU6+SXNuypsGqFO2ZB/gVdRE8Gk3xFZYpRVt8kEL7cZ5s1c8hj9hxdaRnspHhF9LVqasNzi/jYcOmeN8P9fyuP8VIF7mL2dCVnHuZ96aj+I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676484781; h=Content-Type:Content-Transfer-Encoding:Cc: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=0e1HLlzsJGEHoE0lVggAi5If9lXbDs+2yHmSIZimhp8=; b=EFKXIXJsUYnof7CZlKuZvzhampR9OKJj4qkz0g6Mbr8rUkLINeXoSgu5Y5YncmNGHG/IBkwc6JhrwSByEIMKORJsjyxsrsH44RDCCe/Pv4oObOn+yaDy4TK3XA8ALQ+N7wdiesqz8T8i4dGcN5VN0yh2zMI6EoBnZrxi7Bn6T0U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676484781314961.9479043302749; Wed, 15 Feb 2023 10:13:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSLsa-0005Kn-Uz; Wed, 15 Feb 2023 12:47:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSLsY-0005Gt-Ng for qemu-devel@nongnu.org; Wed, 15 Feb 2023 12:47:38 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSLsX-0005Et-9Z for qemu-devel@nongnu.org; Wed, 15 Feb 2023 12:47:38 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-636-6hB9qYd-PryJ9Jvm9aCmYg-1; Wed, 15 Feb 2023 12:47:26 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 69C9E817077; Wed, 15 Feb 2023 17:47:24 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.33.36.254]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8F9424014D03; Wed, 15 Feb 2023 17:47:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676483256; 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=0e1HLlzsJGEHoE0lVggAi5If9lXbDs+2yHmSIZimhp8=; b=KV6x2uNWsIUWjs1j8E+IkAf+UmY5kG01y0+lXVYnDSjk08I2g9G2KpcbFLM7AvZ39VOURM vtLDEmaR71M6Q+vLRijenKF95DuEhvNbggf4m+y15UKzZRzoGZ5spsKl02Vb9xnujTyRCj y8bZ2cnjxGtfmmI8/IrtjYK5rVUCU8o= X-MC-Unique: 6hB9qYd-PryJ9Jvm9aCmYg-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Ronnie Sahlberg , Kevin Wolf , libvir-list@redhat.com, Gerd Hoffmann , Paolo Bonzini , Peter Lieven , Hanna Reitz , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Fabiano Rosas Subject: [PULL 4/5] block: deprecate iSCSI 'password' in favour of 'password-secret' Date: Wed, 15 Feb 2023 17:47:11 +0000 Message-Id: <20230215174712.1894516-5-berrange@redhat.com> In-Reply-To: <20230215174712.1894516-1-berrange@redhat.com> References: <20230215174712.1894516-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1676484783334100001 Support for referencing secret objects was added in commit b189346eb1784df95ed6fed610411dbf23d19e1f Author: Daniel P. Berrang=C3=A9 Date: Thu Jan 21 14:19:21 2016 +0000 iscsi: add support for getting CHAP password via QCryptoSecret API The existing 'password' option is overdue for deprecation and subsequent removal. Reviewed-by: Fabiano Rosas Signed-off-by: Daniel P. Berrang=C3=A9 --- block/iscsi.c | 3 +++ docs/about/deprecated.rst | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index b3e10f40b6..ed3e87a548 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1353,6 +1353,9 @@ static void apply_chap(struct iscsi_context *iscsi, Q= emuOpts *opts, } else if (!password) { error_setg(errp, "CHAP username specified but no password was give= n"); return; + } else { + warn_report("iSCSI block driver 'password' option is deprecated, " + "use 'password-secret' instead"); } =20 if (iscsi_set_initiator_username_pwd(iscsi, user, password)) { diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index cb1ec72347..d31ffa86d4 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -301,6 +301,14 @@ The above, converted to the current supported format:: =20 json:{"file.driver":"rbd", "file.pool":"rbd", "file.image":"name"} =20 +``iscsi,password=3Dxxx`` (since 8.0) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Specifying the iSCSI password in plain text on the command line using the +``password`` option is insecure. The ``password-secret`` option should be +used instead, to refer to a ``--object secret...`` instance that provides +a password via a file, or encrypted. + Backwards compatibility ----------------------- =20 --=20 2.39.1 From nobody Sun May 19 10:11:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1676485308; cv=none; d=zohomail.com; s=zohoarc; b=l0fKZJ0ZcG5Y6+uglXWpiNRjXW1jzFCu0sO9z4i+VwggOhECGhRbknzC/uEF6mIP4EYai9EdpwIadFMJLxbb7WlIMvn6LgPfhrr+v02tOrdx5LGA7ejtZZ4Ay9zxJwB8+BMYwOzLx+3jHPEwJTsgy5VIpWc99aYMGf/n0yCOei4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676485308; h=Content-Type:Content-Transfer-Encoding:Cc: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=ZYyIpth2qY/IKDsqYqqQ/otIdwzEb9yUf5pKk+6N/js=; b=Wj964qQ8aXfw3kxlKAbGAW/TMuSNeCZuJjFCLh1tT71yFb536sM7wR0YZleUEA0c8pOrH1dyqlS3scqkvY6drl41n/1GuM5ewo7PlGQfgvGtFwUR5fblxYjkBVPMvV0XiapS3V8+RUD6Q4Ev6cDsszYcXxzgxEDUSJ4YrLr9ucg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676485308763913.1861071934745; Wed, 15 Feb 2023 10:21:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSLsV-0005FR-TD; Wed, 15 Feb 2023 12:47:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSLsU-0005Ak-Df for qemu-devel@nongnu.org; Wed, 15 Feb 2023 12:47:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSLsS-0005EE-QZ for qemu-devel@nongnu.org; Wed, 15 Feb 2023 12:47:34 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-379-k60A2tM5Ox-rk5335vbANw-1; Wed, 15 Feb 2023 12:47:28 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4DD323C218A4; Wed, 15 Feb 2023 17:47:27 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.33.36.254]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA2C640C1074; Wed, 15 Feb 2023 17:47:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676483252; 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=ZYyIpth2qY/IKDsqYqqQ/otIdwzEb9yUf5pKk+6N/js=; b=P+mae1RJ+zW2xNPbmY93moyEsOKImylr0EK7qa5UuPLOzKgoy8ENE3wyPI+6Ap1x17yWz/ 616eXwzb6dgC9HBSkmyf1/S9jQ4J75M1oxJSljP7IxvMh3tAI0NSS3m/os2Qh2pEfgfSrR R407zBGhqsN6WfjMQPKHhR6IK+jqrjw= X-MC-Unique: k60A2tM5Ox-rk5335vbANw-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Ronnie Sahlberg , Kevin Wolf , libvir-list@redhat.com, Gerd Hoffmann , Paolo Bonzini , Peter Lieven , Hanna Reitz , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Fabiano Rosas , Markus Armbruster Subject: [PULL 5/5] ui: remove deprecated 'password' option for SPICE Date: Wed, 15 Feb 2023 17:47:12 +0000 Message-Id: <20230215174712.1894516-6-berrange@redhat.com> In-Reply-To: <20230215174712.1894516-1-berrange@redhat.com> References: <20230215174712.1894516-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1676485310896100003 This has been replaced by the 'password-secret' option, which references a 'secret' object instance. Reviewed-by: Fabiano Rosas Reviewed-by: Markus Armbruster Signed-off-by: Daniel P. Berrang=C3=A9 --- docs/about/deprecated.rst | 8 -------- docs/about/removed-features.rst | 7 +++++++ qemu-options.hx | 9 +-------- ui/spice-core.c | 15 --------------- 4 files changed, 8 insertions(+), 31 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index d31ffa86d4..2827b0c0be 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -66,14 +66,6 @@ and will cause a warning. The replacement for the ``nodelay`` short-form boolean option is ``nodelay= =3Don`` rather than ``delay=3Doff``. =20 -``-spice password=3Dstring`` (since 6.0) -'''''''''''''''''''''''''''''''''''''' - -This option is insecure because the SPICE password remains visible in -the process listing. This is replaced by the new ``password-secret`` -option which lets the password be securely provided on the command -line using a ``secret`` object instance. - ``-smp`` ("parameter=3D0" SMP configurations) (since 6.2) ''''''''''''''''''''''''''''''''''''''''''''''''''''''' =20 diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.= rst index 4a84e6174f..e901637ce5 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -428,6 +428,13 @@ respectively. The actual backend names should be used = instead. Use ``-drive if=3Dpflash`` to configure the OTP device of the sifive_u RISC-V machine instead. =20 +``-spice password=3Dstring`` (removed in 8.0) +''''''''''''''''''''''''''''''''''''''''''' + +This option was insecure because the SPICE password remained visible in +the process listing. This was replaced by the new ``password-secret`` +option which lets the password be securely provided on the command +line using a ``secret`` object instance. =20 QEMU Machine Protocol (QMP) commands ------------------------------------ diff --git a/qemu-options.hx b/qemu-options.hx index e79ff4d8fb..cafd8be8ed 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2135,7 +2135,7 @@ DEF("spice", HAS_ARG, QEMU_OPTION_spice, " [,tls-channel=3D[main|display|cursor|inputs|record|playback]]\= n" " [,plaintext-channel=3D[main|display|cursor|inputs|record|playb= ack]]\n" " [,sasl=3Don|off][,disable-ticketing=3Don|off]\n" - " [,password=3D][,password-secret=3D]\n" + " [,password-secret=3D]\n" " [,image-compression=3D[auto_glz|auto_lz|quic|glz|lz|off]]\n" " [,jpeg-wan-compression=3D[auto|never|always]]\n" " [,zlib-glz-wan-compression=3D[auto|never|always]]\n" @@ -2161,13 +2161,6 @@ SRST ``ipv4=3Don|off``; \ ``ipv6=3Don|off``; \ ``unix=3Don|off`` Force using the specified IP version. =20 - ``password=3D`` - Set the password you need to authenticate. - - This option is deprecated and insecure because it leaves the - password visible in the process listing. Use ``password-secret`` - instead. - ``password-secret=3D`` Set the ID of the ``secret`` object containing the password you need to authenticate. diff --git a/ui/spice-core.c b/ui/spice-core.c index 72f8f1681c..76f7c2bc3d 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -412,9 +412,6 @@ static QemuOptsList qemu_spice_opts =3D { .name =3D "unix", .type =3D QEMU_OPT_BOOL, #endif - },{ - .name =3D "password", - .type =3D QEMU_OPT_STRING, },{ .name =3D "password-secret", .type =3D QEMU_OPT_STRING, @@ -666,20 +663,8 @@ static void qemu_spice_init(void) } passwordSecret =3D qemu_opt_get(opts, "password-secret"); if (passwordSecret) { - if (qemu_opt_get(opts, "password")) { - error_report("'password' option is mutually exclusive with " - "'password-secret'"); - exit(1); - } password =3D qcrypto_secret_lookup_as_utf8(passwordSecret, &error_fatal); - } else { - str =3D qemu_opt_get(opts, "password"); - if (str) { - warn_report("'password' option is deprecated and insecure, " - "use 'password-secret' instead"); - password =3D g_strdup(str); - } } =20 if (tls_port) { --=20 2.39.1