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 09-05-2012, 12:39 PM
Jan Safranek
 
Default Fixed luks_add_key()

On F18 with Anaconda 18.6.5, adding new passphrase to LUKS format always fails:

----> 1 fmt.addPassphrase("XYZ")

/usr/lib64/python2.7/site-packages/pyanaconda/storage/formats/luks.pyc in addPassphrase(self, passphrase)
246 passphrase=self.__passphrase,
247 key_file=self._key_file,
--> 248 new_passphrase=passphrase)
249
250 def removeKeyFromFile(self, keyfile):

/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicelibs/crypto.pyc in luks_add_key(device, new_passphrase, passphrase, key_file)
133
134 cs = CryptSetup(device=device, yesDialog = askyes, logFunc = dolog, passwordDialog = askpassphrase)
--> 135 rc = cs.addPassphrase(passphrase = passphrase, newPassphrase = new_passphrase)
136
137 if rc<0:

In recent cryptsetup-python-1.5.0-2.fc18, cs.addPassphrase was replaced
probably by cs.addKeyByPassphrase (I'm just guessing by the name). I tested it
just in my dummy applications, take it with a grain of salt.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
---

pyanaconda/storage/devicelibs/crypto.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyanaconda/storage/devicelibs/crypto.py b/pyanaconda/storage/devicelibs/crypto.py
index 35c813f..92a22a8 100644
--- a/pyanaconda/storage/devicelibs/crypto.py
+++ b/pyanaconda/storage/devicelibs/crypto.py
@@ -132,7 +132,7 @@ def luks_add_key(device,
raise ValueError("luks_add_key requires passphrase")

cs = CryptSetup(device=device, yesDialog = askyes, logFunc = dolog, passwordDialog = askpassphrase)
- rc = cs.addPassphrase(passphrase = passphrase, newPassphrase = new_passphrase)
+ rc = cs.addKeyByPassphrase(passphrase = passphrase, newPassphrase = new_passphrase)

if rc<0:
raise CryptoError("luks add key failed with errcode %d" % (rc,))

_______________________________________________
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 02:22 AM.

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