]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
commitefcc7ae2c9172d9a7ae94afdaf066a7abf0b9a90
treefbaef3000dea4cc606671055f08f2272c5025d77
parentd293c3e4e07334d761c88df9d68b3aa800a83dd9
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