Merge "vold: drop local fscrypt UAPI definitions" am: 47425d05a9 am: 83a3eecc03 am: 6b36554b38 am: cb640677a7

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1365221

Change-Id: Ie7df8fc2c5582ad23db0663d33014f86555edc1c
This commit is contained in:
Eric Biggers 2020-07-17 02:17:40 +00:00 committed by Automerger Merge Worker
commit e0ffab6cb4
2 changed files with 1 additions and 29 deletions

View file

@ -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) {

View file

@ -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