Skip to content

Commit c23cc48

Browse files
author
Rafal Wojtczuk
committed
qrexec: use $anyvm and $dispvm symbols
1 parent 7cfbe1c commit c23cc48

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

appvm/qubes.Filecopy.policy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
anyvm anyvm ask,user=root
1+
$anyvm $anyvm ask,user=root

appvm/qubes.OpenInVM.policy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
anyvm dispvm allow
2-
anyvm anyvm ask
1+
$anyvm $dispvm allow
2+
$anyvm $anyvm ask

appvm/qvm-open-in-dvm2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ if ! [ $# = 1 ] ; then
2525
exit 1
2626
fi
2727

28-
exec /usr/lib/qubes/qrexec_client_vm dispvm qubes.OpenInVM "/usr/lib/qubes/qopen-in-vm" "$1"
28+
exec /usr/lib/qubes/qrexec_client_vm '$dispvm' qubes.OpenInVM "/usr/lib/qubes/qopen-in-vm" "$1"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
anyvm dom0 allow
1+
$anyvm dom0 allow

dom0/qubes.SyncAppMenus.policy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
anyvm dom0 allow
1+
$anyvm dom0 allow

qrexec/qrexec_daemon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ void sanitize_name(char * untrusted_s_signed)
372372
continue;
373373
if (*untrusted_s >= '0' && *untrusted_s <= '9')
374374
continue;
375-
if (*untrusted_s == '_' || *untrusted_s == '-' || *untrusted_s == '.' || *untrusted_s == ' ')
375+
if (*untrusted_s == '$' || *untrusted_s == '_' || *untrusted_s == '-' || *untrusted_s == '.' || *untrusted_s == ' ')
376376
continue;
377377
*untrusted_s = '_';
378378
}

qrexec/qrexec_policy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def read_policy_file(exec_index):
4040
return policy_list
4141

4242
def is_match(item, config_term):
43-
return (item is not "dom0" and config_term == "anyvm") or item == config_term
43+
return (item is not "dom0" and config_term == "$anyvm") or item == config_term
4444

4545
def get_default_policy():
4646
dict={}
@@ -76,7 +76,7 @@ def spawn_target_if_necessary(target):
7676
def do_execute(domain, target, user, exec_index, process_ident):
7777
if target == "dom0":
7878
cmd="/usr/lib/qubes/qubes_rpc_multiplexer "+exec_index + " " + domain
79-
elif target == "dispvm":
79+
elif target == "$dispvm":
8080
cmd = "/usr/lib/qubes/qfile-daemon-dvm " + exec_index + " " + domain + " " +user
8181
else:
8282
# see the previous commit why "qvm-run -a" is broken and dangerous

0 commit comments

Comments
 (0)