[arch-commits] Commit in yubico-pam/repos/community-x86_64 (6 files)

Christian Hesse eworm at archlinux.org
Thu Apr 16 14:57:10 UTC 2020


    Date: Thursday, April 16, 2020 @ 14:57:10
  Author: eworm
Revision: 615342

archrelease: copy trunk to community-x86_64

Added:
  yubico-pam/repos/community-x86_64/0001-fix_compiler_warning_in_pam_test_c.patch
    (from rev 615341, yubico-pam/trunk/0001-fix_compiler_warning_in_pam_test_c.patch)
  yubico-pam/repos/community-x86_64/0002-fix_implicit_declaration_warning_of_mkostemp.patch
    (from rev 615341, yubico-pam/trunk/0002-fix_implicit_declaration_warning_of_mkostemp.patch)
  yubico-pam/repos/community-x86_64/0003-tests-add-a-http-1.1-header-to-the-ykval-mock.patch
    (from rev 615341, yubico-pam/trunk/0003-tests-add-a-http-1.1-header-to-the-ykval-mock.patch)
  yubico-pam/repos/community-x86_64/PKGBUILD
    (from rev 615341, yubico-pam/trunk/PKGBUILD)
Deleted:
  yubico-pam/repos/community-x86_64/0001-util-make-sure-to-close-the-authfile-before-returnin.patch
  yubico-pam/repos/community-x86_64/PKGBUILD

-----------------------------------------------------------------+
 0001-fix_compiler_warning_in_pam_test_c.patch                   |  171 ++++++++++
 0001-util-make-sure-to-close-the-authfile-before-returnin.patch |   26 -
 0002-fix_implicit_declaration_warning_of_mkostemp.patch         |   24 +
 0003-tests-add-a-http-1.1-header-to-the-ykval-mock.patch        |   33 +
 PKGBUILD                                                        |   97 +++--
 5 files changed, 283 insertions(+), 68 deletions(-)

Copied: yubico-pam/repos/community-x86_64/0001-fix_compiler_warning_in_pam_test_c.patch (from rev 615341, yubico-pam/trunk/0001-fix_compiler_warning_in_pam_test_c.patch)
===================================================================
--- 0001-fix_compiler_warning_in_pam_test_c.patch	                        (rev 0)
+++ 0001-fix_compiler_warning_in_pam_test_c.patch	2020-04-16 14:57:10 UTC (rev 615342)
@@ -0,0 +1,171 @@
+From 9341f3477ad24cded99ada8dd48b6010293fa112 Mon Sep 17 00:00:00 2001
+From: Tero Paloheimo <tero.paloheimo at iki.fi>
+Date: Wed, 24 Oct 2018 16:23:47 +0300
+Subject: [PATCH] Fix compiler warning in pam_test.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Compiler cannot find the declaration for pm_sm_authenticate and prints
+the following warning (split due to long line):
+pam_test.c:184:10: warning: implicit declaration of function
+‘pam_sm_authenticate’; did you mean ‘pam_authenticate’?
+[-Wimplicit-function-declaration]
+---
+ tests/pam_test.c | 42 +++++++++++++++++++++++-------------------
+ 1 file changed, 23 insertions(+), 19 deletions(-)
+
+diff --git a/tests/pam_test.c b/tests/pam_test.c
+index fbeb0f4..d88dc70 100644
+--- a/tests/pam_test.c
++++ b/tests/pam_test.c
+@@ -48,6 +48,10 @@ struct pam_modutil_privs {
+ };
+ #endif
+ 
++int
++pam_sm_authenticate (pam_handle_t * pamh,
++                     int flags, int argc, const char **argv);
++
+ #define YKVAL_PORT1 "17502"
+ #define YKVAL_PORT2 "30559"
+ #define LDAP_PORT "52825"
+@@ -181,7 +185,7 @@ static int test_authenticate1(void) {
+     "authfile="AUTHFILE,
+     "debug",
+   };
+-  return pam_sm_authenticate(0, 0, sizeof(cfg) / sizeof(char*), cfg);
++  return pam_sm_authenticate((pam_handle_t *)0, 0, sizeof(cfg) / sizeof(char*), cfg);
+ }
+ 
+ static int test_authenticate2(void) {
+@@ -191,7 +195,7 @@ static int test_authenticate2(void) {
+     "authfile="AUTHFILE,
+     "debug",
+   };
+-  return pam_sm_authenticate(0, 0, sizeof(cfg) / sizeof(char*), cfg);
++  return pam_sm_authenticate((pam_handle_t *)0, 0, sizeof(cfg) / sizeof(char*), cfg);
+ }
+ 
+ static int test_authenticate3(void) {
+@@ -201,7 +205,7 @@ static int test_authenticate3(void) {
+     "authfile="AUTHFILE,
+     "debug",
+   };
+-  return pam_sm_authenticate(4, 0, sizeof(cfg) / sizeof(char*), cfg);
++  return pam_sm_authenticate((pam_handle_t *)4, 0, sizeof(cfg) / sizeof(char*), cfg);
+ }
+ 
+ static int test_authenticate4(void) {
+@@ -211,7 +215,7 @@ static int test_authenticate4(void) {
+     "authfile="AUTHFILE,
+     "debug",
+   };
+-  return pam_sm_authenticate(5, 0, sizeof(cfg) / sizeof(char*), cfg);
++  return pam_sm_authenticate((pam_handle_t *)5, 0, sizeof(cfg) / sizeof(char*), cfg);
+ }
+ 
+ static int test_authenticate5(void) {
+@@ -221,7 +225,7 @@ static int test_authenticate5(void) {
+     "authfile="AUTHFILE,
+     "debug",
+   };
+-  return pam_sm_authenticate(6, 0, sizeof(cfg) / sizeof(char*), cfg);
++  return pam_sm_authenticate((pam_handle_t *)6, 0, sizeof(cfg) / sizeof(char*), cfg);
+ }
+ 
+ static int test_fail_authenticate1(void) {
+@@ -231,7 +235,7 @@ static int test_fail_authenticate1(void) {
+     "authfile="AUTHFILE,
+     "debug"
+   };
+-  return pam_sm_authenticate(1, 0, sizeof(cfg) / sizeof(char*), cfg);
++  return pam_sm_authenticate((pam_handle_t *)1, 0, sizeof(cfg) / sizeof(char*), cfg);
+ }
+ 
+ static int test_fail_authenticate2(void) {
+@@ -241,7 +245,7 @@ static int test_fail_authenticate2(void) {
+     "authfile="AUTHFILE,
+     "debug"
+   };
+-  return pam_sm_authenticate(2, 0, sizeof(cfg) / sizeof(char*), cfg);
++  return pam_sm_authenticate((pam_handle_t *)2, 0, sizeof(cfg) / sizeof(char*), cfg);
+ }
+ 
+ static int test_fail_authenticate3(void) {
+@@ -251,7 +255,7 @@ static int test_fail_authenticate3(void) {
+     "authfile="AUTHFILE,
+     "debug"
+   };
+-  return pam_sm_authenticate(3, 0, sizeof(cfg) / sizeof(char*), cfg);
++  return pam_sm_authenticate((pam_handle_t *)3, 0, sizeof(cfg) / sizeof(char*), cfg);
+ }
+ 
+ static int test_firstpass_authenticate(void) {
+@@ -262,7 +266,7 @@ static int test_firstpass_authenticate(void) {
+     "use_first_pass",
+     "debug"
+   };
+-  return pam_sm_authenticate(8, 0, sizeof(cfg) / sizeof(char*), cfg);
++  return pam_sm_authenticate((pam_handle_t *)8, 0, sizeof(cfg) / sizeof(char*), cfg);
+ }
+ 
+ static int test_firstpass_fail(void) {
+@@ -273,7 +277,7 @@ static int test_firstpass_fail(void) {
+     "use_first_pass",
+     "debug"
+   };
+-  return pam_sm_authenticate(9, 0, sizeof(cfg) / sizeof(char*), cfg);
++  return pam_sm_authenticate((pam_handle_t *)9, 0, sizeof(cfg) / sizeof(char*), cfg);
+ }
+ 
+ static int test_firstpass_fail2(void) {
+@@ -284,39 +288,39 @@ static int test_firstpass_fail2(void) {
+     "use_first_pass",
+     "debug"
+   };
+-  return pam_sm_authenticate(10, 0, sizeof(cfg) / sizeof(char*), cfg);
++  return pam_sm_authenticate((pam_handle_t *)10, 0, sizeof(cfg) / sizeof(char*), cfg);
+ }
+ 
+ static int test_authenticate_ldap1(void) {
+-  return pam_sm_authenticate(0, 0, sizeof(ldap_cfg) / sizeof(char*), ldap_cfg);
++  return pam_sm_authenticate((pam_handle_t *)0, 0, sizeof(ldap_cfg) / sizeof(char*), ldap_cfg);
+ }
+ 
+ static int test_authenticate_ldap_fail1(void) {
+-  return pam_sm_authenticate(1, 0, sizeof(ldap_cfg) / sizeof(char*), ldap_cfg);
++  return pam_sm_authenticate((pam_handle_t *)1, 0, sizeof(ldap_cfg) / sizeof(char*), ldap_cfg);
+ }
+ 
+ static int test_authenticate_ldap_fail2(void) {
+-  return pam_sm_authenticate(2, 0, sizeof(ldap_cfg) / sizeof(char*), ldap_cfg);
++  return pam_sm_authenticate((pam_handle_t *)2, 0, sizeof(ldap_cfg) / sizeof(char*), ldap_cfg);
+ }
+ 
+ static int test_authenticate_ldap2(void) {
+-  return pam_sm_authenticate(4, 0, sizeof(ldap_cfg) / sizeof(char*), ldap_cfg);
++  return pam_sm_authenticate((pam_handle_t *)4, 0, sizeof(ldap_cfg) / sizeof(char*), ldap_cfg);
+ }
+ 
+ static int test_authenticate_ldap3(void) {
+-  return pam_sm_authenticate(4, 0, sizeof(ldap_cfg2) / sizeof(char*), ldap_cfg2);
++  return pam_sm_authenticate((pam_handle_t *)4, 0, sizeof(ldap_cfg2) / sizeof(char*), ldap_cfg2);
+ }
+ 
+ static int test_authenticate_ldap4(void) {
+-  return pam_sm_authenticate(5, 0, sizeof(ldap_cfg) / sizeof(char*), ldap_cfg);
++  return pam_sm_authenticate((pam_handle_t *)5, 0, sizeof(ldap_cfg) / sizeof(char*), ldap_cfg);
+ }
+ 
+ static int test_authenticate_ldap5(void) {
+-  return pam_sm_authenticate(6, 0, sizeof(ldap_cfg) / sizeof(char*), ldap_cfg);
++  return pam_sm_authenticate((pam_handle_t *)6, 0, sizeof(ldap_cfg) / sizeof(char*), ldap_cfg);
+ }
+ 
+ static int test_authenticate_ldap6(void) {
+-  return pam_sm_authenticate(7, 0, sizeof(ldap_cfg) / sizeof(char*), ldap_cfg);
++  return pam_sm_authenticate((pam_handle_t *)7, 0, sizeof(ldap_cfg) / sizeof(char*), ldap_cfg);
+ }
+ 
+ static pid_t run_mock(const char *port, const char *type) {

Deleted: 0001-util-make-sure-to-close-the-authfile-before-returnin.patch
===================================================================
--- 0001-util-make-sure-to-close-the-authfile-before-returnin.patch	2020-04-16 14:56:59 UTC (rev 615341)
+++ 0001-util-make-sure-to-close-the-authfile-before-returnin.patch	2020-04-16 14:57:10 UTC (rev 615342)
@@ -1,26 +0,0 @@
-From 0f6ceabab0a8849b47f67d727aa526c2656089ba Mon Sep 17 00:00:00 2001
-From: Klas Lindfors <klas at yubico.com>
-Date: Tue, 3 Apr 2018 09:19:53 +0200
-Subject: [PATCH 1/1] util: make sure to close the authfile before returning
- success
-
-fixes #136
-
-Signed-off-by: Christian Hesse <mail at eworm.de>
----
- util.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/util.c b/util.c
-index 6cb4a79..32bca06 100644
---- a/util.c
-+++ b/util.c
-@@ -167,6 +167,8 @@ check_user_token (const char *authfile,
- 		{
- 		  if(verbose)
- 		      D (debug_file, "Match user/token as %s/%s", username, otp_id);
-+
-+		  fclose(opwfile);
- 		  return AUTH_FOUND;
- 		}
- 	    }

Copied: yubico-pam/repos/community-x86_64/0002-fix_implicit_declaration_warning_of_mkostemp.patch (from rev 615341, yubico-pam/trunk/0002-fix_implicit_declaration_warning_of_mkostemp.patch)
===================================================================
--- 0002-fix_implicit_declaration_warning_of_mkostemp.patch	                        (rev 0)
+++ 0002-fix_implicit_declaration_warning_of_mkostemp.patch	2020-04-16 14:57:10 UTC (rev 615342)
@@ -0,0 +1,24 @@
+From be2fdfdada6d419b4b80de2449e845d323516f72 Mon Sep 17 00:00:00 2001
+From: Tero Paloheimo <tero.paloheimo at iki.fi>
+Date: Tue, 1 Jan 2019 21:53:24 +0200
+Subject: [PATCH] Fix implicit declaration warning of mkostemp
+
+mkostemp() requires the _GNU_SOURCE feature test macro.
+See man 3 mkostemp.
+---
+ pam_yubico.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/pam_yubico.c b/pam_yubico.c
+index 2c6c5d9..1dbad63 100644
+--- a/pam_yubico.c
++++ b/pam_yubico.c
+@@ -28,6 +28,8 @@
+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ 
++#define _GNU_SOURCE
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stdarg.h>

Copied: yubico-pam/repos/community-x86_64/0003-tests-add-a-http-1.1-header-to-the-ykval-mock.patch (from rev 615341, yubico-pam/trunk/0003-tests-add-a-http-1.1-header-to-the-ykval-mock.patch)
===================================================================
--- 0003-tests-add-a-http-1.1-header-to-the-ykval-mock.patch	                        (rev 0)
+++ 0003-tests-add-a-http-1.1-header-to-the-ykval-mock.patch	2020-04-16 14:57:10 UTC (rev 615342)
@@ -0,0 +1,33 @@
+From 7926f8dd41c007cbe19751d4ecfd0618dd937962 Mon Sep 17 00:00:00 2001
+From: Klas Lindfors <klas at yubico.com>
+Date: Thu, 16 Apr 2020 10:59:35 +0200
+Subject: [PATCH 1/1] tests: add a http/1.1 header to the ykval mock
+
+it lies a bit more convincingly like this
+fixes #202
+---
+ tests/aux/ykval.pl | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tests/aux/ykval.pl b/tests/aux/ykval.pl
+index d7f2b1c..60f980d 100755
+--- a/tests/aux/ykval.pl
++++ b/tests/aux/ykval.pl
+@@ -54,7 +54,8 @@ warn "YKVAL mockup started on $port";
+ while(1) {
+   my $clientsocket = $socket->accept();
+   my $clientdata = <$clientsocket>;
+-  my $ret = "h=ZrU7UfjwazJVf5ay1P/oC3XCQlI=\n";
++  my $ret = "HTTP/1.1 200 OK\n\n";
++  $ret .= "h=ZrU7UfjwazJVf5ay1P/oC3XCQlI=\n";
+ 
+   if($clientdata =~ m/nonce=([a-zA-Z0-9]+).*otp=([cbdefghijklnrtuv]+)/) {
+     my $nonce = $1;
+@@ -71,6 +72,6 @@ while(1) {
+   } else {
+     $ret .= "status=MISSING_PARAMETER";
+   }
+-  print $clientsocket "\n$ret\n";
++  print $clientsocket "$ret\n";
+   close $clientsocket;
+ }

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-04-16 14:56:59 UTC (rev 615341)
+++ PKGBUILD	2020-04-16 14:57:10 UTC (rev 615342)
@@ -1,42 +0,0 @@
-# $Id$
-# Maintainer: Christian Hesse <mail at eworm.de>
-
-pkgname=yubico-pam
-_shortname=pam_yubico
-pkgver=2.26
-pkgrel=1
-pkgdesc='Yubico YubiKey PAM module'
-arch=('x86_64')
-url='https://github.com/Yubico/yubico-pam'
-license=('BSD')
-depends=('pam' 'yubico-c-client' 'yubikey-personalization' 'json-c')
-checkdepends=('perl-net-ldap-server')
-provides=("${_shortname}")
-conflicts=("${_shortname}")
-validpgpkeys=('0A3B0262BCA1705307D5FF06BCA00FD4B2168C0A') # Klas Lindfors <klas at yubico.com>
-source=("https://developers.yubico.com/${pkgname}/Releases/${_shortname}-${pkgver}.tar.gz"{,.sig})
-sha256sums=('2de96495963fefd72b98243952ca5d5ec513e702c596e54bc667ef6b5e252966'
-            'SKIP')
-
-build() {
-	cd "${_shortname}-${pkgver}"
-
-	./configure \
-		--prefix=/usr
-	make
-}
-
-check() {
-	cd "${_shortname}-${pkgver}"
-
-	make check
-}
-
-package() {
-	cd "${_shortname}-${pkgver}"
-
-	install -D -m0644 COPYING "${pkgdir}/usr/share/licenses/yubico-pam/COPYING"
-	install -D -m0644 README "${pkgdir}/usr/share/doc/yubico-pam/README"
-	make DESTDIR="${pkgdir}/" install
-}
-

Copied: yubico-pam/repos/community-x86_64/PKGBUILD (from rev 615341, yubico-pam/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-04-16 14:57:10 UTC (rev 615342)
@@ -0,0 +1,55 @@
+# Maintainer: Christian Hesse <mail at eworm.de>
+
+pkgname=yubico-pam
+_shortname=pam_yubico
+pkgver=2.26
+pkgrel=2
+pkgdesc='Yubico YubiKey PAM module'
+arch=('x86_64')
+url='https://github.com/Yubico/yubico-pam'
+license=('BSD')
+depends=('pam' 'yubico-c-client' 'yubikey-personalization' 'json-c')
+checkdepends=('perl-net-ldap-server')
+provides=("${_shortname}")
+conflicts=("${_shortname}")
+validpgpkeys=('0A3B0262BCA1705307D5FF06BCA00FD4B2168C0A') # Klas Lindfors <klas at yubico.com>
+source=("https://developers.yubico.com/${pkgname}/Releases/${_shortname}-${pkgver}.tar.gz"{,.sig}
+        '0001-fix_compiler_warning_in_pam_test_c.patch'
+        '0002-fix_implicit_declaration_warning_of_mkostemp.patch'
+        '0003-tests-add-a-http-1.1-header-to-the-ykval-mock.patch')
+sha256sums=('2de96495963fefd72b98243952ca5d5ec513e702c596e54bc667ef6b5e252966'
+            'SKIP'
+            '151f57fcb7df2661a16f2ef840f805067a84b746b8683177e1a52581e7ffc19b'
+            'eacbe45d4580e4987ebb4d8e3f13e5df26be974d43731d811c858234ba4363d0'
+            '8773e6d5ca76cb46b6f1e7d37123f8116f6062b5ba3e537a140f20afcb205c31')
+
+prepare() {
+	cd "${_shortname}-${pkgver}"
+
+	patch -Np1 < ../0001-fix_compiler_warning_in_pam_test_c.patch
+	patch -Np1 < ../0002-fix_implicit_declaration_warning_of_mkostemp.patch
+	patch -Np1 < ../0003-tests-add-a-http-1.1-header-to-the-ykval-mock.patch
+}
+
+build() {
+	cd "${_shortname}-${pkgver}"
+
+	./configure \
+		--prefix=/usr
+	make
+}
+
+check() {
+	cd "${_shortname}-${pkgver}"
+
+	make check
+}
+
+package() {
+	cd "${_shortname}-${pkgver}"
+
+	install -D -m0644 COPYING "${pkgdir}/usr/share/licenses/yubico-pam/COPYING"
+	install -D -m0644 README "${pkgdir}/usr/share/doc/yubico-pam/README"
+	make DESTDIR="${pkgdir}/" install
+}
+



More information about the arch-commits mailing list