]> git.baikalelectronics.ru Git - kernel.git/commit
fscrypt: new helper function - fscrypt_file_open()
authorEric Biggers <ebiggers@google.com>
Mon, 9 Oct 2017 19:15:40 +0000 (12:15 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 18 Oct 2017 23:52:37 +0000 (19:52 -0400)
commitd4d5d8e8d7acde96896c77673a2c265fca801cf3
treefbaef3000dea4cc606671055f08f2272c5025d77
parentc872af2764494cbd80694a92649f1b79dac4028e
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