X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=kernel%2Ffs%2Ff2fs%2Fcrypto_policy.c;fp=kernel%2Ffs%2Ff2fs%2Fcrypto_policy.c;h=e504f548b64e3045177ae884b3352ac34bd7466e;hb=52f993b8e89487ec9ee15a7fb4979e0f09a45b27;hp=d4a96af513c22f28ea1242496286d4ff1a606567;hpb=c189ccac5702322ed843fe17057035b7222a59b6;p=kvmfornfv.git diff --git a/kernel/fs/f2fs/crypto_policy.c b/kernel/fs/f2fs/crypto_policy.c index d4a96af51..e504f548b 100644 --- a/kernel/fs/f2fs/crypto_policy.c +++ b/kernel/fs/f2fs/crypto_policy.c @@ -89,6 +89,9 @@ static int f2fs_create_encryption_context_from_policy( int f2fs_process_policy(const struct f2fs_encryption_policy *policy, struct inode *inode) { + if (!inode_owner_or_capable(inode)) + return -EACCES; + if (policy->version != 0) return -EINVAL;