Skip to content

Commit

Permalink
Update policy format
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-grande committed Jun 2, 2024
1 parent 2216488 commit 585a6c1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 --
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
14 changes: 14 additions & 0 deletions qubes-rpc/policies/90-default-video-companion.policy
Original file line number Diff line number Diff line change
@@ -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
5 changes: 0 additions & 5 deletions qubes-rpc/policies/qvc.ScreenShare

This file was deleted.

4 changes: 0 additions & 4 deletions qubes-rpc/policies/qvc.Webcam

This file was deleted.

3 changes: 1 addition & 2 deletions rpm_spec/qubes-video-companion-dom0.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 585a6c1

Please sign in to comment.