From nobody Sat Feb 7 09:04:16 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1611940505; cv=none; d=zohomail.com; s=zohoarc; b=GIitPrjyQPGV8zUpSJisr23Ea5x56kUDQC5DIFVEJBvmBlVEK6WIkwtd9aPOXWx23u1Nsl/1WzgnUYzfuZKQnmMc5/fJ4VxIGatucVTlPPwHHZRgshKmOKFGRJKPPvA1M17HbpIZvH3D+63+yJkx2HgtqOpq8EV4Ri6lQ0/UthU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611940505; 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=8nPNfO81PlYle/zzWJjxZiJWWSFeST7l/GLvM7fvdOc=; b=dvp0tmEEjw7SqdOYMBkP5KfKb7si5+JHqyPUExPRvaZ6nFF1aqZxhyNb9D0XARHAFsjFajcLKgOvS0HAGfOdrScwSba1If6rftxrLNZqFnjThn2Ar9GnqN8NMzsZ0sNGqbkE6JOw7IgT2Mr1eSRKUme8odORJ0A2E7mLVRfW4jc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1611940505137987.0109821549761; Fri, 29 Jan 2021 09:15:05 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-491-ToKG56pdNMuepdawKmWrkg-1; Fri, 29 Jan 2021 12:14:24 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 90309107ACE8; Fri, 29 Jan 2021 17:14:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6E66A5C1B4; Fri, 29 Jan 2021 17:14: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 375155003F; Fri, 29 Jan 2021 17:14:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10THEERK019557 for ; Fri, 29 Jan 2021 12:14:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6776C5D71B; Fri, 29 Jan 2021 17:14:14 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-94.ams2.redhat.com [10.36.115.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6B1716267E; Fri, 29 Jan 2021 17:14:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611940503; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=8nPNfO81PlYle/zzWJjxZiJWWSFeST7l/GLvM7fvdOc=; b=K6GKAv1RaDPU2Z62scKBlkmkI0hQKWGz88fyoTtpMLe2sGoSi0c57XhwLC0WQgvDdd21wq jcyx1RGb9e5JjWpstdN1k5BF8zvSovAbjUycRtbEuW4fFwf0LVoFq5/pTJ8b4kEJUD0HU8 7PipAInwocGLxxudBYjPa1f5NHZqShU= X-MC-Unique: ToKG56pdNMuepdawKmWrkg-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 12/13] tests: Fix runtime error in test-authz-pam Date: Fri, 29 Jan 2021 17:11:01 +0000 Message-Id: <20210129171102.4109641-13-berrange@redhat.com> In-Reply-To: <20210129171102.4109641-1-berrange@redhat.com> References: <20210129171102.4109641-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Kevin Wolf , qemu-block@nongnu.org, libvir-list@redhat.com, Stefan Weil , Max Reitz , Gerd Hoffmann , Paolo Bonzini 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.79 on 10.5.11.16 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) From: Stefan Weil A test with sanitizers on macOS shows this error: authz/pamacct.c:50:25: runtime error: null pointer passed as argument 1= , which is declared to never be null /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/De= veloper/SDKs/MacOSX.sdk/usr/include/security/pam_appl.h:56:2: note: nonnull= attribute specified here Signed-off-by: Stefan Weil Signed-off-by: Daniel P. Berrang=C3=A9 --- tests/test-authz-pam.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/test-authz-pam.c b/tests/test-authz-pam.c index 1baeadee03..4fe1ef2603 100644 --- a/tests/test-authz-pam.c +++ b/tests/test-authz-pam.c @@ -28,7 +28,7 @@ static bool failauth; =20 /* - * These two functions are exported by libpam.so. + * These three functions are exported by libpam.so. * * By defining them again here, our impls are resolved * by the linker instead of those in libpam.so @@ -50,6 +50,7 @@ pam_start(const char *service_name, const char *user, failauth =3D false; } =20 + *pamh =3D (pam_handle_t *)0xbadeaffe; return PAM_SUCCESS; } =20 @@ -65,6 +66,13 @@ pam_acct_mgmt(pam_handle_t *pamh, int flags) } =20 =20 +int +pam_end(pam_handle_t *pamh, int status) +{ + return PAM_SUCCESS; +} + + static void test_authz_unknown_service(void) { Error *local_err =3D NULL; --=20 2.29.2