diff options
author | Eric Biggers <ebiggers@google.com> | 2022-05-01 07:08:53 +0200 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2022-05-10 01:18:54 +0200 |
commit | bfb9700bdf35417454a9bb8b67221d89d7c6e75a (patch) | |
tree | f9644b43e0dee61186f19064ad432b0341ae5ef9 /fs/crypto/fscrypt_private.h | |
parent | fscrypt: log when starting to use inline encryption (diff) | |
download | linux-bfb9700bdf35417454a9bb8b67221d89d7c6e75a.tar.xz linux-bfb9700bdf35417454a9bb8b67221d89d7c6e75a.zip |
fscrypt: factor out fscrypt_policy_to_key_spec()
Factor out a function that builds the fscrypt_key_specifier for an
fscrypt_policy. Before this was only needed when finding the key for a
file, but now it will also be needed for test_dummy_encryption support.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20220501050857.538984-4-ebiggers@kernel.org
Diffstat (limited to 'fs/crypto/fscrypt_private.h')
-rw-r--r-- | fs/crypto/fscrypt_private.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/crypto/fscrypt_private.h b/fs/crypto/fscrypt_private.h index 33f08f1b1974..7c93325161b0 100644 --- a/fs/crypto/fscrypt_private.h +++ b/fs/crypto/fscrypt_private.h @@ -623,6 +623,8 @@ int fscrypt_setup_v1_file_key_via_subscribed_keyrings(struct fscrypt_info *ci); bool fscrypt_policies_equal(const union fscrypt_policy *policy1, const union fscrypt_policy *policy2); +int fscrypt_policy_to_key_spec(const union fscrypt_policy *policy, + struct fscrypt_key_specifier *key_spec); bool fscrypt_supported_policy(const union fscrypt_policy *policy_u, const struct inode *inode); int fscrypt_policy_from_context(union fscrypt_policy *policy_u, |