]> git.ipfire.org Git - thirdparty/openwrt.git/commit
busybox: fix login applet on selinux 19542/head
authorPetr Štetiar <ynezz@true.cz>
Mon, 9 Jun 2025 15:44:44 +0000 (15:44 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 27 Jul 2025 17:42:04 +0000 (19:42 +0200)
commitbfed41cc6a8bd641bc1280730118dc83af913a17
treec128c7ba8ebcb88e85bc0a3430f1ea786b6a7791
parent254f6b241426e1fda72a844752e7f3979ef31626
busybox: fix login applet on selinux

Currently the system boots up, but is unusable because pressing enter
does not provide login with error:

  login: can't get SID for root

This is happenning, because login.c passes the Linux username directly
to get_default_context(), while libselinux expects an SELinux user
identity, causing the call to fail for users without a matching SELinux
name (e.g., root) and aborting login on SELinux-enabled systems.

Fixes: #19075
Upstream-Status: Submitted [https://lists.busybox.net/pipermail/busybox/2025-April/091407.html]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Link: https://github.com/openwrt/openwrt/pull/19080
(cherry picked from commit 5809bfaaacca1d10c2e77bd073065d1d3b77527e)
Link: https://github.com/openwrt/openwrt/pull/19542
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/utils/busybox/patches/600-loginutils-login.c-libselinux-get_default_context-ex.patch [new file with mode: 0644]