From nobody Mon Feb 9 05:43:20 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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 170.10.129.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=1641829597; cv=none; d=zohomail.com; s=zohoarc; b=nZQHTTEssjbSvx0R7o8qV1uLQeMQwjdd2tgQuH/6ydoZiGtlJRkq8zPDGGTeVq9Ri/6K5Kmw37H2Ddy3Ximf8LDqS6TMTXUM/cmZUuUH0qfgqkeIQB3vymHddBSUpKPfpy+lixAos245BnnyhYy9UVUPU24vhiP+AcfcQwsh9vM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641829597; 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=gGze9ImmhLf+zKjnqn3DrivmK7cws3kbMwZRqjnMa1Q=; b=ev8cRz3YfknFleTUCr1skJsySV4o2mu4T8aY7KJor5AC9ypstA9RjFl3zCXy6iwA1vYUysvio60fmfVorXnG6jCAk6ZV+3G2slY4p/jRTuLagPpeXSqI9Atdrh/tYWsKaU59yWwnUYzEQcmioZzDn3L217SdLGu9L3tKmRaWU6E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1641829597169275.5814312381424; Mon, 10 Jan 2022 07:46:37 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-619-UMDZnFweNnuOBlzJ_LZViA-1; Mon, 10 Jan 2022 10:46:31 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id CAD961023F6C; Mon, 10 Jan 2022 15:46:15 +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 8F44534949; Mon, 10 Jan 2022 15:46:15 +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 57CA71809CB9; Mon, 10 Jan 2022 15:46:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20AFkD8S019044 for ; Mon, 10 Jan 2022 10:46:13 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9E1AF105C89B; Mon, 10 Jan 2022 15:46:13 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 27F09105C892 for ; Mon, 10 Jan 2022 15:46:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641829596; 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=gGze9ImmhLf+zKjnqn3DrivmK7cws3kbMwZRqjnMa1Q=; b=AQ/IkNe1t3eix0bcPkRJtmL2xMRn5MDDRev42i1CvWfBt7qYZBbNCjkjrh90PVa+pfa6L4 2KK7dMz4kAAh86D9Z/rf/4JjoqR4LNLTIModvsud8IsQDho6Jyz+FlpKd+/N98HVnoQEfJ WHQrbUNIr7EesTAGETT2+fC7q6AvVMg= X-MC-Unique: UMDZnFweNnuOBlzJ_LZViA-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 2/3] virdnsmasq: Lookup DNSMASQ in PATH Date: Mon, 10 Jan 2022 16:44:55 +0100 Message-Id: <978eb28c147e129633f76043de064852841e30a0.1641829321.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1641829599878100001 Content-Type: text/plain; charset="utf-8" While it's true that our virCommand subsystem is happy with non-absolute paths, the dnsmasq capability code is not. For instance, it does call stat() over the binary to learn its mtime (and thus decide whether capabilities need to be fetched again or not). Therefore, when constructing the capabilities structure look up the binary path. If DNSMASQ already contains an absolute path then it is returned (and virFindFileInPath() is a NOP). Signed-off-by: Michal Privoznik Reviewed-by: Andrea Bolognani --- src/util/virdnsmasq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index d304929d51..b6ccb9d0a4 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -708,7 +708,7 @@ dnsmasqCapsNewEmpty(void) return NULL; if (!(caps =3D virObjectNew(dnsmasqCapsClass))) return NULL; - caps->binaryPath =3D g_strdup(DNSMASQ); + caps->binaryPath =3D virFindFileInPath(DNSMASQ); return caps; } =20 --=20 2.34.1