Merge remote-tracking branch 'origin/pr/279'
* origin/pr/279: Add qubes.ConnectTCP RPC for allowing dom0 sockets binding qubes-rpc: add qubes.ConnectTCP
This commit is contained in:
commit
46ad75a3ba
2
Makefile
2
Makefile
@ -185,6 +185,7 @@ endif
|
||||
cp qubes-rpc-policy/qubes.VMShell.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.VMShell
|
||||
cp qubes-rpc-policy/qubes.UpdatesProxy.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.UpdatesProxy
|
||||
cp qubes-rpc-policy/qubes.GetDate.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.GetDate
|
||||
cp qubes-rpc-policy/qubes.ConnectTCP.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.ConnectTCP
|
||||
cp qubes-rpc-policy/admin.vm.Console.policy $(DESTDIR)/etc/qubes-rpc/policy/admin.vm.Console
|
||||
cp qubes-rpc-policy/policy.RegisterArgument.policy $(DESTDIR)/etc/qubes-rpc/policy/policy.RegisterArgument
|
||||
cp qubes-rpc/qubes.FeaturesRequest $(DESTDIR)/etc/qubes-rpc/
|
||||
@ -192,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
|
||||
|
10
qubes-rpc-policy/qubes.ConnectTCP.policy
Normal file
10
qubes-rpc-policy/qubes.ConnectTCP.policy
Normal file
@ -0,0 +1,10 @@
|
||||
## Note that policy parsing stops at the first match,
|
||||
## so adding anything below "$anyvm $anyvm action" line will have no effect
|
||||
|
||||
## Please use a single # to start your custom comments
|
||||
|
||||
# WARNING: The qubes.ConnectTCP service is dangerous and allows any
|
||||
# qube to access any other qube TCP port. It should be restricted
|
||||
# only to restricted qubes. This is why the default policy is 'deny'
|
||||
|
||||
# Example of policy: mytcp-client @default allow,target=mytcp-server
|
10
qubes-rpc/qubes.ConnectTCP
Normal file
10
qubes-rpc/qubes.ConnectTCP
Normal 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
|
@ -388,6 +388,7 @@ fi
|
||||
%attr(0664,root,qubes) %config(noreplace) /etc/qubes-rpc/policy/include/admin-local-rwx
|
||||
%attr(0664,root,qubes) %config(noreplace) /etc/qubes-rpc/policy/include/admin-global-ro
|
||||
%attr(0664,root,qubes) %config(noreplace) /etc/qubes-rpc/policy/include/admin-global-rwx
|
||||
%attr(0664,root,qubes) %config(noreplace) /etc/qubes-rpc/policy/qubes.ConnectTCP
|
||||
%attr(0664,root,qubes) %config(noreplace) /etc/qubes-rpc/policy/qubes.FeaturesRequest
|
||||
%attr(0664,root,qubes) %config(noreplace) /etc/qubes-rpc/policy/qubes.Filecopy
|
||||
%attr(0664,root,qubes) %config(noreplace) /etc/qubes-rpc/policy/qubes.GetImageRGBA
|
||||
@ -408,6 +409,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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user