Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/linux-pam: fix musl build
@ 2023-07-30  7:14 Bernd Kuhls
  2023-07-30 10:12 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 4+ messages in thread
From: Bernd Kuhls @ 2023-07-30  7:14 UTC (permalink / raw)
  To: buildroot

The bump to version 1.5.3 with buildroot commit
f8147e27cdac8f998ec6644a09ce4e8d62b6433c added the file patched.

Please note that the next version will include
https://github.com/linux-pam/linux-pam/commit/5fa961fd3b5b8cf5ba1a0cf49b10ebf79e273e96
which adds --enable-examples as configure option to disable examples.
This patch, although it would also fix the problem, is not added instead
to avoid autoreconf.

Fixes:
http://autobuild.buildroot.net/results/1d9/1d96d4c57969536c14340ae5542e62a9459246f9/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 ...-examples-tty_conv-fix-build-on-musl.patch | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 package/linux-pam/0001-examples-tty_conv-fix-build-on-musl.patch

diff --git a/package/linux-pam/0001-examples-tty_conv-fix-build-on-musl.patch b/package/linux-pam/0001-examples-tty_conv-fix-build-on-musl.patch
new file mode 100644
index 0000000000..c1257d64da
--- /dev/null
+++ b/package/linux-pam/0001-examples-tty_conv-fix-build-on-musl.patch
@@ -0,0 +1,40 @@
+From 5374f677e4cae669eb9accf2449178b602e8a40a Mon Sep 17 00:00:00 2001
+From: Violet Purcell <vimproved@inventati.org>
+Date: Thu, 11 May 2023 12:50:34 -0400
+Subject: [PATCH] examples/tty_conv: fix build on musl
+
+termio.h is the old System V version of the interface header, and is
+only provided in glibc and dietlibc as far as I can tell.
+This fixes it to use the POSIX termios.h instead.
+
+Upstream: https://github.com/linux-pam/linux-pam/commit/5374f677e4cae669eb9accf2449178b602e8a40a
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ examples/tty_conv.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/examples/tty_conv.c b/examples/tty_conv.c
+index 23f0684cc..9a0e1ad99 100644
+--- a/examples/tty_conv.c
++++ b/examples/tty_conv.c
+@@ -6,8 +6,9 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <unistd.h>
+-#include <termio.h>
++#include <termios.h>
+ #include <security/pam_appl.h>
++#include <sys/ioctl.h>
+ 
+ /***************************************
+  * @brief echo off/on
+@@ -16,7 +17,7 @@
+  ***************************************/
+ static void echoOff(int fd, int off)
+ {
+-    struct termio tty;
++    struct termios tty;
+     if (ioctl(fd, TCGETA, &tty) < 0)
+     {
+         fprintf(stderr, "TCGETA failed: %s\n", strerror(errno));
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/linux-pam: fix musl build
  2023-07-30  7:14 Bernd Kuhls
@ 2023-07-30 10:12 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-30 10:12 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: buildroot

On Sun, 30 Jul 2023 09:14:22 +0200
Bernd Kuhls <bernd@kuhls.net> wrote:

> The bump to version 1.5.3 with buildroot commit
> f8147e27cdac8f998ec6644a09ce4e8d62b6433c added the file patched.
> 
> Please note that the next version will include
> https://github.com/linux-pam/linux-pam/commit/5fa961fd3b5b8cf5ba1a0cf49b10ebf79e273e96
> which adds --enable-examples as configure option to disable examples.
> This patch, although it would also fix the problem, is not added instead
> to avoid autoreconf.
> 
> Fixes:
> http://autobuild.buildroot.net/results/1d9/1d96d4c57969536c14340ae5542e62a9459246f9/
> 
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
> ---
>  ...-examples-tty_conv-fix-build-on-musl.patch | 40 +++++++++++++++++++
>  1 file changed, 40 insertions(+)
>  create mode 100644 package/linux-pam/0001-examples-tty_conv-fix-build-on-musl.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] package/linux-pam: fix musl build
@ 2024-02-06 18:03 Fabrice Fontaine
  2024-02-06 23:01 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Fontaine @ 2024-02-06 18:03 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Fix the following musl build failure raised since bump to version 1.6.0
in commit 7794fa4c4e1d19a245bb0367cde94560432a2bc5:

pam_namespace.c: In function 'process_line':
pam_namespace.c:649:41: error: 'SIZE_MAX' undeclared (first use in this function)
  649 |         if (count > UINT_MAX || count > SIZE_MAX / sizeof(uid_t)) {
      |                                         ^~~~~~~~
pam_namespace.c:41:1: note: 'SIZE_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?
   40 | #include "argv_parse.h"
  +++ |+#include <stdint.h>
   41 |

Fixes:
 - http://autobuild.buildroot.org/results/f07360f33010a2cf19aace266faae14a834bd9a4

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../0001-pam_namespace-include-stdint-h.patch | 42 +++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 package/linux-pam/0001-pam_namespace-include-stdint-h.patch

diff --git a/package/linux-pam/0001-pam_namespace-include-stdint-h.patch b/package/linux-pam/0001-pam_namespace-include-stdint-h.patch
new file mode 100644
index 0000000000..59d2e8700f
--- /dev/null
+++ b/package/linux-pam/0001-pam_namespace-include-stdint-h.patch
@@ -0,0 +1,42 @@
+From cc9d40b7cdbd3e15ccaa324a0dda1680ef9dea13 Mon Sep 17 00:00:00 2001
+From: Jacob Heider <jacob@pkgx.dev>
+Date: Wed, 17 Jan 2024 11:49:26 -0500
+Subject: [PATCH] pam_namespace: include stdint.h
+
+pam_namespace.c makes use of SIZE_MAX but doesn't include stdint.h,
+resulting in the following build failures on 1.6.0:
+
+  pam_namespace.c: In function 'process_line':
+  pam_namespace.c:649:41: error: 'SIZE_MAX' undeclared (first use in this function)
+    649 |         if (count > UINT_MAX || count > SIZE_MAX / sizeof(uid_t)) {
+        |                                         ^~~~~~~~
+  pam_namespace.c:41:1: note: 'SIZE_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?
+     40 | #include "argv_parse.h"
+    +++ |+#include <stdint.h>
+     41 |
+  pam_namespace.c:649:41: note: each undeclared identifier is reported only once for each function it appears in
+    649 |         if (count > UINT_MAX || count > SIZE_MAX / sizeof(uid_t)) {
+        |                                         ^~~~~~~~
+
+Fixes: v1.6.0~100 ("pam_namespace: validate amount of uids in config")
+Resolves: https://github.com/linux-pam/linux-pam/issues/733
+
+Upstream: https://github.com/linux-pam/linux-pam/commit/cc9d40b7cdbd3e15ccaa324a0dda1680ef9dea13
+SIgned-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ modules/pam_namespace/pam_namespace.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/modules/pam_namespace/pam_namespace.c b/modules/pam_namespace/pam_namespace.c
+index f72d67189..b16731c22 100644
+--- a/modules/pam_namespace/pam_namespace.c
++++ b/modules/pam_namespace/pam_namespace.c
+@@ -34,6 +34,8 @@
+ 
+ #define _ATFILE_SOURCE
+ 
++#include "config.h"
++#include <stdint.h>
+ #include "pam_cc_compat.h"
+ #include "pam_inline.h"
+ #include "pam_namespace.h"
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/linux-pam: fix musl build
  2024-02-06 18:03 [Buildroot] [PATCH 1/1] package/linux-pam: fix musl build Fabrice Fontaine
@ 2024-02-06 23:01 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-02-06 23:01 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: buildroot

On Tue,  6 Feb 2024 19:03:41 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Fix the following musl build failure raised since bump to version 1.6.0
> in commit 7794fa4c4e1d19a245bb0367cde94560432a2bc5:
> 
> pam_namespace.c: In function 'process_line':
> pam_namespace.c:649:41: error: 'SIZE_MAX' undeclared (first use in this function)
>   649 |         if (count > UINT_MAX || count > SIZE_MAX / sizeof(uid_t)) {
>       |                                         ^~~~~~~~
> pam_namespace.c:41:1: note: 'SIZE_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?
>    40 | #include "argv_parse.h"
>   +++ |+#include <stdint.h>
>    41 |
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/f07360f33010a2cf19aace266faae14a834bd9a4
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  .../0001-pam_namespace-include-stdint-h.patch | 42 +++++++++++++++++++
>  1 file changed, 42 insertions(+)
>  create mode 100644 package/linux-pam/0001-pam_namespace-include-stdint-h.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-06 23:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-06 18:03 [Buildroot] [PATCH 1/1] package/linux-pam: fix musl build Fabrice Fontaine
2024-02-06 23:01 ` Thomas Petazzoni via buildroot
  -- strict thread matches above, loose matches on Subject: below --
2023-07-30  7:14 Bernd Kuhls
2023-07-30 10:12 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox