commit ef2688b4d82965525bfc80dde7298c1a61c4c146
parent e970201d0bbc1f3096537e2d1f47e2c5e85f7e29
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date: Tue, 15 Dec 2020 03:51:32 +0100
Change to execline syntax for terminal in zshaskpass_lock
Diffstat:
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/bin/zshaskpass_lock b/bin/zshaskpass_lock
@@ -12,8 +12,8 @@ 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
-typeset -a coproc_args terminal_args
+typeset -g COPROC_OUT fd newfd prompt_end keep_running X die_color plumb_r plumb_w exec_socket terminal_el
+typeset -a coproc_args
typeset -gA fds
#if [[ $ZSHASKPASS_PROMPTFD -gt $ZSHASKPASS_PASSFD ]]; then
@@ -46,7 +46,7 @@ if [[ -n $X ]]; then
typeset -g plumber_fifo
plumber_fifo=/run/containers/xsession.$X.ccx/run/plumber_fifo
exec_socket=$HOME/chome/xsession.$[ ${TTY#/dev/tty} + 4 ]/exec/socket
- terminal_args=( s6-sudo $exec_socket:A background urxvt -pty-fd 0 )
+ terminal_el="s6-sudo ${(qqq)${exec_socket:A}} background { urxvt -pty-fd 0 }"
terminal_env=rxvt-unicode # the TERM variable used
else
coproc_args+=( tail -F /run/user/ccx.logs/current )
@@ -118,9 +118,9 @@ cmd() {
logincap b;;
(root)
# logincap "terminal rxvt-unicode importas -i PTY_FD PTY_FD s6-envdir /run/user/ccx/X$[ ${TTY#/dev/tty} + 4 ]/env urxvt -pty-fd \$PTY_FD" ;;
- logincap "terminal $terminal_env $terminal_args" ;;
+ logincap "terminal $terminal_env $terminal_el" ;;
(t *)
- logincap "terminal-${1#t } $terminal_env $terminal_args" ;;
+ logincap "terminal-${1#t } $terminal_env $terminal_el" ;;
(lock)
lock;;
(exit)
diff --git a/sbin/logincaps b/sbin/logincaps
@@ -102,7 +102,7 @@ main() {
continue
fi
term_cmd="${term_cmd#* }"
- cap_cmd execlineb -c "/command/spawn-pty.py -- ${(qqq)term_env} { wpa_cli } s6-setuidgid ${(qqq)USER} $term_cmd"
+ cap_cmd execlineb -c "/command/spawn-pty.py -- ${(qqq)term_env} { wpa_cli } cd / s6-setuidgid ${(qqq)USER} $term_cmd"
#/command/user-term.py -u $USER -g $USER -- "$term_cmd[1]" ' wpa_cli' '' "${(@)term_cmd[2,-1]}" </dev/null >&2 &!
printf 'OK\n'
;;