Whamcloud - gitweb
LU-14629 sec: forbid file rename from enc to unencrypted dir 04/43404/6
authorSebastien Buisson <sbuisson@ddn.com>
Thu, 22 Apr 2021 09:26:51 +0000 (11:26 +0200)
committerOleg Drokin <green@whamcloud.com>
Wed, 2 Jun 2021 17:48:33 +0000 (17:48 +0000)
commit1158386ac9c6a638f791f62e47a7513b2322772c
tree12d8d0e61b5e10ea3f4d18186772a5a77e333f12
parentb181a36dafef65df51d7eb9c7489c742a7b65ad3
LU-14629 sec: forbid file rename from enc to unencrypted dir

fscrypt allows renaming an encrypted file from an encrypted directory
into an unencrypted directory. But it leaves the file encrypted,
sitting in an unencrypted directory, which can lead to unexpected
issues.
So just prevent this kind of rename, and adapt sanity-sec test_47
accordingly.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I38e17caa4786c1c8d80a363a826a5aa298eb0980
Reviewed-on: https://review.whamcloud.com/43404
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/namei.c
lustre/mdd/mdd_dir.c
lustre/tests/sanity-sec.sh