chiark / gitweb /
buildserver: /vagrant/cache writeable only by root
authorHans-Christoph Steiner <hans@eds.org>
Wed, 15 Jun 2016 10:47:16 +0000 (12:47 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Wed, 15 Jun 2016 14:35:00 +0000 (16:35 +0200)
Prevent build processes from modifying the cache, it is only needed
during provisioning anyway. A malicious build could still use sudo to
change the cache, but this is more to prevent mistaken modifications.

makebuildserver

index d44e559d9b8ebd41e448b256acafc17c06dc6146..0f5cb86e54f6caec9f8b9cf9c0c57ca82386d01b 100755 (executable)
@@ -363,7 +363,8 @@ if 'aptproxy' in config and config['aptproxy']:
 # does not need a custom mount
 if cachedir != 'buildserver/cache':
     vagrantfile += """
-  config.vm.synced_folder '{0}', '/vagrant/cache'
+  config.vm.synced_folder '{0}', '/vagrant/cache',
+    owner: 'root', group: 'root', create: true
 """.format(cachedir)
 
 # cache .deb packages on the host via a mount trick