Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-14629 sec: forbid file rename from enc to unencrypted dir
[fs/lustre-release.git]
/
lustre
/
llite
/
namei.c
diff --git
a/lustre/llite/namei.c
b/lustre/llite/namei.c
index
8470499
..
bcfdf37
100644
(file)
--- a/
lustre/llite/namei.c
+++ b/
lustre/llite/namei.c
@@
-1874,6
+1874,11
@@
static int ll_rename(struct inode *src, struct dentry *src_dchild,
#endif
if (err)
RETURN(err);
+ /* we prevent an encrypted file from being renamed
+ * into an unencrypted dir
+ */
+ if (IS_ENCRYPTED(src) && !IS_ENCRYPTED(tgt))
+ RETURN(-EXDEV);
if (src_dchild->d_inode)
mode = src_dchild->d_inode->i_mode;