Index: univention-dvs-node/debian/changelog =================================================================== --- univention-dvs-node/debian/changelog (Revision 20497) +++ univention-dvs-node/debian/changelog (Arbeitskopie) @@ -1,3 +1,9 @@ +univention-dvs-node (1.0.30-11) unstable; urgency=low + + * Make templates read-only (Bug #20454) + + -- Philipp Hahn Wed, 20 Oct 2010 20:12:18 +0200 + univention-dvs-node (1.0.30-10) unstable; urgency=low * Fix dm-cow support (Bug #18765) Index: univention-dvs-node/univention-dvs-template-create =================================================================== --- univention-dvs-node/univention-dvs-template-create (Revision 20475) +++ univention-dvs-node/univention-dvs-template-create (Arbeitskopie) @@ -78,9 +78,11 @@ def save( self ): """Dump description of VM to directory.""" - fd = open( os.path.join( self.object[ 'path' ], 'description.pickle' ), 'wb' ) + path = os.path.join(self.object['path'], 'description.pickle') + fd = open(path, 'wb') pickle.dump( self.domain, fd ) fd.close() + os.chmod(path, 0440) # Bug 20454 self.object[ 'available' ] = 'TRUE' self.object.modify() @@ -125,6 +127,7 @@ ud.debug( ud.ADMIN, ud.INFO, 'move: %s -> %s' % ( disk.source, dest ) ) if restore: restore_disks.append( ( dest, disk.source ) ) + os.chmod(dest, 0440) # Bug 20454 disk.source = dest self.object[ 'path' ] = path Index: univention-dvs-node/univention-dvs-create-desktop =================================================================== --- univention-dvs-node/univention-dvs-create-desktop (Revision 20497) +++ univention-dvs-node/univention-dvs-create-desktop (Arbeitskopie) @@ -140,7 +140,7 @@ p.wait() if p.returncode != 0: raise StorageException("Failed to copy template %s to %s" % (origPath, diskPath)) + os.chmod(diskPath, 0640) disk.source = diskPath debug(1, 'Using image: %s' % disk.source) i += 1