From nobody Sun Feb 8 06:53:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1562861136; cv=none; d=zoho.com; s=zohoarc; b=fpMQYtpDdHA3mvilhbXbMH+5oyWZf4yfL/4OFLD/A8CvwkW53EWNLJWrEiry9unBaS1W+QEWi5eWUuCGf1cIZTqy2XOsD1o/rt7m/tM0PZvG00i4ZU9fmGZLElDpZiDKo1F/WKbWK9XKVtst4dEufmErAVTrNcanYTqt1kY5xMs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562861136; 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:ARC-Authentication-Results; bh=NP6PBuuxBG0qhvj9bKDJmg9Oy0opfZ3rLiXw9ga+EyY=; b=Xs6QbMjBA5heN95lv86Bp8/oHMJCCPYWny0fi5Nb/fQ/5IaXEdstBjnSM57pr51ips7wTfg+Qh9GT5GL5j5tuyZ0983QYSbXeyvhgHwz+xLdZISqsBSecXsT5NI7QjmR1ZOOLFvTqRxiHmyFLpkHtM1JV/2Rg+iiZIc/uTg7Zfg= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1562861136912107.56694549951476; Thu, 11 Jul 2019 09:05:36 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 318FF75724; Thu, 11 Jul 2019 16:05:35 +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 D37D31A7D1; Thu, 11 Jul 2019 16:05:34 +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 7F1EE1833005; Thu, 11 Jul 2019 16:05:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6BG5Mo2020317 for ; Thu, 11 Jul 2019 12:05:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id 00A725D973; Thu, 11 Jul 2019 16:05:22 +0000 (UTC) Received: from dhcp-17-95.lcy.redhat.com (unknown [10.42.17.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id 706675D9DC; Thu, 11 Jul 2019 16:05:21 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Thu, 11 Jul 2019 17:04:49 +0100 Message-Id: <20190711160516.2130-3-berrange@redhat.com> In-Reply-To: <20190711160516.2130-1-berrange@redhat.com> References: <20190711160516.2130-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 02/29] remote: simplify libvirtd code for deciding if SASL auth is needed 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 11 Jul 2019 16:05:35 +0000 (UTC) Signed-off-by: Daniel P. Berrang=C3=A9 --- src/remote/remote_daemon.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c index fdc9e4333a..0dabd3dff8 100644 --- a/src/remote/remote_daemon.c +++ b/src/remote/remote_daemon.c @@ -534,15 +534,10 @@ daemonSetupNetworking(virNetServerPtr srv, } =20 #if WITH_SASL - if (config->auth_unix_rw =3D=3D REMOTE_AUTH_SASL || - (sock_path_ro && config->auth_unix_ro =3D=3D REMOTE_AUTH_SASL) || - (ipsock && config->listen_tls && config->auth_tls =3D=3D REMOTE_AU= TH_SASL) || - (ipsock && config->listen_tcp && config->auth_tcp =3D=3D REMOTE_AU= TH_SASL)) { - saslCtxt =3D virNetSASLContextNewServer( - (const char *const*)config->sasl_allowed_username_list); - if (!saslCtxt) + if (virNetServerNeedsAuth(srv, REMOTE_AUTH_SASL) && + !(saslCtxt =3D virNetSASLContextNewServer( + (const char *const*)config->sasl_allowed_username_list))) goto cleanup; - } #endif =20 ret =3D 0; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list