From nobody Thu Sep 19 00:56:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1717771169811730.2798481861461; Fri, 7 Jun 2024 07:39:29 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 4CE46256A; Fri, 7 Jun 2024 10:39:27 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 6BC43248A; Fri, 7 Jun 2024 10:26:50 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 5C98A23D0; Fri, 7 Jun 2024 10:26:34 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 6103A236E for ; Fri, 7 Jun 2024 10:26:26 -0400 (EDT) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-632-T3lct0TMN0OZtazWP9Sk2g-1; Fri, 07 Jun 2024 10:26:23 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 857233C025AC for ; Fri, 7 Jun 2024 14:26:23 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.39.193.232]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0B691492BC6; Fri, 7 Jun 2024 14:26:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717770385; 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=hOx4dIJ7KCzeyQ7r2JnqJNq2LPZLTqTSTqPGZgHYiX4=; b=hyBly9JQpWPc9AbVcvA/uAyLEg6deQ2HNFoNApkN2OqotSZOn+eKxZn1txwui+vn2U842g fqR9FdYhFevG6ng6cqhd/mvNrqQOwNvjh5eIBMJAuAHGR87TLPE0N1CKX0wk1LfKLwX2UE PX4QwsowUyfzJ13eLddZIZcWol4nDz4= X-MC-Unique: T3lct0TMN0OZtazWP9Sk2g-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 7/9] tools: stop checking init scripts & iptables config Date: Fri, 7 Jun 2024 15:26:14 +0100 Message-ID: <20240607142616.749339-8-berrange@redhat.com> In-Reply-To: <20240607142616.749339-1-berrange@redhat.com> References: <20240607142616.749339-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: H6B7PMU63TZSBEDA3JLZMTVZDM3YXLAH X-Message-ID-Hash: H6B7PMU63TZSBEDA3JLZMTVZDM3YXLAH X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1717771170993100001 Content-Type: text/plain; charset="utf-8" The /etc/sysconfig/libvirtd file is a Fedora/RHEL specific concept. Since those distros switched to systemd socket activation, the existance of --listen parameter in /etc/sysconfig/libvirtd is no longer a reliable check. This was further degraded with the switch to modular daemons where virtproxyd takes over the role. The /etc/sysconfig/iptables file is a Fedora/RHEL specific concept. Since those distros switched to firewalld, this file is no longer a reliable check. Rather than complicating these checks, just remove them, so that the virt-pki-validate tool focuses exclusively on TLS configuration validation. Signed-off-by: Daniel P. Berrang=C3=A9 --- tools/virt-pki-validate.in | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/tools/virt-pki-validate.in b/tools/virt-pki-validate.in index c91f247ba5..c77daa9862 100644 --- a/tools/virt-pki-validate.in +++ b/tools/virt-pki-validate.in @@ -73,7 +73,6 @@ echo Found "$CERTOOL" # SYSCONFDIR=3D"@sysconfdir@" PKI=3D"$SYSCONFDIR/pki" -INITCONFDIR=3D"@initconfdir@" if [ ! -d "$PKI" ] then echo the $PKI directory is missing, it is usually @@ -293,31 +292,4 @@ else SERVER=3D0 fi =20 -if [ "$SERVER" =3D "1" ] -then - if [ -r "$INITCONFDIR"/libvirtd ] - then - if grep "^LIBVIRTD_ARGS.*--listen" "$INITCONFDIR"/libvirtd \ - >/dev/null 2>&1 - then - : - else - echo Make sure "$INITCONFDIR"/libvirtd is setup to listen to - echo TCP/IP connections and restart the libvirtd service - fi - fi - if [ -r "$INITCONFDIR"/iptables ] - then - if grep "$PORT" "$INITCONFDIR"/iptables >/dev/null 2>&1 - then - : - else - echo Make sure "$INITCONFDIR"/iptables is setup to allow - echo incoming TCP/IP connections on port $PORT and - echo restart the iptables service - fi - fi -fi - - exit 0 --=20 2.43.0