From 5b465b045af3a649a89b8a5c5bfdece20ffc0345 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Sat, 17 Sep 2016 02:25:44 -0300 Subject: Linux-libre 4.7.4-gnu --- fs/ext4/crypto_policy.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fs/ext4/crypto_policy.c') diff --git a/fs/ext4/crypto_policy.c b/fs/ext4/crypto_policy.c index ad0506981..8a9feb341 100644 --- a/fs/ext4/crypto_policy.c +++ b/fs/ext4/crypto_policy.c @@ -102,6 +102,9 @@ static int ext4_create_encryption_context_from_policy( int ext4_process_policy(const struct ext4_encryption_policy *policy, struct inode *inode) { + if (!inode_owner_or_capable(inode)) + return -EACCES; + if (policy->version != 0) return -EINVAL; -- cgit v1.2.3-54-g00ecf