From 7317cc571d8ab4e79675c42c3787e70b8a13df0e Mon Sep 17 00:00:00 2001 From: frisco <> Date: Mon, 29 Jun 2009 09:32:38 +0000 Subject: [PATCH] Removed DHCP box in Network plugin; workaround for "device cache" issue when formatting LUKS volume; started to update hard-coded release version numbers --- staging-v0.3.5/plugins/network/form_network.cs | 4 ++-- staging-v0.3.5/setup.py | 6 +++--- staging-v0.3.5/src/cryptobox/core/container.py | 18 +++++++++++++++++- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/staging-v0.3.5/plugins/network/form_network.cs b/staging-v0.3.5/plugins/network/form_network.cs index 126a114..69b26a8 100644 --- a/staging-v0.3.5/plugins/network/form_network.cs +++ b/staging-v0.3.5/plugins/network/form_network.cs @@ -81,7 +81,7 @@

- + diff --git a/staging-v0.3.5/setup.py b/staging-v0.3.5/setup.py index fd240df..5b1a6a1 100644 --- a/staging-v0.3.5/setup.py +++ b/staging-v0.3.5/setup.py @@ -113,14 +113,14 @@ def compile_po_file(po_file): setup( name = 'cryptobox-server', - version = '0.3.0', + version = '0.3.5', description = 'webinterface for handling encrypted disks', author = 'Sense.Lab e.V.', - author_email = 'info@cryptobox.org', + author_email = 'info@cryptonas.org', maintainer = 'Lars Kruse', maintainer_email = 'devel@sumpfralle.de', license = 'GPL', - url = 'http://cryptobox.org', + url = 'http://cryptonas.org', packages = [ 'cryptobox', 'cryptobox.core', 'cryptobox.web', 'cryptobox.plugins', 'cryptobox.tests' ], data_files = getdatafiles(datadir, ['templates', 'www-data', 'plugins']) + diff --git a/staging-v0.3.5/src/cryptobox/core/container.py b/staging-v0.3.5/src/cryptobox/core/container.py index 2d17d6e..d7cb021 100644 --- a/staging-v0.3.5/src/cryptobox/core/container.py +++ b/staging-v0.3.5/src/cryptobox/core/container.py @@ -408,8 +408,24 @@ class CryptoBoxContainer: if self.device.is_luks(): ## luks devices need special care ... if self.device.holders: - return cryptobox.core.blockdevice.get_blockdevice( + ##Note: This is a hack for the CryptoNAS v0.3.5 release. + ##There are undoubtedly latent bugs in the device-info + ##cache implementation in CryptoNAS which are probably + ##causing this. Since the format operation has already + ##occurred by the time this exception gets triggered, + ##it is safe to ignore in this limited case and when + ##there is no possibility of a "Manual Format" operation + ##occurring under CryptoNAS's control. Major changes/fixes + ##to the device-info caching and block device handling + ##code have already been made in the 0.4 code branch, so + ##this is probably not worth investigating further here. + try: + theTypeId = cryptobox.core.blockdevice.get_blockdevice( self.device.holders[0]).type_id + return theTypeId + except IndexError: + self.cbox.log.debug("CryptoNAS thinks the device %s does not exist. This is probably due to out of date device cache information right after a format operation." % self.device.holders[0]) + return None else: ## the encrypted container is not open return None