summaryrefslogtreecommitdiffstats
path: root/core/modules/pam
diff options
context:
space:
mode:
authorSimon Rettberg2021-07-08 16:05:57 +0200
committerSimon Rettberg2021-07-08 16:05:57 +0200
commiteec5e1576e70d27caa639f36e34679ed18817458 (patch)
tree48b4f6be10d33c6c3b81a7723ff0c4bbb0b66cf7 /core/modules/pam
parentDrop 32bit support, improve CPU detection (diff)
downloadmltk-eec5e1576e70d27caa639f36e34679ed18817458.tar.gz
mltk-eec5e1576e70d27caa639f36e34679ed18817458.tar.xz
mltk-eec5e1576e70d27caa639f36e34679ed18817458.zip
Add installer mode for stage4
Diffstat (limited to 'core/modules/pam')
-rw-r--r--core/modules/pam/data/etc/profile.d/00-user-env.sh14
-rw-r--r--core/modules/pam/module.conf3
2 files changed, 17 insertions, 0 deletions
diff --git a/core/modules/pam/data/etc/profile.d/00-user-env.sh b/core/modules/pam/data/etc/profile.d/00-user-env.sh
new file mode 100644
index 00000000..a2d10989
--- /dev/null
+++ b/core/modules/pam/data/etc/profile.d/00-user-env.sh
@@ -0,0 +1,14 @@
+#!/bin/ash
+
+# Stuff we might wanna know
+PWENT=
+[ -n "$UID" ] && PWENT=`getent passwd "$UID"`
+[ -z "$PWENT" ] && [ -n "$PAM_USER" ] && PWENT=`getent passwd "$PAM_USER"`
+if [ -n "$PWENT" ]; then
+ export USER=`echo "$PWENT" | awk -F ':' '{print $1}'`
+ export GID=`echo "$PWENT" | awk -F ':' '{print $4}'`
+ export HOME=`echo "$PWENT" | awk -F ':' '{print $6}'`
+ export GROUP=`id -gn`
+ export LOGNAME=$USER
+ export HOSTNAME=`hostname`
+fi
diff --git a/core/modules/pam/module.conf b/core/modules/pam/module.conf
index 86b91b8d..7789139d 100644
--- a/core/modules/pam/module.conf
+++ b/core/modules/pam/module.conf
@@ -1,4 +1,7 @@
#!/bin/bash
+REQUIRED_MODULES="
+ slxlog
+"
REQUIRED_BINARIES="
ldapsearch
rpc.gssd