Merge "vold: drop local fscrypt UAPI definitions" am: 47425d05a9
am: 83a3eecc03
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1365221 Change-Id: Iffa50e4c549469de6425134369e609856f1d7813
This commit is contained in:
commit
6b36554b38
2 changed files with 1 additions and 29 deletions
|
@ -30,7 +30,6 @@
|
|||
#include <android-base/properties.h>
|
||||
#include <keyutils.h>
|
||||
|
||||
#include <fscrypt_uapi.h>
|
||||
#include "KeyStorage.h"
|
||||
#include "Utils.h"
|
||||
|
||||
|
@ -245,7 +244,7 @@ static bool buildKeySpecifier(fscrypt_key_specifier* spec, const EncryptionPolic
|
|||
// https://www.kernel.org/doc/html/latest/filesystems/fscrypt.html#fs-ioc-add-encryption-key
|
||||
static bool installFsKeyringKey(const std::string& mountpoint, const EncryptionOptions& options,
|
||||
fscrypt_add_key_arg* arg) {
|
||||
if (options.use_hw_wrapped_key) arg->flags |= FSCRYPT_ADD_KEY_FLAG_WRAPPED;
|
||||
if (options.use_hw_wrapped_key) arg->__flags |= __FSCRYPT_ADD_KEY_FLAG_HW_WRAPPED;
|
||||
|
||||
android::base::unique_fd fd(open(mountpoint.c_str(), O_RDONLY | O_DIRECTORY | O_CLOEXEC));
|
||||
if (fd == -1) {
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
#ifndef _UAPI_LINUX_FSCRYPT_VOLD_H
|
||||
#define _UAPI_LINUX_FSCRYPT_VOLD_H
|
||||
|
||||
#include <linux/fscrypt.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#define FSCRYPT_ADD_KEY_FLAG_WRAPPED 0x01
|
||||
|
||||
struct sys_fscrypt_add_key_arg {
|
||||
struct fscrypt_key_specifier key_spec;
|
||||
__u32 raw_size;
|
||||
__u32 key_id;
|
||||
__u32 __reserved[7];
|
||||
__u32 flags;
|
||||
__u8 raw[];
|
||||
};
|
||||
|
||||
struct sys_fscrypt_provisioning_key_payload {
|
||||
__u32 type;
|
||||
__u32 __reserved;
|
||||
__u8 raw[];
|
||||
};
|
||||
|
||||
#define fscrypt_add_key_arg sys_fscrypt_add_key_arg
|
||||
#define fscrypt_provisioning_key_payload sys_fscrypt_provisioning_key_payload
|
||||
|
||||
#endif //_UAPI_LINUX_FSCRYPT_VOLD_H
|
Loading…
Reference in a new issue