mrrl-logincaps

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

commit 17d8fe245aab7401182624a808f7366f3f019b10
parent fb0670d41fc9e72c119698a5fd5ae5d45f655e69
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Tue, 15 Dec 2020 04:55:52 +0100

Re-add missing block for command to be spawned by spawn-pty.py
Diffstat:
Msbin/logincaps | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sbin/logincaps b/sbin/logincaps @@ -73,24 +73,24 @@ cap_cmd() { } typeset -f -t cap_cmd -terminal_spawn_wrapper() { +terminal_spawn_common() { local term_cmd term_env - term_cmd="${2#* }" + term_cmd="${3#* }" term_env=${term_cmd%% *} if ! [[ $term_env =~ [-.0-9a-zA-Z]* ]]; then printf 'ERR: invalid TERM' return 1 fi term_cmd="${term_cmd#* }" - cap_cmd execlineb -c "$1 -- ${(qqq)term_env} cd / s6-setuidgid ${(qqq)USER} $term_cmd" + cap_cmd execlineb -c "$1 -- ${(qqq)term_env} $2 cd / s6-setuidgid ${(qqq)USER} $term_cmd" } terminal_spawn_password() { - terminal_spawn_wrapper /command/su-term.py "$@" + terminal_spawn_common /command/su-term.py '' "$1" } terminal_spawn() { - terminal_spawn_wrapper /command/spawn-pty.py "$@" + terminal_spawn_common /command/spawn-pty.py "{ $1 }" "$2" } main() { @@ -110,7 +110,7 @@ main() { ;; (terminal-wpa_cli *) - terminal_spawn "$line" + terminal_spawn "wpa_cli" "$line" ;; (chvt tty)