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-10) unstable; urgency=low
2
3
  * Make templates read-only (Bug #20454)
4
5
 -- Philipp Hahn <hahn@univention.de>  Wed, 20 Oct 2010 14:53:38 +0200
6
1
univention-dvs-node (1.0.30-9) unstable; urgency=low
7
univention-dvs-node (1.0.30-9) unstable; urgency=low
2
8
3
  * u-d-d-t: Import missing univention.debug (Bug #18192)
9
  * u-d-d-t: Import missing univention.debug (Bug #18192)
(-)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

Return to bug 20454