Skip to content

Commit

Permalink
Allow creating TCP sockets between qubes
Browse files Browse the repository at this point in the history
QubesOS/qubes-issues#2148

(cherry picked from commit e27296d)
  • Loading branch information
fepitre authored and marmarek committed Sep 7, 2019
1 parent e2aa0d2 commit 5364885
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ install-common: install-doc
install -m 0755 qubes-rpc/qubes.PostInstall $(DESTDIR)/etc/qubes-rpc
install -m 0755 qubes-rpc/qubes.GetDate $(DESTDIR)/etc/qubes-rpc
install -m 0755 qubes-rpc/qubes.ShowInTerminal $(DESTDIR)/etc/qubes-rpc
install -m 0755 qubes-rpc/qubes.ConnectTCP $(DESTDIR)/etc/qubes-rpc
install -d $(DESTDIR)/etc/qubes/rpc-config
install -m 0644 qubes-rpc/rpc-config.README $(DESTDIR)/etc/qubes/rpc-config/README
for config in qubes-rpc/*.config; do \
Expand Down
1 change: 1 addition & 0 deletions debian/qubes-core-agent.install
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ etc/qubes-rpc/qubes.SuspendPost
etc/qubes-rpc/qubes.SuspendPostAll
etc/qubes-rpc/qubes.SuspendPre
etc/qubes-rpc/qubes.SuspendPreAll
etc/qubes-rpc/qubes.ConnectTCP
etc/qubes-rpc/qubes.VMShell
etc/qubes-rpc/qubes.VMRootShell
etc/qubes-rpc/qubes.WaitForSession
Expand Down
10 changes: 10 additions & 0 deletions qubes-rpc/qubes.ConnectTCP
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
PORT="$1"
[[ -z "$PORT" ]] && { echo "Please provide PORT"; exit 1; };

if [[ "$PORT" -ge 1 ]] && [[ "$PORT" -le 65535 ]]; then
socat STDIO TCP:localhost:"$PORT"
else
echo "Invalid port provided"
exit 1
fi
1 change: 1 addition & 0 deletions rpm_spec/core-agent.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ rm -f %{name}-%{version}
%config(noreplace) /etc/qubes-rpc/qubes.OpenInVM
%config(noreplace) /etc/qubes-rpc/qubes.OpenURL
%config(noreplace) /etc/qubes-rpc/qubes.GetAppmenus
%config(noreplace) /etc/qubes-rpc/qubes.ConnectTCP
%config(noreplace) /etc/qubes-rpc/qubes.VMShell
%config(noreplace) /etc/qubes-rpc/qubes.VMRootShell
%config(noreplace) /etc/qubes-rpc/qubes.SuspendPre
Expand Down

0 comments on commit 5364885

Please sign in to comment.