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:
05af3a3
)
Disallow header restore if context is nonLUKS device.
author
Milan Broz
<gmazyland@gmail.com>
Fri, 7 Dec 2012 14:55:56 +0000
(15:55 +0100)
committer
Milan Broz
<gmazyland@gmail.com>
Fri, 7 Dec 2012 14:55:56 +0000
(15:55 +0100)
lib/setup.c
patch
|
blob
|
history
diff --git
a/lib/setup.c
b/lib/setup.c
index
992f3c4
..
cf4d260
100644
(file)
--- a/
lib/setup.c
+++ b/
lib/setup.c
@@
-1380,6
+1380,9
@@
int crypt_header_restore(struct crypt_device *cd,
if (requested_type && !isLUKS(requested_type))
return -EINVAL;
+ if (cd->type && !isLUKS(cd->type))
+ return -EINVAL;
+
r = init_crypto(cd);
if (r < 0)
return r;