fscrypt: new helper function - fscrypt_file_open()
authorEric Biggers <ebiggers@google.com>
Mon, 9 Oct 2017 19:15:40 +0000 (12:15 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 5 Jan 2018 00:17:31 +0000 (16:17 -0800)
commitb811faac637155e7ec5cbf71405ce3da1d4085f1
treeb490696a8caf35dc7ffa857b67ad1c4ecc72d531
parente9f57e3771bafce19576f518f57df38ab5fac94a
fscrypt: new helper function - fscrypt_file_open()

Add a helper function which prepares to open a regular file which may be
encrypted.  It handles setting up the file's encryption key, then
checking that the file's encryption policy matches that of its parent
directory (if the parent directory is encrypted).  It may be set as the
->open() method or it can be called from another ->open() method.

Acked-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/crypto/Makefile
fs/crypto/hooks.c [new file with mode: 0644]
include/linux/fscrypt_notsupp.h
include/linux/fscrypt_supp.h