]> git.baikalelectronics.ru Git - kernel.git/commit
fscrypt: new helper function - fscrypt_prepare_rename()
authorEric Biggers <ebiggers@google.com>
Mon, 9 Oct 2017 19:15:42 +0000 (12:15 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 18 Oct 2017 23:52:38 +0000 (19:52 -0400)
commitc8a734846d7ee24444b4b8deca2aa6c6355a509a
tree89c19235e098d8f71662a23992c1800a8681b44f
parenta6736e7e8962130e7eb6080c0eb90e4f89872d9e
fscrypt: new helper function - fscrypt_prepare_rename()

Introduce a helper function which prepares to rename a file into a
possibly encrypted directory.  It handles loading the encryption keys
for the source and target directories if needed, and it handles
enforcing that if the target directory (and the source directory for a
cross-rename) is encrypted, then the file being moved into the directory
has the same encryption policy as its containing directory.

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/hooks.c
include/linux/fscrypt.h
include/linux/fscrypt_notsupp.h
include/linux/fscrypt_supp.h