Message ID | 20220518211200.431651-1-fontaine.fabrice@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/1] package/openvpn: fix pam build with musl and libressl | expand |
On 18/05/2022 23:12, Fabrice Fontaine wrote: > Fix the following musl build failure raised with pam and libressl: > > auth-pam.c: In function 'pam_server': > auth-pam.c:894:23: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'AF_MAX'? > 894 | char ac_file_name[PATH_MAX]; > | ^~~~~~~~ > | AF_MAX > auth-pam.c:894:23: note: each undeclared identifier is reported only once for each function it appears in > auth-pam.c:894:10: warning: unused variable 'ac_file_name' [-Wunused-variable] > 894 | char ac_file_name[PATH_MAX]; > | ^~~~~~~~~~~~ > > Fixes: > - http://autobuild.buildroot.org/results/c8834fa5ddcac6fd22fc9406e10221e64cdb8856 > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Applied to master, thanks. Regards, Arnout > --- > ...h-pam-c-add-missing-include-limits-h.patch | 41 +++++++++++++++++++ > 1 file changed, 41 insertions(+) > create mode 100644 package/openvpn/0001-auth-pam-c-add-missing-include-limits-h.patch > > diff --git a/package/openvpn/0001-auth-pam-c-add-missing-include-limits-h.patch b/package/openvpn/0001-auth-pam-c-add-missing-include-limits-h.patch > new file mode 100644 > index 0000000000..34a6dbd034 > --- /dev/null > +++ b/package/openvpn/0001-auth-pam-c-add-missing-include-limits-h.patch > @@ -0,0 +1,41 @@ > +From 0fed64a91d894b46105bf7e8b16edea4d90ab70c Mon Sep 17 00:00:00 2001 > +From: Antonio Quartulli <a@unstable.cc> > +Date: Thu, 21 Apr 2022 15:19:09 +0200 > +Subject: [PATCH] auth-pam.c: add missing include limits.h > + > +On most systems limits.h is pulled in by some other header and thus no > +error is ever triggered, but it's possible to find the right environment > +which lackis this and prevents compiling auth-pam.c (possibly when using > +LibreSSL). > + > +Include the header explicitly as it includes the definition of PATH_MAX. > + > +(note that this bug is fixed in Gentoo since 2020 by including a custom > +patch, but apparently the issue was never reported upstream) > + > +Reported-by: Michelangelo Scopelliti <kernelpanic@gmx.com> > +Signed-off-by: Antonio Quartulli <a@unstable.cc> > +Acked-by: Gert Doering <gert@greenie.muc.de> > +Message-Id: <20220421131909.32053-1-a@unstable.cc> > +URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24136.html > +Signed-off-by: Gert Doering <gert@greenie.muc.de> > + > +[Retrieved from: > +https://github.com/OpenVPN/openvpn/commit/0fed64a91d894b46105bf7e8b16edea4d90ab70c] > +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > +--- > + src/plugins/auth-pam/auth-pam.c | 1 + > + 1 file changed, 1 insertion(+) > + > +diff --git a/src/plugins/auth-pam/auth-pam.c b/src/plugins/auth-pam/auth-pam.c > +index f893b51fe3..7033944568 100644 > +--- a/src/plugins/auth-pam/auth-pam.c > ++++ b/src/plugins/auth-pam/auth-pam.c > +@@ -47,6 +47,7 @@ > + #include <fcntl.h> > + #include <signal.h> > + #include <syslog.h> > ++#include <limits.h> > + #include "utils.h" > + > + #include <openvpn-plugin.h>
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes: > Fix the following musl build failure raised with pam and libressl: > auth-pam.c: In function 'pam_server': > auth-pam.c:894:23: error: 'PATH_MAX' undeclared (first use in this > function); did you mean 'AF_MAX'? > 894 | char ac_file_name[PATH_MAX]; > | ^~~~~~~~ > | AF_MAX > auth-pam.c:894:23: note: each undeclared identifier is reported only > once for each function it appears in > auth-pam.c:894:10: warning: unused variable 'ac_file_name' [-Wunused-variable] > 894 | char ac_file_name[PATH_MAX]; > | ^~~~~~~~~~~~ > Fixes: > - http://autobuild.buildroot.org/results/c8834fa5ddcac6fd22fc9406e10221e64cdb8856 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Committed to 2022.02.x, thanks.
diff --git a/package/openvpn/0001-auth-pam-c-add-missing-include-limits-h.patch b/package/openvpn/0001-auth-pam-c-add-missing-include-limits-h.patch new file mode 100644 index 0000000000..34a6dbd034 --- /dev/null +++ b/package/openvpn/0001-auth-pam-c-add-missing-include-limits-h.patch @@ -0,0 +1,41 @@ +From 0fed64a91d894b46105bf7e8b16edea4d90ab70c Mon Sep 17 00:00:00 2001 +From: Antonio Quartulli <a@unstable.cc> +Date: Thu, 21 Apr 2022 15:19:09 +0200 +Subject: [PATCH] auth-pam.c: add missing include limits.h + +On most systems limits.h is pulled in by some other header and thus no +error is ever triggered, but it's possible to find the right environment +which lackis this and prevents compiling auth-pam.c (possibly when using +LibreSSL). + +Include the header explicitly as it includes the definition of PATH_MAX. + +(note that this bug is fixed in Gentoo since 2020 by including a custom +patch, but apparently the issue was never reported upstream) + +Reported-by: Michelangelo Scopelliti <kernelpanic@gmx.com> +Signed-off-by: Antonio Quartulli <a@unstable.cc> +Acked-by: Gert Doering <gert@greenie.muc.de> +Message-Id: <20220421131909.32053-1-a@unstable.cc> +URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24136.html +Signed-off-by: Gert Doering <gert@greenie.muc.de> + +[Retrieved from: +https://github.com/OpenVPN/openvpn/commit/0fed64a91d894b46105bf7e8b16edea4d90ab70c] +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> +--- + src/plugins/auth-pam/auth-pam.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/plugins/auth-pam/auth-pam.c b/src/plugins/auth-pam/auth-pam.c +index f893b51fe3..7033944568 100644 +--- a/src/plugins/auth-pam/auth-pam.c ++++ b/src/plugins/auth-pam/auth-pam.c +@@ -47,6 +47,7 @@ + #include <fcntl.h> + #include <signal.h> + #include <syslog.h> ++#include <limits.h> + #include "utils.h" + + #include <openvpn-plugin.h>
Fix the following musl build failure raised with pam and libressl: auth-pam.c: In function 'pam_server': auth-pam.c:894:23: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'AF_MAX'? 894 | char ac_file_name[PATH_MAX]; | ^~~~~~~~ | AF_MAX auth-pam.c:894:23: note: each undeclared identifier is reported only once for each function it appears in auth-pam.c:894:10: warning: unused variable 'ac_file_name' [-Wunused-variable] 894 | char ac_file_name[PATH_MAX]; | ^~~~~~~~~~~~ Fixes: - http://autobuild.buildroot.org/results/c8834fa5ddcac6fd22fc9406e10221e64cdb8856 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> --- ...h-pam-c-add-missing-include-limits-h.patch | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 package/openvpn/0001-auth-pam-c-add-missing-include-limits-h.patch