commit dbe0ab77f9cac03173d03ec8ab94a25e3935ab2f
parent c6913f898653d42995a0e31910d2f445bdec78c0
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date: Tue, 15 Dec 2020 03:12:21 +0100
Use named group for terminal so it can access it's tmpfs /home in container.
Diffstat:
2 files changed, 6 insertions(+), 5 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
+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 -gA fds
@@ -45,7 +45,8 @@ if [[ -n $X ]]; then
coproc_args+=( tail -F /run/containers/xsession.$X.ccx/run/uncaught-logs/current )
typeset -g plumber_fifo
plumber_fifo=/run/containers/xsession.$X.ccx/run/plumber_fifo
- terminal_args=( s6-sudo $HOME/chome/xsession.$[ ${TTY#/dev/tty} + 4 ]/exec/socket urxvt -pty-fd 0 )
+ exec_socket=$HOME/chome/xsession.$[ ${TTY#/dev/tty} + 4 ]/exec/socket
+ terminal_args=( s6-sudo $exec_socket:A urxvt -pty-fd 0 )
terminal_env=rxvt-unicode # the TERM variable used
else
coproc_args+=( tail -F /run/user/ccx.logs/current )
diff --git a/sbin/logincaps b/sbin/logincaps
@@ -87,7 +87,7 @@ main() {
(terminal *)
term_cmd=( "${(Q@)${(z)${line#terminal }}}" )
printf >&2 "%s\n" "Would launch root terminal."
- pretendrun /command/su-term.py -d 1 -u $USER -- "$term_cmd[@]" <&2
+ pretendrun /command/su-term.py -d 1 -u $USER -g $USER -- "$term_cmd[@]" <&2
#{ /command/su-term.py -d 1 -u $USER -- "$term_cmd[@]" <&2 &!
#} | read
printf 'OK\n'
@@ -96,8 +96,8 @@ main() {
(terminal-wpa_cli *)
term_cmd=( "${(Q@)${(z)${line#* }}}" )
printf >&2 "%s\n" "Would launch terminal with wpa_cli."
- pretendrun /command/user-term.py -u $USER -- "$term_cmd[1]" ' wpa_cli' '' "${(@)term_cmd[2,-1]}"
- /command/user-term.py -u $USER -- "$term_cmd[1]" ' wpa_cli' '' "${(@)term_cmd[2,-1]}" </dev/null >&2 &!
+ pretendrun /command/user-term.py -u $USER -g $USER -- "$term_cmd[1]" ' wpa_cli' '' "${(@)term_cmd[2,-1]}"
+ /command/user-term.py -u $USER -g $USER -- "$term_cmd[1]" ' wpa_cli' '' "${(@)term_cmd[2,-1]}" </dev/null >&2 &!
printf 'OK\n'
;;