Skip to contentSkip to conversation

linux-pam: install login.pam from here

PATCH New Gustavo Zacarias 2 participants 2 messages Mar 29, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-pam: install login.pam from here

Instead of installing login.pam (/etc/pam.d/login) from util-linux conditionally do so unconditionally from linux-pam.
If busybox login is pam-enabled (linux-pam package enabled) it will be required, otherwise it will lead to a system where login won't work, and if util-linux is enabled it will supercede busybox login and will be necesarry regardless.

---
 package/linux-pam/linux-pam.mk              | 4 +++-
 package/{util-linux => linux-pam}/login.pam | 0
 package/util-linux/util-linux.mk            | 2 --
 3 files changed, 3 insertions(+), 3 deletions(-)
 rename package/{util-linux => linux-pam}/login.pam (100%)
package/linux-pam/linux-pam.mk +3 -1
index cf1b5b7..71c5490 100644
@@ -26,8 +26,10 @@ LINUX_PAM_DEPENDENCIES += gettext
 LINUX_PAM_MAKE_OPTS += LIBS=-lintl
 endif
 
-# Install default pam config (deny everything)
+# Install default pam config (deny everything except login)
 define LINUX_PAM_INSTALL_CONFIG
+	$(INSTALL) -m 0644 -D package/linux-pam/login.pam \
+		$(TARGET_DIR)/etc/pam.d/login
 	$(INSTALL) -m 0644 -D package/linux-pam/other.pam \
 		$(TARGET_DIR)/etc/pam.d/other
 endef
package/linux-pam/login.pam renamed from package/util-linux/login.pam +0 -0
similarity index 100%
rename from package/util-linux/login.pam
rename to package/linux-pam/login.pam
package/util-linux/util-linux.mk +0 -2
index 141dffd..a055d17 100644
@@ -153,8 +153,6 @@ endif
 # Install PAM configuration files
 ifeq ($(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),y)
 define UTIL_LINUX_INSTALL_PAMFILES
-	$(INSTALL) -m 0644 package/util-linux/login.pam \
-		$(TARGET_DIR)/etc/pam.d/login
 	$(INSTALL) -m 0644 package/util-linux/su.pam \
 		$(TARGET_DIR)/etc/pam.d/su
 	$(INSTALL) -m 0644 package/util-linux/su.pam \
Signature · 1 line
2.7.3
#1 lore raw

PATCH 1/1 linux-pam: install login.pam from here

Hello,

Quoted 7 lines · Gustavo Zacarias

Instead of installing login.pam (/etc/pam.d/login) from util-linux conditionally do so unconditionally from linux-pam.
If busybox login is pam-enabled (linux-pam package enabled) it will be required, otherwise it will lead to a system where login won't work, and if util-linux is enabled it will supercede busybox login and will be necesarry regardless.

Quoted 7 lines
---
 package/linux-pam/linux-pam.mk              | 4 +++-
 package/{util-linux => linux-pam}/login.pam | 0
 package/util-linux/util-linux.mk            | 2 --
 3 files changed, 3 insertions(+), 3 deletions(-)
 rename package/{util-linux => linux-pam}/login.pam (100%)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com