FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 02-01-2008, 06:04 PM
David Lehman
 
Default Allow creation of LUKSDevice with no passphrase.

The hack in getScheme for autopart causes a traceback if a LUKSdevice is created without a passphrase, which is something that makes sense to do when discovering existing devices. So we just use the "scheme" data member internally as a workaround.

Also, make sure all return values from openDevice are numeric.
---
cryptodev.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cryptodev.py b/cryptodev.py
index 39f3fd9..2cd14d7 100644
--- a/cryptodev.py
+++ b/cryptodev.py
@@ -64,7 +64,7 @@ class LUKSDevice:
def setDevice(self, device):
self._device = device
if device is not None:
- name = "%s-%s" % (self.getScheme().lower(),
+ name = "%s-%s" % (self.scheme.lower(),
os.path.basename(device))
self.setName(name)

@@ -149,7 +149,7 @@ class LUKSDevice:
def openDevice(self):
if not self.getStatus():
# already mapped
- return
+ return 0

if not self.passphrase:
raise RuntimeError, "Cannot create mapping without a passphrase."
--
1.5.3.7

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 04:14 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org