Handle cryfs inaccessible base dir

This commit is contained in:
Matéo Duparc 2023-05-11 00:02:05 +02:00
parent 2ae41f0f79
commit cdf98a7190
Signed by untrusted user: hardcoresushi
GPG Key ID: AFE384344A45E13A
2 changed files with 2 additions and 0 deletions

View File

@ -69,6 +69,7 @@ class CryfsVolume(private val fusePtr: Long): EncryptedVolume() {
result.errorStringId = when (errorCode.value) { result.errorStringId = when (errorCode.value) {
// Values from src/cryfs/impl/ErrorCodes.h // Values from src/cryfs/impl/ErrorCodes.h
11 -> R.string.wrong_password 11 -> R.string.wrong_password
16 -> R.string.inaccessible_base_dir
19 -> R.string.config_load_error 19 -> R.string.config_load_error
20 -> R.string.filesystem_id_changed 20 -> R.string.filesystem_id_changed
else -> 0 else -> 0

View File

@ -261,5 +261,6 @@
<string name="config_load_error">The configuration file cannot be loaded. Make sure the volume is accessible.</string> <string name="config_load_error">The configuration file cannot be loaded. Make sure the volume is accessible.</string>
<string name="wrong_password">The configuration file cannot be decrypted. Please check your password.</string> <string name="wrong_password">The configuration file cannot be decrypted. Please check your password.</string>
<string name="filesystem_id_changed">The filesystem id in the config file is different to the last time we opened this volume. This could mean an attacker replaced the filesystem with a different one.</string> <string name="filesystem_id_changed">The filesystem id in the config file is different to the last time we opened this volume. This could mean an attacker replaced the filesystem with a different one.</string>
<string name="inaccessible_base_dir">The volume doesn\'t exist or is inaccessible.</string>
<string name="task_failed">The task failed: %s</string> <string name="task_failed">The task failed: %s</string>
</resources> </resources>