3 # use consolekit to support legacy at_console setting
6 # to defend against a security attack of changing external PATH
7 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
11 dir=/var/run/dbus/at_console
13 # for at_console we are only interested in local sessions
14 test "$CK_SESSION_IS_LOCAL" = true || exit 0
15 test "$reason" = "session_added" -o "$reason" = "session_removed" || exit 0
17 sessid=${CK_SESSION_ID##*/}
18 sessid=${sessid//[^A-Za-z0-9]/_}
19 test -n "$sessid" || exit 1
21 name=`getent passwd "$CK_SESSION_USER_UID" 2>/dev/null | awk -F: '{print $1}'`
23 test -n "$name" || exit 1
25 if test "$reason" = "session_added"; then
27 touch "$dir/$name/$sessid"
29 rm "$dir/$name/$sessid"