From nobody Mon Jan 31 12:23:01 2022 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 B71FE1979EC7; Mon, 31 Jan 2022 12:23:04 +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 4JnRzV6BG1z4SFm; Mon, 31 Jan 2022 12:23:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643631783; 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=9VJA/pmNLJ6Rm/ASQCG7R93m3pAzPalKt2ikiJ54rDY=; b=UsipC6Jg1G8v1vTvJroQLEfozBojDviN/WBXiiUp/oOJWdDx1a/oWDWgwhcMx8bAPt8EIU sWgUB6flFjd4fXGgTWO0SOKmc6YaNaEFdHfXrXzhhv0zXmhVo1dweasObGDhdIg6wJETAN Y8slvYAGe4YfkCYLbLIIiCTGVi8SgbfMrckx3yyZxPRmHSDoEhZQUlNH1n4k49hMepjmeH wNumOG3PA9ENT7HS4ayILNjqiiZtKEysIJQxy74IBieGGhlWNsi0GCRdENc9hndljhlsUZ mzYX2hbuWKKKNylpdtCXYRvpzhfaEblmab4iOfoAD7c9e89/sE5UgzWVZGsYrg== 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 CDF0B1C591; Mon, 31 Jan 2022 12:23:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20VCN1FS082456; Mon, 31 Jan 2022 12:23:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20VCN1A5082455; Mon, 31 Jan 2022 12:23:01 GMT (envelope-from git) Date: Mon, 31 Jan 2022 12:23:01 GMT Message-Id: <202201311223.20VCN1A5082455@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alex Dupre Subject: git: cf4f63cf4a9d - main - security/oath-toolkit: update to 2.6.7 release 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: ale X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf4f63cf4a9d4b27bf6bae3a6fed38aba8106513 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643631783; 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=9VJA/pmNLJ6Rm/ASQCG7R93m3pAzPalKt2ikiJ54rDY=; b=pkUpO8gPa3Mi5IN266j8BxSNCV9OG+dfBvblK/WrzXo84vm93HO4m7ZGuybMOJaE6YTbZ+ caYSS/AZ7p8Bgp/Y00BHDm6bNkirvPHYjBskNoMcrNnWfew3CEMCUI/6ShQY64tKNoToti Gjl+XWQ5py+jmstUBqVGLAgovdEzjI45Q5cuFuiQrDkLUIT0UrED95cz09YOIAKQccvrRT +rCETaFjIclwAAMpXXHCuyQMbwRYswIBzxLIzfG5dnsBzlTgaoeypO+YTh69RS63kbLmlT LyPBVeY/ufLE52g0Zp8cgr3CX3USIk+LVBjnbyYOWzK3aaCeYXYMC6A7WEVP+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643631783; a=rsa-sha256; cv=none; b=W6tUhNFZb4N1iYzSdYDqgruZsWFc6BhqnKlOKqPtShM31iQaCIPp1VbRZu1P1fUVB/Y223 62+0lK0hlRUChX9kdyjUeArFickvA0AW62rrqVCgckoJmLgXY9Qv77sgMMLISzzz4xZwbl RKiEaqewLDzO2/dxkXYHVowmij3ajnQsAMApYBrYMLzMhpOHK/5ok9XUAa7HLMDhW9+opO KEktwUZE2FBdunc0Tq3PMlkbsmVMIXhJHpgBtkhkzACpfTfCcaBBdSHmK92tJnc9xkepyl Oxebv0lWp2PJd0O/5HZH9k2JiawTbNZIYRlVuyG2sIipljmyQdMkNLbl4iGLRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ale: URL: https://cgit.FreeBSD.org/ports/commit/?id=cf4f63cf4a9d4b27bf6bae3a6fed38aba8106513 commit cf4f63cf4a9d4b27bf6bae3a6fed38aba8106513 Author: Alex Dupre AuthorDate: 2022-01-31 12:18:03 +0000 Commit: Alex Dupre CommitDate: 2022-01-31 12:22:47 +0000 security/oath-toolkit: update to 2.6.7 release --- security/oath-toolkit/Makefile | 10 ++- security/oath-toolkit/distinfo | 6 +- .../files/patch-liboath_tests_tst__basic.c | 11 +++ .../patch-liboath_tests_tst__totp__validate.c | 20 +++++ .../files/patch-libpskc_tests_tst__basic.c | 11 +++ .../oath-toolkit/files/patch-pam__oath_Makefile.in | 11 +++ .../oath-toolkit/files/patch-pam__oath_configure | 11 +++ .../files/patch-pam__oath_pam__modutil.c | 85 ++++++++++++++++++++++ .../files/patch-pam__oath_pam__modutil.h | 20 +++++ .../oath-toolkit/files/patch-pam__oath_pam__oath.c | 20 +++++ .../files/patch-pam__oath_tests_Makefile.in | 11 +++ 11 files changed, 212 insertions(+), 4 deletions(-) diff --git a/security/oath-toolkit/Makefile b/security/oath-toolkit/Makefile index 05551537a896..8d794306bfa4 100644 --- a/security/oath-toolkit/Makefile +++ b/security/oath-toolkit/Makefile @@ -1,17 +1,25 @@ # Created by: Alex Dupre PORTNAME= oath-toolkit -PORTVERSION= 2.6.2 +PORTVERSION= 2.6.7 CATEGORIES= security MASTER_SITES= SAVANNAH MAINTAINER= ale@FreeBSD.org COMMENT= Library, tools, and PAM module for OATH authentication +LICENSE= GPLv3+ LGPL20+ +LICENSE_COMB= multi + +LIB_DEPENDS= libltdl.so:devel/libltdl + GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-html-dir=${DOCSDIR} USES= gmake libtool pathfix pkgconfig +USE_GNOME= libxslt USE_LDCONFIG= yes +INSTALL_TARGET= install-strip +TEST_TARGET= check OPTIONS_DEFINE= PSKC DOCS OPTIONS_DEFAULT=PSKC diff --git a/security/oath-toolkit/distinfo b/security/oath-toolkit/distinfo index d020f7b8ec83..dc985d05f962 100644 --- a/security/oath-toolkit/distinfo +++ b/security/oath-toolkit/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1472638195 -SHA256 (oath-toolkit-2.6.2.tar.gz) = b03446fa4b549af5ebe4d35d7aba51163442d255660558cd861ebce536824aa0 -SIZE (oath-toolkit-2.6.2.tar.gz) = 4295786 +TIMESTAMP = 1643620380 +SHA256 (oath-toolkit-2.6.7.tar.gz) = 36eddfce8f2f36347fb257dbf878ba0303a2eaafe24eaa071d5cd302261046a9 +SIZE (oath-toolkit-2.6.7.tar.gz) = 5625279 diff --git a/security/oath-toolkit/files/patch-liboath_tests_tst__basic.c b/security/oath-toolkit/files/patch-liboath_tests_tst__basic.c new file mode 100644 index 000000000000..e1583b1c584a --- /dev/null +++ b/security/oath-toolkit/files/patch-liboath_tests_tst__basic.c @@ -0,0 +1,11 @@ +--- liboath/tests/tst_basic.c.orig 2022-01-31 11:26:43 UTC ++++ liboath/tests/tst_basic.c +@@ -57,7 +57,7 @@ main (void) + return 1; + } + +- if (OATH_VERSION_NUMBER < 0x02060300 || OATH_VERSION_NUMBER >= 0x03000000) ++ if (OATH_VERSION_NUMBER < 0x02060200 || OATH_VERSION_NUMBER >= 0x03000000) + { + printf ("OATH_VERSION_NUMBER out of range?!\n"); + return 1; diff --git a/security/oath-toolkit/files/patch-liboath_tests_tst__totp__validate.c b/security/oath-toolkit/files/patch-liboath_tests_tst__totp__validate.c new file mode 100644 index 000000000000..616fcd5ee021 --- /dev/null +++ b/security/oath-toolkit/files/patch-liboath_tests_tst__totp__validate.c @@ -0,0 +1,20 @@ +--- liboath/tests/tst_totp_validate.c.orig 2022-01-31 11:03:27 UTC ++++ liboath/tests/tst_totp_validate.c +@@ -156,7 +156,7 @@ main (void) + } + if (otp_counter != tv[i].otp_counter) + { +- printf ("validate3 loop %ld failed (counter %d != %d)?!\n", ++ printf ("validate3 loop %ld failed (counter %ld != %ld)?!\n", + i, otp_counter, tv[i].otp_counter); + return 1; + } +@@ -184,7 +184,7 @@ main (void) + } + if (otp_counter != tv[i].otp_counter) + { +- printf ("validate3_callback loop %ld failed (counter %d != %d)?!\n", ++ printf ("validate3_callback loop %ld failed (counter %ld != %ld)?!\n", + i, otp_counter, tv[i].otp_counter); + return 1; + } diff --git a/security/oath-toolkit/files/patch-libpskc_tests_tst__basic.c b/security/oath-toolkit/files/patch-libpskc_tests_tst__basic.c new file mode 100644 index 000000000000..e69b5c0425d7 --- /dev/null +++ b/security/oath-toolkit/files/patch-libpskc_tests_tst__basic.c @@ -0,0 +1,11 @@ +--- libpskc/tests/tst_basic.c.orig 2022-01-31 11:38:13 UTC ++++ libpskc/tests/tst_basic.c +@@ -70,7 +70,7 @@ main (void) + return 1; + } + +- if (PSKC_VERSION_NUMBER < 0x02060300 || PSKC_VERSION_NUMBER >= 0x03000000) ++ if (PSKC_VERSION_NUMBER < 0x02060200 || PSKC_VERSION_NUMBER >= 0x03000000) + { + printf ("PSKC_VERSION_NUMBER out of range?!\n"); + return 1; diff --git a/security/oath-toolkit/files/patch-pam__oath_Makefile.in b/security/oath-toolkit/files/patch-pam__oath_Makefile.in new file mode 100644 index 000000000000..427bdc6233bb --- /dev/null +++ b/security/oath-toolkit/files/patch-pam__oath_Makefile.in @@ -0,0 +1,11 @@ +--- pam_oath/Makefile.in.orig 2022-01-31 11:17:51 UTC ++++ pam_oath/Makefile.in +@@ -414,7 +414,7 @@ AM_CPPFLAGS = -I$(builddir)/../liboath + EXTRA_DIST = README + pammoddir = $(PAMDIR) + pammod_LTLIBRARIES = pam_oath.la +-pam_oath_la_SOURCES = pam_oath.c ++pam_oath_la_SOURCES = pam_oath.c pam_modutil.c pam_modutil.h + # XXX add -Wl,-x too? PAM documentation suggests it. + pam_oath_la_LIBADD = ../liboath/liboath.la + pam_oath_la_LDFLAGS = -module -avoid-version diff --git a/security/oath-toolkit/files/patch-pam__oath_configure b/security/oath-toolkit/files/patch-pam__oath_configure new file mode 100644 index 000000000000..154fc0917915 --- /dev/null +++ b/security/oath-toolkit/files/patch-pam__oath_configure @@ -0,0 +1,11 @@ +--- pam_oath/configure.orig 2022-01-31 11:20:05 UTC ++++ pam_oath/configure +@@ -12156,8 +12156,6 @@ if test "x$ac_cv_header_security_pam_modutil_h" = xyes + #define HAVE_SECURITY_PAM_MODUTIL_H 1 + _ACEOF + +-else +- as_fn_error $? "PAM header files not found, install libpam-dev." "$LINENO" 5 + fi + + done diff --git a/security/oath-toolkit/files/patch-pam__oath_pam__modutil.c b/security/oath-toolkit/files/patch-pam__oath_pam__modutil.c new file mode 100644 index 000000000000..aabd50957e26 --- /dev/null +++ b/security/oath-toolkit/files/patch-pam__oath_pam__modutil.c @@ -0,0 +1,85 @@ +--- pam_oath/pam_modutil.c.orig 2022-01-31 11:03:40 UTC ++++ pam_oath/pam_modutil.c +@@ -0,0 +1,82 @@ ++#include ++ ++#ifndef HAVE_SECURITY_PAM_MODUTIL_H ++ ++#include "pam_modutil.h" ++ ++#ifdef HAVE_SECURITY_PAM_APPL_H ++#include ++#endif ++#ifdef HAVE_SECURITY_PAM_MODULES_H ++#include ++#endif ++ ++#include ++#include ++#include ++#include ++#include ++ ++#define PWD_INITIAL_LENGTH 0x400 ++#define PWD_ABSURD_PWD_LENGTH 0x4000 ++ ++void _pam_modutil_cleanup(pam_handle_t *pamh, void *data, int error_status) { ++ if (data) { ++ (void) free(data); ++ } ++} ++ ++struct passwd *pam_modutil_getpwnam(pam_handle_t *pamh, const char *user) { ++ void *buffer = NULL; ++ size_t length = PWD_INITIAL_LENGTH; ++ long sc_init_length = sysconf(_SC_GETPW_R_SIZE_MAX); ++ ++ if (sc_init_length != -1 && sc_init_length < PWD_ABSURD_PWD_LENGTH) { ++ length = (size_t) sc_init_length; ++ } ++ ++ do { ++ int status; ++ void *new_buffer; ++ struct passwd *result = NULL; ++ ++ new_buffer = realloc(buffer, sizeof(struct passwd) + length); ++ if (new_buffer == NULL) { ++ // out of memory ++ if (buffer) { ++ free(buffer); ++ } ++ return NULL; ++ } ++ buffer = new_buffer; ++ ++ status = getpwnam_r(user, buffer, ++ sizeof(struct passwd) + (char *) buffer, ++ length, &result); ++ if (!status && result) { ++ status = pam_set_data(pamh, "_pammodutil_getpwnam", result, ++ _pam_modutil_cleanup); ++ if (status == PAM_SUCCESS) { ++ return result; ++ } ++ // unable to set data item ++ free(buffer); ++ return NULL; ++ } ++ if (status != ERANGE) { ++ // no matching record found (if status == 0) ++ // or getpwnam_r encountered an error ++ free(buffer); ++ return NULL; ++ } ++ ++ length <<= 1; ++ } while (length < PWD_ABSURD_PWD_LENGTH); ++ ++ // exceeded maximum buffer size ++ free(buffer); ++ return NULL; ++} ++#else ++typedef int make_iso_compilers_happy; ++#endif /* HAVE_SECURITY_PAM_MODUTIL_H */ diff --git a/security/oath-toolkit/files/patch-pam__oath_pam__modutil.h b/security/oath-toolkit/files/patch-pam__oath_pam__modutil.h new file mode 100644 index 000000000000..929a3951d5c4 --- /dev/null +++ b/security/oath-toolkit/files/patch-pam__oath_pam__modutil.h @@ -0,0 +1,20 @@ +--- pam_oath/pam_modutil.h.orig 2022-01-31 11:03:40 UTC ++++ pam_oath/pam_modutil.h +@@ -0,0 +1,17 @@ ++#ifndef PAM_MODUTIL_H ++#define PAM_MODUTIL_H ++ ++#ifdef HAVE_SECURITY_PAM_MODUTIL_H ++#include ++#else ++ ++#ifdef HAVE_SECURITY_PAM_MODULES_H ++#include ++#endif ++ ++#include ++ ++struct passwd *pam_modutil_getpwnam(pam_handle_t *pamh, const char *user); ++ ++#endif ++#endif diff --git a/security/oath-toolkit/files/patch-pam__oath_pam__oath.c b/security/oath-toolkit/files/patch-pam__oath_pam__oath.c new file mode 100644 index 000000000000..29aad9f52fa9 --- /dev/null +++ b/security/oath-toolkit/files/patch-pam__oath_pam__oath.c @@ -0,0 +1,20 @@ +--- pam_oath/pam_oath.c.orig 2021-05-01 17:10:32 UTC ++++ pam_oath/pam_oath.c +@@ -21,6 +21,7 @@ + #include + + #include "oath.h" ++#include "pam_modutil.h" + + #include + #include +@@ -42,9 +43,6 @@ + + #ifdef HAVE_SECURITY_PAM_APPL_H + #include +-#endif +-#ifdef HAVE_SECURITY_PAM_MODUTIL_H +-#include + #endif + #ifdef HAVE_SECURITY_PAM_MODULES_H + #include diff --git a/security/oath-toolkit/files/patch-pam__oath_tests_Makefile.in b/security/oath-toolkit/files/patch-pam__oath_tests_Makefile.in new file mode 100644 index 000000000000..4912d58fdaf6 --- /dev/null +++ b/security/oath-toolkit/files/patch-pam__oath_tests_Makefile.in @@ -0,0 +1,11 @@ +--- pam_oath/tests/Makefile.in.orig 2022-01-31 12:02:54 UTC ++++ pam_oath/tests/Makefile.in +@@ -102,7 +102,7 @@ PRE_UNINSTALL = : + POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ +-TESTS = test-pam_oath$(EXEEXT) $(am__append_1) ++TESTS = $(am__append_1) + @ROOT_TESTS_TRUE@am__append_1 = run-root-tests.sh + subdir = tests + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4