Skip to contentSkip to conversation

shadow: Remove lastlog pam plugin on musl system

PATCH New Khem Raj 1 participant 4 messages Jan 2, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/4 shadow: Remove lastlog pam plugin on musl system

lastlog needs logwtmp which musl does not provide

---
 meta/recipes-extended/shadow/shadow.inc | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-extended/shadow/shadow.inc +2 -0
index f86e5e03c0..4ae7a78c52 100644
@@ -71,6 +71,8 @@ PAM_PLUGINS = "libpam-runtime \
                pam-plugin-shells \
                pam-plugin-rootok"
 
+PAM_PLUGINS_remove_libc-musl = "pam-plugin-lastlog"
+
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
 PACKAGECONFIG_class-native ??= "${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
Signature · 1 line
2.30.0
author
#1 lore raw

PATCH 2/4 rxvt-unicode: Disable lastlog on musl systems

it needs logwtmp implementation which is not there in musl

---
 meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc +1 -1
index b064a63caa..1855232973 100644
@@ -30,7 +30,7 @@ EXTRA_OECONF = "--enable-xim \
 		--enable-combining --disable-perl \
 		--with-x=${STAGING_DIR_HOST}${prefix}"
 
-EXTRA_OECONF_append_libc-musl = " --disable-wtmp"
+EXTRA_OECONF_append_libc-musl = " --disable-wtmp --disable-lastlog"
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[startup] = "--enable-startup-notification,--disable-startup-notification,startup-notification,"
Signature · 1 line
2.30.0
author
#2 lore raw

PATCH 3/4 openssh: Disable lastlog on musl

In reply to Khem Raj
---
 meta/recipes-connectivity/openssh/openssh_8.4p1.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-connectivity/openssh/openssh_8.4p1.bb +2 -2
index 676a8a6533..688fc8a024 100644
@@ -67,8 +67,8 @@ EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
                 --disable-strip \
                 "
 
-# musl doesn't implement wtmp/utmp
-EXTRA_OECONF_append_libc-musl = " --disable-wtmp"
+# musl doesn't implement wtmp/utmp and logwtmp
+EXTRA_OECONF_append_libc-musl = " --disable-wtmp --disable-lastlog"
 
 # Since we do not depend on libbsd, we do not want configure to use it
 # just because it finds libutil.h.  But, specifying --disable-libutil
Signature · 1 line
2.30.0
author
#3 lore raw

PATCH 4/4 dropbear: Disable lastlog and wtmp on musl

In reply to Khem Raj

Not provided by musl library

---
 meta/recipes-core/dropbear/dropbear.inc | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-core/dropbear/dropbear.inc +3 -0
index 080ee26b2e..a30f98faa4 100644
@@ -58,6 +58,9 @@ EXTRA_OECONF += "\
 # This is causing [textrel] QA warning
 EXTRA_OECONF += "--disable-harden"
 
+# musl does not implement wtmp/logwtmp APIs
+EXTRA_OECONF_append_libc-musl = " --disable-wtmp --disable-lastlog"
+
 do_install() {
 	install -d ${D}${sysconfdir} \
 		${D}${sysconfdir}/init.d \
Signature · 1 line
2.30.0