]> asedeno.scripts.mit.edu Git - linux.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)
commit94b26f3672a0e41025104c7e46943917544e1c87
tree89c19235e098d8f71662a23992c1800a8681b44f
parent0ea87a9644ebb5c9a3b100585d10533366de3269
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