From nobody Mon Sep 4 11:33:19 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RfRMz3ZxNz4sCrk; Mon, 4 Sep 2023 11:33:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RfRMz2pl5z3ZRw; Mon, 4 Sep 2023 11:33:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693827199; h=from:from: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; bh=CY/pT+Ys61hZiYf/L2RYLqPp/G38wapZVRvG38TTv8o=; b=V6CVgcKO5KPvx0L3wi1jQgfBi3iP0LKCijBDVbRCYA9cGB5mP7yJGIqaUjxaGprwC0QJcD +t4eIt8PjVs5gru6btYqWnfkIw48XidEGrwpaVfmL7hzhWlOZWpK+dzRY3czWPupFbl+xV A1Djmq30OoUDdpsEGmbOo+ivUD+YmUkbYzjIzXEsSAbZFLlqVPxGyXXrhKWHymChLSe0AV xurJVXG35lT6pQUUH1enTbc7NwuivGqnCQKF/60+y/bD/V/xnGex8DLc3HkCNXwdwnAFeZ EDVsZ159YDfFeLvAjvF1j2D3Seeymj9SXmG+yZkAczjY3KJbj4SmtFyNzyRdVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693827199; a=rsa-sha256; cv=none; b=eK5PMHG0gL1+WwWUEA5CEcgGA5XXqzNKnYIORvG7GcnCvkh+2I8aBHQl76zru+aQxH6lgN lcqxBNCAblYGPRw6K0/P/eAp6ivWs4YgRn7k4kX1LoJLl//i+aRJZXk16fORihz48d9/5C yuzevpQ2MyWFp0PrcAycV7+M+Rpioh2r7B3/kQpindlovOtJWzz/xEpIj+TBHNX+Zhz2VV pSa8XlYBh84jzg851EeaJPLVLhyw2XS1sbmrT7yUtH4xz/5YCzJe6VGFnfL66SWYKwjv4N 8QjawU2UD1Vaxn1dyfsAOJljH7VJwft9TNlWzI7wN4KdheTPUAELuZK1z/HdYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693827199; h=from:from: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; bh=CY/pT+Ys61hZiYf/L2RYLqPp/G38wapZVRvG38TTv8o=; b=UYhJutU+VIh9KrgLeJvnJcfrvTQ3jjLckEdj+48yXhHv4ynCdGPHwYY9+VoO2vszP/Vdy0 eulkjINA7YoS7IgmS8beKwAau9fS/mfPPExrzOust94JgyP1Mo/cpa8h0yWVGh7jD3HO7W tVFRrxl5AHsqY9gHgh2hHb8e1o496FNoVclyAZPqrLa/I+MM2dlRF8S2VWgy4n2TT/rlL9 2EAC1J0TQXE7S73GZ6Bf2YEsjxpQpad1c4EgItSyUGbbHBSKarYSpg65liJlHl++zcQ8Pw KTyiZPQnHrnUg2A5qrGA5jpyNcRVxAJTEZfhjrr3MpwpWbgwCz2cF362Q2Xq/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RfRMz1szvz14xD; Mon, 4 Sep 2023 11:33:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 384BXJXD000157; Mon, 4 Sep 2023 11:33:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 384BXJkw000154; Mon, 4 Sep 2023 11:33:19 GMT (envelope-from git) Date: Mon, 4 Sep 2023 11:33:19 GMT Message-Id: <202309041133.384BXJkw000154@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alexey Dokuchaev Subject: git: b437f97ec2cb - main - security/pam-modules: redo previously committed incorrect build "fix" List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: danfe X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b437f97ec2cbdb27ca69fc8b09c7f3bb3014973e Auto-Submitted: auto-generated The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=b437f97ec2cbdb27ca69fc8b09c7f3bb3014973e commit b437f97ec2cbdb27ca69fc8b09c7f3bb3014973e Author: Alexey Dokuchaev AuthorDate: 2023-09-04 11:31:28 +0000 Commit: Alexey Dokuchaev CommitDate: 2023-09-04 11:31:28 +0000 security/pam-modules: redo previously committed incorrect build "fix" The xgetname() function expecting `int (*)(char *, size_t)' was written for gethostname() which matches this (per POSIX), but also used against getdomainname() which does not (its `namelen' argument is int). Rather than forcibly feeding non-matching function, create a thin wrapper with correct types. Fixes: 3a86f14adefa --- security/pam-modules/Makefile | 2 -- .../files/patch-pam__innetgr_pam__innetgr.c | 23 ++++++++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/security/pam-modules/Makefile b/security/pam-modules/Makefile index f6ddc291a0a7..5ccf8315e535 100644 --- a/security/pam-modules/Makefile +++ b/security/pam-modules/Makefile @@ -39,6 +39,4 @@ PGSQL_VARS= WANT_PGSQL=client REGEX_CONFIGURE_ENABLE= regex SYSLOG_CONFIGURE_ENABLE= log -.include - .include diff --git a/security/pam-modules/files/patch-pam__innetgr_pam__innetgr.c b/security/pam-modules/files/patch-pam__innetgr_pam__innetgr.c index 8d0193e20744..286bdc7d4e2d 100644 --- a/security/pam-modules/files/patch-pam__innetgr_pam__innetgr.c +++ b/security/pam-modules/files/patch-pam__innetgr_pam__innetgr.c @@ -1,11 +1,26 @@ ---- pam_innetgr/pam_innetgr.c.orig 2022-02-04 07:04:47.000000000 -0800 -+++ pam_innetgr/pam_innetgr.c 2023-08-28 06:57:10.213329000 -0700 -@@ -131,7 +131,7 @@ +--- pam_innetgr/pam_innetgr.c.orig 2022-02-04 15:04:47 UTC ++++ pam_innetgr/pam_innetgr.c +@@ -121,6 +121,14 @@ stripdomain(char *hostname, char const *domainname) + return -1; + } + ++#if HAVE_GETDOMAINNAME ++static int ++getdomainname_size_t(char *name, size_t namelen) ++{ ++ return getdomainname(name, (int)namelen); ++} ++#endif ++ + int + get_host_domain_names(char **host_name_ptr, char **domain_name_ptr) + { +@@ -131,7 +139,7 @@ get_host_domain_names(char **host_name_ptr, char **dom return -1; #if HAVE_GETDOMAINNAME if (use_getdomainname) { - if (xgetname(getdomainname, &domainname)) { -+ if (xgetname((long int *) getdomainname, &domainname)) { ++ if (xgetname(getdomainname_size_t, &domainname)) { _pam_log(LOG_ERR, "getdomainname: %s", strerror(errno)); } else if (strcmp (domainname, "(none)") == 0) { free(domainname);