Add qubes.ShowTerminal service
This commit is contained in:
parent
33bf3d4506
commit
baef139c00
12
qubes-rpc-policy/qubes.ShowTerminal
Normal file
12
qubes-rpc-policy/qubes.ShowTerminal
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
## Note that policy parsing stops at the first match,
|
||||||
|
## so adding anything below "$anyvm $anyvm action" line will have no effect
|
||||||
|
|
||||||
|
## Please use a single # to start your custom comments
|
||||||
|
|
||||||
|
$anyvm $anyvm deny,target=dom0
|
||||||
|
|
||||||
|
# WARNING: The qubes.ShowTerminal service is dangerous and allows any
|
||||||
|
# qube to access any other qube console. It should be restricted
|
||||||
|
# only to management/admin qubes. This is why the default policy is 'deny'
|
||||||
|
|
||||||
|
# Example of policy: mgmtvm $tag:created-by-mgmtvm allow,target=dom0
|
7
qubes-rpc/qubes.ShowTerminal
Executable file
7
qubes-rpc/qubes.ShowTerminal
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
lock="/var/run/qubes/$QREXEC_REQUESTED_TARGET.terminal.lock"
|
||||||
|
|
||||||
|
# Create an exclusive lock to ensure that multiple qubes cannot access to the same socket
|
||||||
|
# In the case of multiple qrexec calls it returns a specific exit code
|
||||||
|
sudo flock -n -E 200 -x "$lock" socat - OPEN:"$(virsh -c xen ttyconsole "$QREXEC_REQUESTED_TARGET")"
|
Loading…
Reference in New Issue
Block a user