mirror of
https://github.com/ben-grande/qusal.git
synced 2025-02-02 10:24:56 -05:00
fix: dom0 as sys-git client
The salt module git.config_get does not work in Dom0 and does not have a key to set the system gitconfig.
This commit is contained in:
parent
3faa523820
commit
23bccebaab
@ -6,6 +6,9 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
|||||||
|
|
||||||
{% if grains['nodename'] == 'dom0' -%}
|
{% if grains['nodename'] == 'dom0' -%}
|
||||||
|
|
||||||
|
include:
|
||||||
|
- sys-git.install-client
|
||||||
|
|
||||||
"{{ slsdotpath }}-dev-updated":
|
"{{ slsdotpath }}-dev-updated":
|
||||||
pkg.uptodate:
|
pkg.uptodate:
|
||||||
- refresh: True
|
- refresh: True
|
||||||
|
@ -6,6 +6,7 @@ Git operations through Qrexec in Qubes OS.
|
|||||||
|
|
||||||
* [Description](#description)
|
* [Description](#description)
|
||||||
* [Alternatives comparison](#alternatives-comparison)
|
* [Alternatives comparison](#alternatives-comparison)
|
||||||
|
* [Security](#security)
|
||||||
* [Installation](#installation)
|
* [Installation](#installation)
|
||||||
* [Access control](#access-control)
|
* [Access control](#access-control)
|
||||||
* [Usage](#usage)
|
* [Usage](#usage)
|
||||||
@ -42,6 +43,11 @@ implementation:
|
|||||||
| Validates Git communication | False | False | True | False |
|
| Validates Git communication | False | False | True | False |
|
||||||
| Verifies tag signature | False | False | True | False |
|
| Verifies tag signature | False | False | True | False |
|
||||||
|
|
||||||
|
## Security
|
||||||
|
|
||||||
|
It is not possible to filter Git's stdout from a Qrexec call as it is used by
|
||||||
|
the local running git process.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
- Top
|
- Top
|
||||||
|
@ -40,12 +40,12 @@ default_qube="sys-git"
|
|||||||
rpc_cmd="${vendor}.${rpc}+${repo}"
|
rpc_cmd="${vendor}.${rpc}+${repo}"
|
||||||
|
|
||||||
if command -v qrexec-client-vm >/dev/null; then
|
if command -v qrexec-client-vm >/dev/null; then
|
||||||
exec qrexec-client-vm -- "${authority}" "${rpc_cmd}"
|
exec qrexec-client-vm -tT -- "${authority}" "${rpc_cmd}"
|
||||||
elif command -v qrexec-client >/dev/null; then
|
elif command -v qrexec-client >/dev/null; then
|
||||||
if test "${authority}" = "@default"; then
|
if test "${authority}" = "@default"; then
|
||||||
authority="${default_qube}"
|
authority="${default_qube}"
|
||||||
fi
|
fi
|
||||||
exec qrexec-client -d "${authority}" -- "DEFAULT:QUBESRPC ${rpc_cmd} dom0"
|
exec qrexec-client -tT -d "${authority}" -- "DEFAULT:QUBESRPC ${rpc_cmd} dom0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
die "Qrexec programs not found: qrexec-client-vm, qrexec-client"
|
die "Qrexec programs not found: qrexec-client-vm, qrexec-client"
|
||||||
|
@ -66,14 +66,14 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v qrexec-client-vm >/dev/null; then
|
if command -v qrexec-client-vm >/dev/null; then
|
||||||
log "->" qrexec-client-vm -- "${authority}" "${rpc_cmd}"
|
log "->" qrexec-client-vm -T -- "${authority}" "${rpc_cmd}"
|
||||||
exec qrexec-client-vm -- "${authority}" "${rpc_cmd}"
|
exec qrexec-client-vm -T -- "${authority}" "${rpc_cmd}"
|
||||||
elif command -v qrexec-client >/dev/null; then
|
elif command -v qrexec-client >/dev/null; then
|
||||||
if test "${authority}" = "@default"; then
|
if test "${authority}" = "@default"; then
|
||||||
authority="${default_qube}"
|
authority="${default_qube}"
|
||||||
fi
|
fi
|
||||||
log "->" qrexec-client -d "${authority}" -- "DEFAULT:QUBESRPC ${rpc_cmd} dom0"
|
log "->" qrexec-client -T -d "${authority}" -- "DEFAULT:QUBESRPC ${rpc_cmd} dom0"
|
||||||
exec qrexec-client -d "${authority}" -- "DEFAULT:QUBESRPC ${rpc_cmd} dom0"
|
exec qrexec-client -T -d "${authority}" -- "DEFAULT:QUBESRPC ${rpc_cmd} dom0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
die "Qrexec programs not found: qrexec-client-vm, qrexec-client"
|
die "Qrexec programs not found: qrexec-client-vm, qrexec-client"
|
||||||
|
@ -29,6 +29,9 @@ include:
|
|||||||
'RedHat': {
|
'RedHat': {
|
||||||
'exec_path': '/usr/libexec/git-core',
|
'exec_path': '/usr/libexec/git-core',
|
||||||
},
|
},
|
||||||
|
'Qubes OS': {
|
||||||
|
'exec_path': '/usr/libexec/git-core',
|
||||||
|
},
|
||||||
}.get(grains.os_family) -%}
|
}.get(grains.os_family) -%}
|
||||||
|
|
||||||
"{{ slsdotpath }}-install-client-git-core-dir":
|
"{{ slsdotpath }}-install-client-git-core-dir":
|
||||||
@ -46,3 +49,8 @@ include:
|
|||||||
- mode
|
- mode
|
||||||
- user
|
- user
|
||||||
- group
|
- group
|
||||||
|
|
||||||
|
"{{ slsdotpath }}-install-client-allow-protocol":
|
||||||
|
cmd.run:
|
||||||
|
- name: git config --system protocol.qrexec.allow always
|
||||||
|
- runas: root
|
||||||
|
Loading…
x
Reference in New Issue
Block a user