View | Details | Raw Unified | Return to bug 20454 | Differences between
and this patch

Collapse All | Expand All

(-)univention-dvs-node/debian/changelog (+6 lines)
Lines 1-3 Link Here
1
univention-dvs-node (1.0.30-11) unstable; urgency=low
2
3
  * Make templates read-only (Bug #20454)
4
5
 -- Philipp Hahn <hahn@univention.de>  Wed, 20 Oct 2010 20:12:18 +0200
6
1
univention-dvs-node (1.0.30-10) unstable; urgency=low
7
univention-dvs-node (1.0.30-10) unstable; urgency=low
2
8
3
  * Fix dm-cow support (Bug #18765)
9
  * Fix dm-cow support (Bug #18765)
(-)univention-dvs-node/univention-dvs-template-create (-1 / +4 lines)
Lines 78-86 Link Here
78
78
79
	def save( self ):
79
	def save( self ):
80
		"""Dump description of VM to directory."""
80
		"""Dump description of VM to directory."""
81
		fd = open( os.path.join( self.object[ 'path' ], 'description.pickle' ), 'wb' )
81
		path = os.path.join(self.object['path'], 'description.pickle')
82
		fd = open(path, 'wb')
82
		pickle.dump( self.domain, fd )
83
		pickle.dump( self.domain, fd )
83
		fd.close()
84
		fd.close()
85
		os.chmod(path, 0440) # Bug 20454
84
		self.object[ 'available' ] = 'TRUE'
86
		self.object[ 'available' ] = 'TRUE'
85
		self.object.modify()
87
		self.object.modify()
86
88
Lines 125-130 Link Here
125
				ud.debug( ud.ADMIN, ud.INFO, 'move: %s -> %s' % ( disk.source, dest ) )
127
				ud.debug( ud.ADMIN, ud.INFO, 'move: %s -> %s' % ( disk.source, dest ) )
126
				if restore:
128
				if restore:
127
					restore_disks.append( ( dest, disk.source ) )
129
					restore_disks.append( ( dest, disk.source ) )
130
				os.chmod(dest, 0440) # Bug 20454
128
				disk.source = dest
131
				disk.source = dest
129
132
130
		self.object[ 'path' ] = path
133
		self.object[ 'path' ] = path
(-)univention-dvs-node/univention-dvs-create-desktop (+1 lines)
Lines 140-146 Link Here
140
			p.wait()
140
			p.wait()
141
			if p.returncode != 0:
141
			if p.returncode != 0:
142
				raise StorageException("Failed to copy template %s to %s" % (origPath, diskPath))
142
				raise StorageException("Failed to copy template %s to %s" % (origPath, diskPath))
143
			os.chmod(diskPath, 0640)
143
			disk.source = diskPath
144
			disk.source = diskPath
144
			debug(1, 'Using image: %s' % disk.source)
145
			debug(1, 'Using image: %s' % disk.source)
145
			i += 1
146
			i += 1

Return to bug 20454