summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-02-27 19:06:21 +0300
committerCasey Schaufler <casey@schaufler-ca.com>2018-02-28 20:27:12 +0300
commit58c442f34c77ad80941e3da85cc0738e8e21d4f3 (patch)
tree7f9cbe6fd978abc8c4d421f5857f683a016ccc9f /security
parenta02633e9b13dcb9b1a656b08f81bc8ba2d4d2294 (diff)
downloadlinux-58c442f34c77ad80941e3da85cc0738e8e21d4f3.tar.xz
Smack: Handle CGROUP2 in the same way that CGROUP
The new file system CGROUP2 isn't actually handled by smack. This changes makes Smack treat equally CGROUP and CGROUP2 items. Signed-off-by: José Bollo <jose.bollo@iot.bzh> Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'security')
-rw-r--r--security/smack/smack_lsm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 03fdecba93bb..5d77ed04422c 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -3431,6 +3431,7 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode)
if (opt_dentry->d_parent == opt_dentry) {
switch (sbp->s_magic) {
case CGROUP_SUPER_MAGIC:
+ case CGROUP2_SUPER_MAGIC:
/*
* The cgroup filesystem is never mounted,
* so there's no opportunity to set the mount
@@ -3474,6 +3475,7 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode)
switch (sbp->s_magic) {
case SMACK_MAGIC:
case CGROUP_SUPER_MAGIC:
+ case CGROUP2_SUPER_MAGIC:
/*
* Casey says that it's a little embarrassing
* that the smack file system doesn't do