From 7e0a5e940b114b5e146b84a01290e98e72ccda49 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Mon, 2 Dec 2013 15:31:13 +0100 Subject: [busybox] remove pkill --- remote/modules/busybox/openslx-busybox-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'remote/modules') 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 -- cgit v1.2.3-55-g7522 From cc6bac243700d68f6dc6a8cfb6404566d1b732c5 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Mon, 2 Dec 2013 15:34:11 +0100 Subject: [pam] add a timeout for pkill check --- remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'remote/modules') 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..c568c4cf 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 @@ -12,9 +12,12 @@ 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}" -- cgit v1.2.3-55-g7522 From 5a5f4fcca1e62fcf98e75341cac6da88fd49347d Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Mon, 2 Dec 2013 15:49:28 +0100 Subject: [pam] do not kill root processes on logout :) --- remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close | 3 +++ 1 file changed, 3 insertions(+) (limited to 'remote/modules') 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 c568c4cf..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,6 +6,9 @@ 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 -- cgit v1.2.3-55-g7522