diff --git a/Makefile b/Makefile index bb074f1..4b19e35 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,8 @@ PKGNAME = qubes-video-companion BINDIR ?= /usr/bin DATADIR ?= /usr/share SYSCONFDIR ?= /etc -QREXECDIR ?= $(SYSCONFDIR)/qubes-rpc +QREXECSERVICEDIR ?= $(SYSCONFDIR)/qubes-rpc +QREXECPOLICYDIR ?= $(SYSCONFDIR)/qubes/policy.d PYTHON ?= python3 INSTALL_DIR = install -d -- @@ -47,8 +48,8 @@ install-vm: install-both install-dom0: install-both install-policy install-tests install-both: - $(INSTALL_DIR) $(DESTDIR)$(QREXECDIR) - $(INSTALL_PROGRAM) qubes-rpc/services/qvc.Webcam qubes-rpc/services/qvc.ScreenShare $(DESTDIR)$(QREXECDIR) + $(INSTALL_DIR) $(DESTDIR)$(QREXECSERVICEDIR) + $(INSTALL_PROGRAM) qubes-rpc/services/qvc.Webcam qubes-rpc/services/qvc.ScreenShare $(DESTDIR)$(QREXECSERVICEDIR) $(INSTALL_DIR) $(DESTDIR)$(DATADIR)/$(PKGNAME)/sender $(INSTALL_PROGRAM) sender/*.py $(DESTDIR)$(DATADIR)/$(PKGNAME)/sender $(INSTALL_DIR) $(DESTDIR)$(DATADIR)/doc/$(PKGNAME) @@ -57,8 +58,8 @@ install-both: $(INSTALL_DATA) doc/visualizations/* $(DESTDIR)$(DATADIR)/doc/$(PKGNAME)/visualizations install-policy: - $(INSTALL_DIR) $(DESTDIR)$(QREXECDIR)/policy - $(INSTALL_DATA) qubes-rpc/policies/* $(DESTDIR)$(QREXECDIR)/policy + $(INSTALL_DIR) $(DESTDIR)$(QREXECPOLICYDIR) + $(INSTALL_DATA) qubes-rpc/policies/* $(DESTDIR)$(QREXECPOLICYDIR) install-tests: cd tests && $(PYTHON) setup.py install -O1 --root $(DESTDIR) diff --git a/qubes-rpc/policies/90-default-video-companion.policy b/qubes-rpc/policies/90-default-video-companion.policy new file mode 100644 index 0000000..6fc3261 --- /dev/null +++ b/qubes-rpc/policies/90-default-video-companion.policy @@ -0,0 +1,14 @@ +## Do not modify this file, create a new policy file with a lower number in the +## filename instead. For example `30-user.policy`. + +### +### Policy Qubes Video Companion policy +### + +qvc.ScreenShare * @anyvm @dispvm allow +qvc.ScreenShare * @anyvm @adminvm ask +qvc.ScreenShare * @anyvm @anyvm ask + +qvc.Webcam * @anyvm @adminvm ask +qvc.Webcam * @anyvm @default ask +qvc.Webcam * @anyvm sys-usb ask diff --git a/qubes-rpc/policies/qvc.ScreenShare b/qubes-rpc/policies/qvc.ScreenShare deleted file mode 100644 index c678a4a..0000000 --- a/qubes-rpc/policies/qvc.ScreenShare +++ /dev/null @@ -1,5 +0,0 @@ -# Policy for Qubes Video Companion, R4.0 syntax -@anyvm @dispvm allow -@anyvm @default ask -@anyvm @anyvm ask -@anyvm dom0 ask diff --git a/qubes-rpc/policies/qvc.Webcam b/qubes-rpc/policies/qvc.Webcam deleted file mode 100644 index aaa03bd..0000000 --- a/qubes-rpc/policies/qvc.Webcam +++ /dev/null @@ -1,4 +0,0 @@ -# Policy for Qubes Video Companion, R4.0 syntax -@anyvm @default ask -@anyvm sys-usb ask -@anyvm dom0 ask diff --git a/rpm_spec/qubes-video-companion-dom0.spec.in b/rpm_spec/qubes-video-companion-dom0.spec.in index 96a90e1..d651f12 100644 --- a/rpm_spec/qubes-video-companion-dom0.spec.in +++ b/rpm_spec/qubes-video-companion-dom0.spec.in @@ -59,8 +59,7 @@ make DESTDIR=%{?buildroot} install-dom0 install-license %{_docdir}/qubes-video-companion/visualizations/* %{_sysconfdir}/qubes-rpc/qvc.Webcam %{_sysconfdir}/qubes-rpc/qvc.ScreenShare -%{_sysconfdir}/qubes-rpc/policy/qvc.Webcam -%{_sysconfdir}/qubes-rpc/policy/qvc.ScreenShare +%{_sysconfdir}/qubes/policy.d/90-default-video-companion.policy %{_datadir}/qubes-video-companion/sender/service.py %{_datadir}/qubes-video-companion/sender/webcam.py %{_datadir}/qubes-video-companion/sender/screenshare.py