summaryrefslogtreecommitdiffstats
path: root/fs/crypto/fscrypt_private.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2022-04-30 22:08:53 -0700
committerEric Biggers <ebiggers@google.com>2022-05-09 16:18:54 -0700
commitbfb9700bdf35417454a9bb8b67221d89d7c6e75a (patch)
treef9644b43e0dee61186f19064ad432b0341ae5ef9 /fs/crypto/fscrypt_private.h
parenta7a5bc5fe8acc9381e38a34ef18f1115c5c22079 (diff)
downloadlinux-bfb9700bdf35417454a9bb8b67221d89d7c6e75a.tar.gz
linux-bfb9700bdf35417454a9bb8b67221d89d7c6e75a.tar.bz2
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.h2
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,