summaryrefslogtreecommitdiffstats
path: root/core/modules/pam
diff options
context:
space:
mode:
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