diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-09 13:54:24 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-09 13:54:24 -0500 |
| commit | d1cae94871330cb9f5fdcea34529abf7917e682e (patch) | |
| tree | 727bdda6b15bc1252c61eff0d77395e8c02d56c1 /fs/crypto/hooks.c | |
| parent | 99b25a7fc6150d613be8eab71a47e6c0fcc8d7c5 (diff) | |
| parent | 129ca2d2a83f44551e73a408fa5e75a7b5169abb (diff) | |
Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt
Pull fscrypt updates from Eric Biggers:
"First: Ted, Jaegeuk, and I have decided to add me as a co-maintainer
for fscrypt, and we're now using a shared git tree. So we've updated
MAINTAINERS accordingly, and I'm doing the pull request this time.
The actual changes for v5.1 are:
- Remove the fs-specific kconfig options like CONFIG_EXT4_ENCRYPTION
and make fscrypt support for all fscrypt-capable filesystems be
controlled by CONFIG_FS_ENCRYPTION, similar to how CONFIG_QUOTA
works.
- Improve error code for rename() and link() into encrypted
directories.
- Various cleanups"
* tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt:
MAINTAINERS: add Eric Biggers as an fscrypt maintainer
fscrypt: return -EXDEV for incompatible rename or link into encrypted dir
fscrypt: remove filesystem specific build config option
f2fs: use IS_ENCRYPTED() to check encryption status
ext4: use IS_ENCRYPTED() to check encryption status
fscrypt: remove CRYPTO_CTR dependency
Diffstat (limited to 'fs/crypto/hooks.c')
| -rw-r--r-- | fs/crypto/hooks.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/crypto/hooks.c b/fs/crypto/hooks.c index 926e5df20ec3..56debb1fcf5e 100644 --- a/fs/crypto/hooks.c +++ b/fs/crypto/hooks.c | |||
| @@ -58,7 +58,7 @@ int __fscrypt_prepare_link(struct inode *inode, struct inode *dir) | |||
| 58 | return err; | 58 | return err; |
| 59 | 59 | ||
| 60 | if (!fscrypt_has_permitted_context(dir, inode)) | 60 | if (!fscrypt_has_permitted_context(dir, inode)) |
| 61 | return -EPERM; | 61 | return -EXDEV; |
| 62 | 62 | ||
| 63 | return 0; | 63 | return 0; |
| 64 | } | 64 | } |
| @@ -82,13 +82,13 @@ int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
| 82 | if (IS_ENCRYPTED(new_dir) && | 82 | if (IS_ENCRYPTED(new_dir) && |
| 83 | !fscrypt_has_permitted_context(new_dir, | 83 | !fscrypt_has_permitted_context(new_dir, |
| 84 | d_inode(old_dentry))) | 84 | d_inode(old_dentry))) |
| 85 | return -EPERM; | 85 | return -EXDEV; |
| 86 | 86 | ||
| 87 | if ((flags & RENAME_EXCHANGE) && | 87 | if ((flags & RENAME_EXCHANGE) && |
| 88 | IS_ENCRYPTED(old_dir) && | 88 | IS_ENCRYPTED(old_dir) && |
| 89 | !fscrypt_has_permitted_context(old_dir, | 89 | !fscrypt_has_permitted_context(old_dir, |
| 90 | d_inode(new_dentry))) | 90 | d_inode(new_dentry))) |
| 91 | return -EPERM; | 91 | return -EXDEV; |
| 92 | } | 92 | } |
| 93 | return 0; | 93 | return 0; |
| 94 | } | 94 | } |
