summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
Diffstat (limited to 'remote')
-rw-r--r--remote/modules/busybox/openslx-busybox-config2
-rwxr-xr-xremote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close12
-rw-r--r--remote/rootfs/rootfs-stage32/rootfs-stage32.conf1
3 files changed, 11 insertions, 4 deletions
diff --git a/remote/modules/busybox/openslx-busybox-config b/remote/modules/busybox/openslx-busybox-config
index ae9f9ede..1dcae3db 100644
--- a/remote/modules/busybox/openslx-busybox-config
+++ b/remote/modules/busybox/openslx-busybox-config
@@ -924,7 +924,7 @@ CONFIG_KILLALL=y
CONFIG_PIDOF=y
# CONFIG_FEATURE_PIDOF_SINGLE is not set
# CONFIG_FEATURE_PIDOF_OMIT is not set
-CONFIG_PKILL=y
+# CONFIG_PKILL is not set
CONFIG_PS=y
CONFIG_FEATURE_PS_WIDE=y
CONFIG_FEATURE_PS_LONG=y
diff --git a/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close b/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close
index 4d26d685..7c533405 100755
--- a/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close
+++ b/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close
@@ -6,15 +6,21 @@ export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/o
# NSA needs to know
slxlog "session-close" "$PAM_USER logged out on $PAM_TTY"
+# do not kill all root processes :)
+[ "x${PAM_USER}" == "xroot" ] && exit 0
+
OPENSESSIONS=$(loginctl | grep "${PAM_USER}" | wc -l)
if [ "x${OPENSESSIONS}" == "x1" ]; then
# last sessions, close all ghost user processes
pkill -u "${PAM_USER}"
- # check if it worker
- while ps aux | grep -v grep | grep -q "${PAM_USER}"; do
- sleep 1
+ # check if user's process are still running
+ for TIMEOUT in 1 1 1 2; do
+ if ! ps aux | grep -v grep | grep -q "${PAM_USER}"; then
+ break;
+ fi
+ sleep "${TIMEOUT}"
done
# all done, kill it again to be sure
pkill -9 -u "${PAM_USER}"
diff --git a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf
index bf2ffabf..357d9fce 100644
--- a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf
+++ b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf
@@ -33,6 +33,7 @@ REQUIRED_BINARIES="
find
rpcbind
rpc.statd
+ pkill
"
REQUIRED_LIBRARIES="
libcap