Support for decrypted volumes

Wow! Such support! Many amaze decrypted!
...
Seriously, when the volume is in the `decrypted' state, there's no key
yet, but the metadata already are present so an NTFS reader can't mount
the volume.
This commit is contained in:
Aorimn
2014-07-20 19:54:50 +02:00
parent d476d68f46
commit 76aaa52c43
2 changed files with 12 additions and 0 deletions
+7
View File
@@ -228,9 +228,16 @@ int main(int argc, char** argv)
if(get_dataset(bl_metadata, &dataset) != TRUE)
{
xprintf(L_CRITICAL, "Unable to find a valid dataset. Abort.\n");
ret = EXIT_FAILURE;
goto FIRST_CLEAN;
}
/*
* If the state of the volume is currently decrypted, there's no key to grab
*/
if(((bitlocker_header_t*)bl_metadata)->curr_state == DECRYPTED)
goto FIRST_CLEAN;
/*
* First, get the VMK datum using either a clear key, a recovery password
* or a bek file
+5
View File
@@ -368,6 +368,11 @@ int check_state(bitlocker_header_t* metadata)
next_state
);
break;
case DECRYPTED:
xprintf(L_WARNING,
"The disk is about to get encrypted. Don't use " PROGNAME " if "
"you're willing to do so, this may corrupt your data."
);
}
return TRUE;