Introduce ro.crypto.uses_fs_ioc_add_encryption_key property

Bug: 154327249
Test: adb shell getprop ro.crypto.uses_fs_ioc_add_encryption_key
Test: adb bugreport && checked content contains new property
Change-Id: I562df49deffdccdb2cfd657130fc05b24d40a6a6
This commit is contained in:
Nikita Ioffe 2020-04-20 22:21:49 +01:00
parent e9239f757e
commit 78f806198f

View file

@ -27,6 +27,7 @@
#include <android-base/file.h>
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <keyutils.h>
#include <fscrypt_uapi.h>
@ -87,6 +88,7 @@ bool isFsKeyringSupported(void) {
}
LOG(DEBUG) << "Detected support for FS_IOC_ADD_ENCRYPTION_KEY";
supported = true;
android::base::SetProperty("ro.crypto.uses_fs_ioc_add_encryption_key", "true");
}
// There's no need to check for FS_IOC_REMOVE_ENCRYPTION_KEY, since it's
// guaranteed to be available if FS_IOC_ADD_ENCRYPTION_KEY is. There's