linux-pam: install login.pam from here
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Tue, 29 Mar 2016 00:39:56 +0000 (21:39 -0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 29 Mar 2016 00:46:31 +0000 (02:46 +0200)
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.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/linux-pam/linux-pam.mk
package/linux-pam/login.pam [new file with mode: 0644]
package/util-linux/login.pam [deleted file]
package/util-linux/util-linux.mk

index cf1b5b7b11da55b5d63c3f2ce6a438a3a28e6e91..71c5490c7c8cc595bbbe63fff365772064e8d29a 100644 (file)
@@ -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
diff --git a/package/linux-pam/login.pam b/package/linux-pam/login.pam
new file mode 100644 (file)
index 0000000..01f5632
--- /dev/null
@@ -0,0 +1,10 @@
+auth           required        pam_unix.so nullok
+
+account                required        pam_unix.so
+
+password       required        pam_unix.so nullok
+
+session                required        pam_limits.so
+session                required        pam_env.so
+session                required        pam_unix.so
+session                optional        pam_lastlog.so
diff --git a/package/util-linux/login.pam b/package/util-linux/login.pam
deleted file mode 100644 (file)
index 01f5632..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-auth           required        pam_unix.so nullok
-
-account                required        pam_unix.so
-
-password       required        pam_unix.so nullok
-
-session                required        pam_limits.so
-session                required        pam_env.so
-session                required        pam_unix.so
-session                optional        pam_lastlog.so
index 141dffdcd0b7a69ae4f80eda6d3304e2bc80fe3c..a055d177c5167ab1f90d2c49b28cb9939dd0ad51 100644 (file)
@@ -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 \