Update pam_script_ses_open

This commit is contained in:
Emre Akkaya 2016-06-27 12:20:09 +03:00 committed by GitHub
parent ef22848728
commit 4f3168c092

View file

@ -18,11 +18,11 @@ if [ -n $PAM_USER ] && [ $PAM_USER != "root" ]; then
if ([ -n $PAM_SERVICE ] && [[ $PAM_SERVICE == *"dm" ]]) || ([ -n $PAM_TTY ] && [[ $PAM_TTY == ":"* ]]); then if ([ -n $PAM_SERVICE ] && [[ $PAM_SERVICE == *"dm" ]]) || ([ -n $PAM_TTY ] && [[ $PAM_TTY == ":"* ]]); then
SERVICE="none" SERVICE="none"
if [ -n $PAM_SERVICE ]; then if [ -n $PAM_SERVICE ]; then
$SERVICE="$PAM_SERVICE" SERVICE="$PAM_SERVICE"
fi fi
TTY_DISPLAY="none" TTY_DISPLAY="none"
if [ -n $PAM_TTY ]; then if [ -n $PAM_TTY ]; then
$TTY_DISPLAY="$PAM_TTY" TTY_DISPLAY="$PAM_TTY"
fi fi
log "login: $PAM_USER service: $SERVICE tty: $TTY_DISPLAY" log "login: $PAM_USER service: $SERVICE tty: $TTY_DISPLAY"
sudo python3 /opt/ahenk/ahenkd.py login $PAM_USER $SERVICE $TTY_DISPLAY sudo python3 /opt/ahenk/ahenkd.py login $PAM_USER $SERVICE $TTY_DISPLAY