Initial Commit
- initial default booting image
This commit is contained in:
27
package/linux-pam/Config.in
Normal file
27
package/linux-pam/Config.in
Normal file
@@ -0,0 +1,27 @@
|
||||
config BR2_PACKAGE_LINUX_PAM
|
||||
bool "linux-pam"
|
||||
depends on BR2_ENABLE_LOCALE
|
||||
depends on BR2_USE_WCHAR
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h
|
||||
select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
|
||||
help
|
||||
A Security Framework that Provides Authentication for
|
||||
Applications
|
||||
|
||||
http://linux-pam.org
|
||||
|
||||
if BR2_PACKAGE_LINUX_PAM
|
||||
|
||||
config BR2_PACKAGE_LINUX_PAM_LASTLOG
|
||||
bool "pam_lastlog.so"
|
||||
help
|
||||
Build pam_lastlog.so module.
|
||||
|
||||
endif
|
||||
|
||||
comment "linux-pam needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_ENABLE_LOCALE || !BR2_USE_WCHAR \
|
||||
|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
6
package/linux-pam/linux-pam.hash
Normal file
6
package/linux-pam/linux-pam.hash
Normal file
@@ -0,0 +1,6 @@
|
||||
# Locally computed hashes after checking signature at
|
||||
# https://github.com/linux-pam/linux-pam/releases/download/v1.7.2/Linux-PAM-1.7.2.tar.xz.asc
|
||||
# signed with the key 7BECFE3AF7B280BB52FF77F104BA4521C996DDE1
|
||||
sha256 3d86b6383fb5fd9eb9578d2cd47d92801191f4bf3f9bc61419bfefc8aa1e531a Linux-PAM-1.7.2.tar.xz
|
||||
# Locally computed
|
||||
sha256 133d98e7a2ab3ffd330b4debb0bfc10fea21e4b2b5a5b09de2e924293be5ff08 Copyright
|
||||
76
package/linux-pam/linux-pam.mk
Normal file
76
package/linux-pam/linux-pam.mk
Normal file
@@ -0,0 +1,76 @@
|
||||
################################################################################
|
||||
#
|
||||
# linux-pam
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LINUX_PAM_VERSION = 1.7.2
|
||||
LINUX_PAM_SOURCE = Linux-PAM-$(LINUX_PAM_VERSION).tar.xz
|
||||
LINUX_PAM_SITE = https://github.com/linux-pam/linux-pam/releases/download/v$(LINUX_PAM_VERSION)
|
||||
LINUX_PAM_INSTALL_STAGING = YES
|
||||
LINUX_PAM_CONF_OPTS = \
|
||||
-Disadir=disabled \
|
||||
-Dnis=disabled \
|
||||
-Dpam_userdb=disabled \
|
||||
-Ddocs=disabled
|
||||
LINUX_PAM_DEPENDENCIES = host-flex host-pkgconf \
|
||||
$(if $(BR2_PACKAGE_LIBXCRYPT),libxcrypt) \
|
||||
$(TARGET_NLS_DEPENDENCIES)
|
||||
LINUX_PAM_LICENSE = BSD-3-Clause
|
||||
LINUX_PAM_LICENSE_FILES = Copyright
|
||||
LINUX_PAM_LIBS = $(TARGET_NLS_LIBS)
|
||||
LINUX_PAM_MAKE_OPTS += LIBS="$(LINUX_PAM_LIBS)"
|
||||
LINUX_PAM_CPE_ID_VENDOR = linux-pam
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
||||
LINUX_PAM_LIBS += -latomic
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
|
||||
LINUX_PAM_CONF_OPTS += -Dselinux=enabled
|
||||
LINUX_PAM_DEPENDENCIES += libselinux
|
||||
define LINUX_PAM_SELINUX_PAMFILE_TWEAK
|
||||
$(SED) 's/^# \(.*pam_selinux.so.*\)$$/\1/' \
|
||||
$(TARGET_DIR)/usr/lib/pam.d/login
|
||||
endef
|
||||
else
|
||||
LINUX_PAM_CONF_OPTS += -Dselinux=disabled
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_AUDIT),y)
|
||||
LINUX_PAM_CONF_OPTS += -Daudit=enabled
|
||||
LINUX_PAM_DEPENDENCIES += audit
|
||||
else
|
||||
LINUX_PAM_CONF_OPTS += -Daudit=disabled
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
LINUX_PAM_CONF_OPTS += -Dopenssl=enabled
|
||||
LINUX_PAM_DEPENDENCIES += openssl
|
||||
else
|
||||
LINUX_PAM_CONF_OPTS += -Dopenssl=disabled
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LINUX_PAM_LASTLOG),y)
|
||||
LINUX_PAM_CONF_OPTS += -Dpam_lastlog=enabled
|
||||
define LINUX_PAM_LASTLOG_PAMFILE_TWEAK
|
||||
$(SED) 's/^# \(.*pam_lastlog.so.*\)$$/\1/' \
|
||||
$(TARGET_DIR)/usr/lib/pam.d/login
|
||||
endef
|
||||
else
|
||||
LINUX_PAM_CONF_OPTS += -Dpam_lastlog=disabled
|
||||
endif
|
||||
|
||||
# Install default pam config (deny everything except login)
|
||||
define LINUX_PAM_INSTALL_CONFIG
|
||||
$(INSTALL) -m 0644 -D $(LINUX_PAM_PKGDIR)/login.pam \
|
||||
$(TARGET_DIR)/usr/lib/pam.d/login
|
||||
$(INSTALL) -m 0644 -D $(LINUX_PAM_PKGDIR)/other.pam \
|
||||
$(TARGET_DIR)/usr/lib/pam.d/other
|
||||
$(LINUX_PAM_LASTLOG_PAMFILE_TWEAK)
|
||||
$(LINUX_PAM_SELINUX_PAMFILE_TWEAK)
|
||||
endef
|
||||
|
||||
LINUX_PAM_POST_INSTALL_TARGET_HOOKS += LINUX_PAM_INSTALL_CONFIG
|
||||
|
||||
$(eval $(meson-package))
|
||||
12
package/linux-pam/login.pam
Normal file
12
package/linux-pam/login.pam
Normal file
@@ -0,0 +1,12 @@
|
||||
auth required pam_unix.so nullok
|
||||
|
||||
account required pam_unix.so
|
||||
|
||||
password required pam_unix.so nullok
|
||||
|
||||
# session required pam_selinux.so close
|
||||
session required pam_limits.so
|
||||
session required pam_env.so
|
||||
session required pam_unix.so
|
||||
# session optional pam_lastlog.so
|
||||
# session required pam_selinux.so open
|
||||
7
package/linux-pam/other.pam
Normal file
7
package/linux-pam/other.pam
Normal file
@@ -0,0 +1,7 @@
|
||||
auth required pam_deny.so
|
||||
|
||||
account required pam_deny.so
|
||||
|
||||
password required pam_deny.so
|
||||
|
||||
session required pam_deny.so
|
||||
Reference in New Issue
Block a user