Univention Bugzilla – Attachment 2770 Details for
Bug 20454
Vorlagen schreibschützen
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Make templates read-only
20454_dvs_ro2.diff (text/plain), 1.93 KB, created by
Philipp Hahn
on 2010-10-20 20:30:33 CEST
(
hide
)
Description:
Make templates read-only
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2010-10-20 20:30:33 CEST
Size:
1.93 KB
patch
obsolete
>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 <hahn@univention.de> 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 20454
:
2767
| 2770