From nobody Sun Feb 8 07:57:49 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=1563015536; cv=none; d=zoho.com; s=zohoarc; b=jWL7xNyukfJeMCFfhteaRDmbE3NBjOPoWBO0fwRs5Gwp6z9bec+HsdIjEp6baJcCYpMwgr0aRkLoQuIbKhPXHTBRY7jBI8nT+pfnMQykG9OhJv5wzNNiT9Cjlsips93ooK+nSsxQo76uG4z29jwi2MMDqDlGQiHo7ePV52mcqn0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563015536; 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:ARC-Authentication-Results; bh=Xm+u7nkY+GngV7yqxySRpoksPaVHEwS7/dUEniCYn1E=; b=dcWDisPr+uAzz1kAA4sHvMBdlC+XreBCCjlKU+mqpyi8xBNnkUyeFcg8SpPnv7R13QbrLic5HVj7NUWBZFRspmhctsfkgwpUMk8ruCq5ZBq43XKQVJ1g3fQk/kGj6nIEr0ISfUezNDKJEt79P88jMxatUe8X3t1jinm7olvSd1Y= 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 1563015536079632.4412385546415; Sat, 13 Jul 2019 03:58:56 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 46D1DC057F30; Sat, 13 Jul 2019 10:58:54 +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 228B860920; Sat, 13 Jul 2019 10:58:54 +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 DE5F318184AD; Sat, 13 Jul 2019 10:58:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6DAwqDj010236 for ; Sat, 13 Jul 2019 06:58:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9489F19699; Sat, 13 Jul 2019 10:58:52 +0000 (UTC) Received: from localhost.localdomain (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 442BB196E5; Sat, 13 Jul 2019 10:58:50 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Sat, 13 Jul 2019 12:58:37 +0200 Message-Id: <40d0108d7b671c5299cbbf26cb20c42d910c3783.1563015448.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: abologna@redhat.com Subject: [libvirt] [PATCH 4/5] libvirt_nss: Pass @name to appendAddr() 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-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Sat, 13 Jul 2019 10:58:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" In the nss plugin we have ERROR() macro which by default does nothing. However, at compile time it can be made to report errors (this is useful for debugging because by nature of NSS debugging is hard). Anyway, the appendAddr() function uses @name (which contains name the caller wants us to resolve) for error reporting. But the caller findLeaseInJSON() is not passing it. Signed-off-by: Michal Privoznik Reviewed-by: Erik Skultety --- tools/nss/libvirt_nss.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/nss/libvirt_nss.c b/tools/nss/libvirt_nss.c index 3b2583669b..b0e118bf37 100644 --- a/tools/nss/libvirt_nss.c +++ b/tools/nss/libvirt_nss.c @@ -80,7 +80,8 @@ typedef struct { =20 =20 static int -appendAddr(leaseAddress **tmpAddress, +appendAddr(const char *name ATTRIBUTE_UNUSED, + leaseAddress **tmpAddress, size_t *ntmpAddress, virJSONValuePtr lease, int af) @@ -196,7 +197,7 @@ findLeaseInJSON(leaseAddress **tmpAddress, DEBUG("Found record for %s", name); *found =3D true; =20 - if (appendAddr(tmpAddress, ntmpAddress, lease, af) < 0) + if (appendAddr(name, tmpAddress, ntmpAddress, lease, af) < 0) return -1; } =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list