Allow creating TCP sockets between qubes

QubesOS/qubes-issues#2148
This commit is contained in:
Frédéric Pierret (fepitre) 2019-08-08 15:10:52 +02:00
parent f2e2db5def
commit e27296da3c
No known key found for this signature in database
GPG Key ID: 484010B5CDC576E2
4 changed files with 13 additions and 0 deletions

View File

@ -281,6 +281,7 @@ install-common: install-doc
install -m 0755 qubes-rpc/qubes.PostInstall $(DESTDIR)/etc/qubes-rpc 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.GetDate $(DESTDIR)/etc/qubes-rpc
install -m 0755 qubes-rpc/qubes.ShowInTerminal $(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 -d $(DESTDIR)/etc/qubes/rpc-config
for config in qubes-rpc/*.config; do \ for config in qubes-rpc/*.config; do \
install -m 0644 $$config $(DESTDIR)/etc/qubes/rpc-config/`basename $$config .config`; \ install -m 0644 $$config $(DESTDIR)/etc/qubes/rpc-config/`basename $$config .config`; \

View File

@ -28,6 +28,7 @@ etc/qubes-rpc/qubes.SuspendPost
etc/qubes-rpc/qubes.SuspendPostAll etc/qubes-rpc/qubes.SuspendPostAll
etc/qubes-rpc/qubes.SuspendPre etc/qubes-rpc/qubes.SuspendPre
etc/qubes-rpc/qubes.SuspendPreAll etc/qubes-rpc/qubes.SuspendPreAll
etc/qubes-rpc/qubes.ConnectTCP
etc/qubes-rpc/qubes.VMShell etc/qubes-rpc/qubes.VMShell
etc/qubes-rpc/qubes.VMRootShell etc/qubes-rpc/qubes.VMRootShell
etc/qubes-rpc/qubes.WaitForSession etc/qubes-rpc/qubes.WaitForSession

View File

@ -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

View File

@ -549,6 +549,7 @@ rm -f %{name}-%{version}
%config(noreplace) /etc/qubes-rpc/qubes.OpenInVM %config(noreplace) /etc/qubes-rpc/qubes.OpenInVM
%config(noreplace) /etc/qubes-rpc/qubes.OpenURL %config(noreplace) /etc/qubes-rpc/qubes.OpenURL
%config(noreplace) /etc/qubes-rpc/qubes.GetAppmenus %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.VMShell
%config(noreplace) /etc/qubes-rpc/qubes.VMRootShell %config(noreplace) /etc/qubes-rpc/qubes.VMRootShell
%config(noreplace) /etc/qubes-rpc/qubes.SuspendPre %config(noreplace) /etc/qubes-rpc/qubes.SuspendPre