Skip to content

Commit

Permalink
Fixes #205 install libreoffice for sd-svs-disp template
Browse files Browse the repository at this point in the history
  • Loading branch information
kushaldas committed May 29, 2019
1 parent da120c4 commit ad290bb
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
20 changes: 20 additions & 0 deletions dom0/sd-svs-disp-files.sls
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,23 @@ sd-svs-disp-install-mimetype-handler-package:
- securedrop-workstation-svs-disp
- require:
- sls: fpf-apt-test-repo

sd-svs-disp-template-copy-libre-command:
file.managed:
- name: /usr/sbin/install-enable-libreoffice
- source: salt://sd/sd-svs/install-enable-libreoffice
- user: root
- group: root
- mode: 700

sd-svs-disp-template-libreoffice-grsec:
file.blockreplace:
- name: /etc/paxctld.conf
- append_if_not_found: True
- marker_start: "### BEGIN securedrop-workstation ###"
- marker_end: "### END securedrop-workstation ###"
- content: '/usr/lib/libreoffice/program/soffice.bin m'

sd-svs-disp-install-libreoffice:
cmd.run:
- name: '/usr/sbin/install-enable-libreoffice'
6 changes: 6 additions & 0 deletions sd-svs/install-enable-libreoffice
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
apt-get update
apt-get install libreoffice -y
service paxctld restart
apt-get install libreoffice -y
service paxctld restart
6 changes: 6 additions & 0 deletions tests/test_svs.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ def test_sd_client_package_installed(self):
pkg = "securedrop-workstation-svs-disp"
self.assertTrue(self._package_is_installed(pkg))

def test_sd_svs_libreoffice_installed(self):
self.assertTrue(self._package_is_installed("libreoffice"))

#def test_sd_svs_grsec_line(self):
# line = "/usr/lib/libreoffice/program/soffice.bin m"
# self.assertFileHasLine("/etc/paxctld.conf", line)

def load_tests(loader, tests, pattern):
suite = unittest.TestLoader().loadTestsFromTestCase(SD_SVS_Tests)
Expand Down

0 comments on commit ad290bb

Please sign in to comment.