mrrl-logincaps

MRRL version of logincaps
git clone https://ccx.te2000.cz/git/mrrl-logincaps
Log | Files | Refs

commit e9cac0551b174f25d4a2c9fb50d9ac4b142b7c67
parent 59e52a336b24d1f1263485628071cddb826cb0ae
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Tue, 15 Dec 2020 04:22:58 +0100

Rely on separate s6-sudod instance for spawining terminal; close fds pointing to tty before passing it to s6-sudo.
Diffstat:
Mbin/zshaskpass_lock | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/bin/zshaskpass_lock b/bin/zshaskpass_lock @@ -12,7 +12,7 @@ fi setopt no_unset warn_create_global zmodload zsh/zselect -typeset -g COPROC_OUT fd newfd prompt_end keep_running X die_color plumb_r plumb_w exec_socket terminal_el +typeset -g COPROC_OUT fd newfd prompt_end keep_running X die_color plumb_r plumb_w typeset -a coproc_args typeset -gA fds @@ -43,10 +43,12 @@ coproc_args=( ) if [[ -n $X ]]; then coproc_args+=( tail -F /run/containers/xsession.$X.ccx/run/uncaught-logs/current ) - typeset -g plumber_fifo + typeset -g plumber_fifo terminal_exec_socket terminal_el plumber_fifo=/run/containers/xsession.$X.ccx/run/plumber_fifo - exec_socket=$HOME/chome/xsession.$[ ${TTY#/dev/tty} + 4 ]/exec/socket - terminal_el="s6-sudo ${(qqq)${exec_socket:A}} fdmove 3 0 redirfd -r 0 /dev/null background { urxvt -pty-fd 3 }" + # exec_socket=$HOME/chome/xsession.$[ ${TTY#/dev/tty} + 4 ]/exec/socket + terminal_exec_socket=$HOME/chome/xsession.$[ ${TTY#/dev/tty} + 4 ]/exec/urxvt.socket + #terminal_el="redirfd -w 1 /dev/null redirfd -w 2 /dev/null s6-sudo ${(qqq)${exec_socket:A}} fdmove 3 0 redirfd -r 0 /dev/null background { urxvt -pty-fd 3 }" + terminal_el="redirfd -w 1 /dev/null redirfd -w 2 /dev/null s6-sudo ${(qqq)terminal_exec_socket:A}" terminal_env=rxvt-unicode # the TERM variable used else coproc_args+=( tail -F /run/user/ccx.logs/current )