From bbb3a9fd5f407d07c64dd13d9ae858d69e63c5428651c0303311505e450be24f Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Fri, 27 May 2022 07:10:38 +0000 Subject: [PATCH] Accepting request 979388 from home:marxin:branches:network - Add ppp-compiling-with-clang-encounters-an-error-in-eap-tls..patch that fixed the following rpmlint error: executable-stack (Badness: 10000) /usr/sbin/pppd OBS-URL: https://build.opensuse.org/request/show/979388 OBS-URL: https://build.opensuse.org/package/show/network/ppp?expand=0&rev=71 --- ...lang-encounters-an-error-in-eap-tls..patch | 54 +++++++++++++++++++ ppp.changes | 7 +++ ppp.spec | 3 ++ 3 files changed, 64 insertions(+) create mode 100644 ppp-compiling-with-clang-encounters-an-error-in-eap-tls..patch diff --git a/ppp-compiling-with-clang-encounters-an-error-in-eap-tls..patch b/ppp-compiling-with-clang-encounters-an-error-in-eap-tls..patch new file mode 100644 index 0000000..fc39d6b --- /dev/null +++ b/ppp-compiling-with-clang-encounters-an-error-in-eap-tls..patch @@ -0,0 +1,54 @@ +diff --git a/pppd/eap-tls.c b/pppd/eap-tls.c +index 5740f30..46a4d5b 100644 +--- a/pppd/eap-tls.c ++++ b/pppd/eap-tls.c +@@ -280,6 +280,23 @@ ENGINE *eaptls_ssl_load_engine( char *engine_name ) + + + ++#ifndef OPENSSL_NO_ENGINE ++static int eaptls_UI_writer(UI *ui, UI_STRING *uis) ++{ ++ PW_CB_DATA* cb_data = (PW_CB_DATA*)UI_get0_user_data(ui); ++ UI_set_result(ui, uis, cb_data->password); ++ return 1; ++} ++ ++static int eaptls_UI_stub(UI* ui) { ++ return 1; ++} ++ ++static int eaptls_UI_reader(UI *ui, UI_STRING *uis) { ++ return 1; ++} ++#endif ++ + /* + * Initialize the SSL stacks and tests if certificates, key and crl + * for client or server use can be loaded. +@@ -516,20 +533,11 @@ SSL_CTX *eaptls_init_ssl(int init_server, char *cacertfile, char *capath, + { + UI_METHOD* transfer_pin = UI_create_method("transfer_pin"); + +- int writer (UI *ui, UI_STRING *uis) +- { +- PW_CB_DATA* cb_data = (PW_CB_DATA*)UI_get0_user_data(ui); +- UI_set_result(ui, uis, cb_data->password); +- return 1; +- }; +- int stub (UI* ui) {return 1;}; +- int stub_reader (UI *ui, UI_STRING *uis) {return 1;}; +- +- UI_method_set_writer(transfer_pin, writer); +- UI_method_set_opener(transfer_pin, stub); +- UI_method_set_closer(transfer_pin, stub); +- UI_method_set_flusher(transfer_pin, stub); +- UI_method_set_reader(transfer_pin, stub_reader); ++ UI_method_set_writer(transfer_pin, eaptls_UI_writer); ++ UI_method_set_opener(transfer_pin, eaptls_UI_stub); ++ UI_method_set_closer(transfer_pin, eaptls_UI_stub); ++ UI_method_set_flusher(transfer_pin, eaptls_UI_stub); ++ UI_method_set_reader(transfer_pin, eaptls_UI_reader); + + dbglog( "Using our private key '%s' in engine", pkey_identifier ); + pkey = ENGINE_load_private_key(pkey_engine, pkey_identifier, transfer_pin, &cb_data); diff --git a/ppp.changes b/ppp.changes index a5110e3..70628a3 100644 --- a/ppp.changes +++ b/ppp.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu May 26 18:43:35 UTC 2022 - Martin Liška + +- Add ppp-compiling-with-clang-encounters-an-error-in-eap-tls..patch + that fixed the following rpmlint error: + executable-stack (Badness: 10000) /usr/sbin/pppd + ------------------------------------------------------------------- Mon May 23 14:07:58 UTC 2022 - Ferdinand Thiessen diff --git a/ppp.spec b/ppp.spec index 81c478b..a949e98 100644 --- a/ppp.spec +++ b/ppp.spec @@ -62,6 +62,8 @@ Patch4: ppp-fix-bashisms.patch Patch5: ppp-fork-fix.patch # misc tiny stuff Patch6: ppp-misc.patch +# PATCH-FIX-UPSTREAM ppp-fork-fix.patch -- fix E: executable-stack (Badness: 10000) /usr/sbin/pppd +Patch7: ppp-compiling-with-clang-encounters-an-error-in-eap-tls..patch # Of cause any other compatible libc would work, like musl, but 2.24 required for SOL_NETLINK BuildRequires: glibc-devel >= 2.24 BuildRequires: libpcap-devel @@ -114,6 +116,7 @@ you can disable unnecessary or disable everything. %patch4 -p1 %patch5 %patch6 +%patch7 -p1 %if "%{_lib}" == "lib64" %patch2 -p1