diff options
author | Eric Biggers <ebiggers@google.com> | 2016-12-05 11:12:47 -0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2016-12-31 16:26:21 -0500 |
commit | 868e1bc64d04294b76f1c0eedb79e0742be441c7 (patch) | |
tree | 19621c444ac7071c54b454a7c438eb59ba4d5365 /fs/crypto/policy.c | |
parent | 8488cd96ff88966ccb076e4f3654f59d84ba686d (diff) |
fscrypt: remove user-triggerable warning messages
Several warning messages were not rate limited and were user-triggerable
from FS_IOC_SET_ENCRYPTION_POLICY. These shouldn't really have been
there in the first place, but either way they aren't as useful now that
the error codes have been improved. So just remove them.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/crypto/policy.c')
-rw-r--r-- | fs/crypto/policy.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/fs/crypto/policy.c b/fs/crypto/policy.c index 47f19800ceb7..521b182dd902 100644 --- a/fs/crypto/policy.c +++ b/fs/crypto/policy.c @@ -66,20 +66,12 @@ static int create_encryption_context_from_policy(struct inode *inode, FS_KEY_DESCRIPTOR_SIZE); if (!fscrypt_valid_contents_enc_mode( - policy->contents_encryption_mode)) { - printk(KERN_WARNING - "%s: Invalid contents encryption mode %d\n", __func__, - policy->contents_encryption_mode); + policy->contents_encryption_mode)) return -EINVAL; - } if (!fscrypt_valid_filenames_enc_mode( - policy->filenames_encryption_mode)) { - printk(KERN_WARNING - "%s: Invalid filenames encryption mode %d\n", __func__, - policy->filenames_encryption_mode); + policy->filenames_encryption_mode)) return -EINVAL; - } if (policy->flags & ~FS_POLICY_FLAGS_VALID) return -EINVAL; @@ -126,9 +118,6 @@ int fscrypt_ioctl_set_policy(struct file *filp, const void __user *arg) &policy); } else if (!is_encryption_context_consistent_with_policy(inode, &policy)) { - printk(KERN_WARNING - "%s: Policy inconsistent with encryption context\n", - __func__); ret = -EEXIST; } |