From 5ea1118fa1e6ba48829f86edd173262111b01211 Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Mon, 12 Aug 2019 11:36:20 -0500 Subject: [PATCH] Reorder steps in RPC service example Also add a shell prompt character --- developer/services/qrexec.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/developer/services/qrexec.md b/developer/services/qrexec.md index c0200566..29a2859f 100644 --- a/developer/services/qrexec.md +++ b/developer/services/qrexec.md @@ -237,20 +237,23 @@ The code for this file is: echo $(($arg1+$arg2)) # print to stdout, which is passed to the RPC client We'll need to create a service called `test.Add` with its own definition and policy file in dom0. -In dom0 add the following test to `/etc/qubes-rpc/policy/test.Add`: - - $anyvm $anyvm ask - Now we need to define what the service does. -In this case, it should call our additing script. +In this case, it should call our addition script. We define the service with another one-line file, `/etc/qubes-rpc/test.Add`: - /usr/bin/our_test_add_server + /usr/bin/our_test_add_server + +The adminstrative domain will direct traffic based on the current RPC policies. +In dom0, create a file at `/etc/qubes-rpc/policy/test.Add` containing the following: + + $anyvm $anyvm ask + +This will allow our client and server to communicate. Before we make the call, ensure that the client and server scripts have executable permissions. -Now, invoke the RPC service! +Finally, invoke the RPC service. - qrexec-client-vm anotherVM test.Add /usr/bin/our_test_add_client 1 2 + $ qrexec-client-vm anotherVM test.Add /usr/bin/our_test_add_client 1 2 We should get "3" as answer. (dom0 will ask for confirmation first.)