summaryrefslogtreecommitdiffstats
path: root/fs/crypto/policy.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-01-28 09:30:11 +0100
committerIngo Molnar <mingo@kernel.org>2017-01-28 09:30:11 +0100
commit9a1f4150fe932fb892c05084029b3718b8ed1baf (patch)
treeb8f18ea5f0bdc842e3cf8da4700c1d577a3b1c66 /fs/crypto/policy.c
parentf28442497b5caf7bf573ade22a7f8d3559e3ef56 (diff)
parent1b1bc42c1692e9b62756323c675a44cb1a1f9dbd (diff)
downloadop-kernel-dev-9a1f4150fe932fb892c05084029b3718b8ed1baf.zip
op-kernel-dev-9a1f4150fe932fb892c05084029b3718b8ed1baf.tar.gz
Merge branch 'linus' into x86/boot, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/crypto/policy.c')
-rw-r--r--fs/crypto/policy.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/crypto/policy.c b/fs/crypto/policy.c
index 6ed7c2e..d6cd7ea 100644
--- a/fs/crypto/policy.c
+++ b/fs/crypto/policy.c
@@ -179,6 +179,11 @@ int fscrypt_has_permitted_context(struct inode *parent, struct inode *child)
BUG_ON(1);
}
+ /* No restrictions on file types which are never encrypted */
+ if (!S_ISREG(child->i_mode) && !S_ISDIR(child->i_mode) &&
+ !S_ISLNK(child->i_mode))
+ return 1;
+
/* no restrictions if the parent directory is not encrypted */
if (!parent->i_sb->s_cop->is_encrypted(parent))
return 1;
OpenPOWER on IntegriCloud