Date: Friday, April 9, 2021 @ 20:32:56 Author: foxboron Revision: 915298
upgpkg: yubico-pam 2.27-1 Deleted: yubico-pam/trunk/0001-fix_compiler_warning_in_pam_test_c.patch yubico-pam/trunk/0002-fix_implicit_declaration_warning_of_mkostemp.patch yubico-pam/trunk/0003-tests-add-a-http-1.1-header-to-the-ykval-mock.patch ----------------------------------------------------------+ 0001-fix_compiler_warning_in_pam_test_c.patch | 171 ------------- 0002-fix_implicit_declaration_warning_of_mkostemp.patch | 24 - 0003-tests-add-a-http-1.1-header-to-the-ykval-mock.patch | 33 -- 3 files changed, 228 deletions(-) Deleted: 0001-fix_compiler_warning_in_pam_test_c.patch =================================================================== --- 0001-fix_compiler_warning_in_pam_test_c.patch 2021-04-09 20:32:10 UTC (rev 915297) +++ 0001-fix_compiler_warning_in_pam_test_c.patch 2021-04-09 20:32:56 UTC (rev 915298) @@ -1,171 +0,0 @@ -From 9341f3477ad24cded99ada8dd48b6010293fa112 Mon Sep 17 00:00:00 2001 -From: Tero Paloheimo <[email protected]> -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: 0002-fix_implicit_declaration_warning_of_mkostemp.patch =================================================================== --- 0002-fix_implicit_declaration_warning_of_mkostemp.patch 2021-04-09 20:32:10 UTC (rev 915297) +++ 0002-fix_implicit_declaration_warning_of_mkostemp.patch 2021-04-09 20:32:56 UTC (rev 915298) @@ -1,24 +0,0 @@ -From be2fdfdada6d419b4b80de2449e845d323516f72 Mon Sep 17 00:00:00 2001 -From: Tero Paloheimo <[email protected]> -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> Deleted: 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 2021-04-09 20:32:10 UTC (rev 915297) +++ 0003-tests-add-a-http-1.1-header-to-the-ykval-mock.patch 2021-04-09 20:32:56 UTC (rev 915298) @@ -1,33 +0,0 @@ -From 7926f8dd41c007cbe19751d4ecfd0618dd937962 Mon Sep 17 00:00:00 2001 -From: Klas Lindfors <[email protected]> -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; - }
