projects
/
platform
/
upstream
/
cryptsetup.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
104130c
)
Do not allow crypt_load() on already initialised context.
author
Milan Broz
<gmazyland@gmail.com>
Mon, 15 Aug 2011 16:32:36 +0000
(16:32 +0000)
committer
Milan Broz
<gmazyland@gmail.com>
Mon, 15 Aug 2011 16:32:36 +0000
(16:32 +0000)
Signed-off-by: Ondrej Kozina <okozina@redhat.com>
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@596
36d66b0a
-2a48-0410-832c-
cd162a569da5
lib/setup.c
patch
|
blob
|
history
diff --git
a/lib/setup.c
b/lib/setup.c
index
a69a5ff
..
c61d066
100644
(file)
--- a/
lib/setup.c
+++ b/
lib/setup.c
@@
-860,6
+860,11
@@
int crypt_load(struct crypt_device *cd,
if (requested_type && !isLUKS(requested_type))
return -EINVAL;
+ if (cd->type && !isLUKS(cd->type)) {
+ log_dbg("Context is already initialised to type %s", cd->type);
+ return -EINVAL;
+ }
+
r = init_crypto(cd);
if (r < 0)
return r;