diff --git a/salt/sys-git/files/client/git-core/git-init-qrexec b/salt/sys-git/files/client/git-core/git-init-qrexec index 41f8424..7d278be 100755 --- a/salt/sys-git/files/client/git-core/git-init-qrexec +++ b/salt/sys-git/files/client/git-core/git-init-qrexec @@ -26,8 +26,8 @@ is_git_repo(){ helper="${0##*/git-}" case "${1-}" in -h|--?help) usage;; - "") qube="@default";; - *) qube="${1}";; + "") authority="@default";; + *) authority="${1}";; esac case "${2-}" in "") is_git_repo; repo="$(basename "$(git rev-parse --show-toplevel)")";; @@ -40,18 +40,12 @@ default_qube="sys-git" rpc_cmd="${vendor}.${rpc}+${repo}" if command -v qrexec-client-vm >/dev/null; then - exec qrexec-client-vm -- "${qube}" "${rpc_cmd}" + exec qrexec-client-vm -- "${authority}" "${rpc_cmd}" elif command -v qrexec-client >/dev/null; then - qubes_version="$(awk -F '=' '/^VERSION_ID=/{print $2}' /etc/os-release)" - if test "$(echo "${qubes_version}" | tr -d ".")" -le 41; then - if test "${qube}" = "@default"; then - qube="${default_qube}" - fi - else - policy="$(qrexec-policy --assume-yes-for-ask dom0 "${qube}" "${rpc_cmd}")" - qube="$(echo "${policy}" | awk -F '=' '/^target=/{print $2}')" + if test "${authority}" = "@default"; then + authority="${default_qube}" fi - exec qrexec-client -d "${qube}" -- "DEFAULT:QUBESRPC ${rpc_cmd} dom0" -else - die "Qrexec programs not found: qrexec-client-vm, qrexec-client" + exec qrexec-client -d "${authority}" -- "DEFAULT:QUBESRPC ${rpc_cmd} dom0" fi + +die "Qrexec programs not found: qrexec-client-vm, qrexec-client" diff --git a/salt/sys-git/files/client/git-core/git-remote-qrexec-connect b/salt/sys-git/files/client/git-core/git-remote-qrexec-connect index b39758a..ea69ad6 100755 --- a/salt/sys-git/files/client/git-core/git-remote-qrexec-connect +++ b/salt/sys-git/files/client/git-core/git-remote-qrexec-connect @@ -69,14 +69,8 @@ if command -v qrexec-client-vm >/dev/null; then log "->" qrexec-client-vm -- "${authority}" "${rpc_cmd}" exec qrexec-client-vm -- "${authority}" "${rpc_cmd}" elif command -v qrexec-client >/dev/null; then - qubes_version="$(awk -F '=' '/^VERSION_ID=/{print $2}' /etc/os-release)" - if test "$(echo "${qubes_version}" | tr -d ".")" -le 41; then - if test "${authority}" = "@default"; then - authority="${default_qube}" - fi - else - policy="$(qrexec-policy --assume-yes-for-ask dom0 "${authority}" "${rpc_cmd}")" - authority="$(echo "${policy}" | awk -F '=' '/^target=/{print $2}')" + if test "${authority}" = "@default"; then + authority="${default_qube}" fi log "->" qrexec-client -d "${authority}" -- "DEFAULT:QUBESRPC ${rpc_cmd} dom0" exec qrexec-client -d "${authority}" -- "DEFAULT:QUBESRPC ${rpc_cmd} dom0"