diff --git a/Makefile b/Makefile index 42b2f35d..1fbe3699 100644 --- a/Makefile +++ b/Makefile @@ -193,6 +193,7 @@ endif cp qubes-rpc/qubes.GetRandomizedTime $(DESTDIR)/etc/qubes-rpc/ cp qubes-rpc/qubes.NotifyTools $(DESTDIR)/etc/qubes-rpc/ cp qubes-rpc/qubes.NotifyUpdates $(DESTDIR)/etc/qubes-rpc/ + cp qubes-rpc/qubes.ConnectTCP $(DESTDIR)/etc/qubes-rpc/ install qubes-rpc/qubesd-query-fast $(DESTDIR)/usr/libexec/qubes/ install -m 0755 qvm-tools/qubes-bug-report $(DESTDIR)/usr/bin/qubes-bug-report install -m 0755 qvm-tools/qubes-hcl-report $(DESTDIR)/usr/bin/qubes-hcl-report diff --git a/qubes-rpc/qubes.ConnectTCP b/qubes-rpc/qubes.ConnectTCP new file mode 100644 index 00000000..c9493d8b --- /dev/null +++ b/qubes-rpc/qubes.ConnectTCP @@ -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 diff --git a/rpm_spec/core-dom0.spec.in b/rpm_spec/core-dom0.spec.in index 666b1d2c..0962db40 100644 --- a/rpm_spec/core-dom0.spec.in +++ b/rpm_spec/core-dom0.spec.in @@ -406,6 +406,7 @@ fi /etc/qubes-rpc/qubes.GetRandomizedTime /etc/qubes-rpc/qubes.NotifyTools /etc/qubes-rpc/qubes.NotifyUpdates +/etc/qubes-rpc/qubes.ConnectTCP %attr(2770,root,qubes) %dir /var/log/qubes %attr(0770,root,qubes) %dir /var/run/qubes