From 7d79a15c4b1ba9fde25777f39d30aa02430cca2c Mon Sep 17 00:00:00 2001 From: Rafal Wojtczuk Date: Wed, 6 Jul 2011 13:56:57 +0200 Subject: [PATCH] qrexec: support for rpc with dom0 as target --- qrexec/qrexec_policy | 5 ++++- rpm_spec/core-dom0.spec | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/qrexec/qrexec_policy b/qrexec/qrexec_policy index cf4e02d4..4468f5d6 100755 --- a/qrexec/qrexec_policy +++ b/qrexec/qrexec_policy @@ -33,9 +33,12 @@ def apply_policy(policy, domain, target): return (None, None) def do_execute(domain, target, exec_index, process_ident): - if target == "dispvm": + if target == "dom0": + cmd="/usr/lib/qubes/qubes_rpc_multiplexer "+exec_index + " " + domain + elif target == "dispvm": cmd = "/usr/lib/qubes/qfile-daemon-dvm " + exec_index + " " + domain else: +#fixme: qvm-run --pass_io is broken for non-running target domain cmd= "qvm-run -uroot -q -a --pass_io "+target cmd+=" '/usr/lib/qubes/qubes_rpc_multiplexer "+exec_index + " " + domain + "'" os.execl(QREXEC_CLIENT, "qrexec_client", "-d", domain, "-l", cmd, "-c", process_ident) diff --git a/rpm_spec/core-dom0.spec b/rpm_spec/core-dom0.spec index 6058fc3b..4bd4138d 100644 --- a/rpm_spec/core-dom0.spec +++ b/rpm_spec/core-dom0.spec @@ -102,6 +102,7 @@ cp aux-tools/qfile-dom0-unpacker $RPM_BUILD_ROOT/usr/lib/qubes/ mkdir -p $RPM_BUILD_ROOT/etc/qubes_rpc/policy cp ../appvm/qubes.Filecopy.policy $RPM_BUILD_ROOT/etc/qubes_rpc/policy/qubes.Filecopy cp ../appvm/qubes.OpenInVM.policy $RPM_BUILD_ROOT/etc/qubes_rpc/policy/qubes.OpenInVM +cp ../qrexec/qubes_rpc_multiplexer $RPM_BUILD_ROOT/usr/lib/qubes cp restore/qvm-create-default-dvm $RPM_BUILD_ROOT/usr/bin cp restore/xenstore-watch $RPM_BUILD_ROOT/usr/bin/xenstore-watch-qubes @@ -324,6 +325,7 @@ fi /etc/xen/scripts/block-origin /etc/xen/scripts/vif-route-qubes /usr/lib/qubes/qrexec_client +/usr/lib/qubes/qubes_rpc_multiplexer /usr/lib/qubes/qrexec_policy %dir /etc/qubes_rpc/policy /etc/qubes_rpc/policy/qubes.Filecopy