summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-02-27 11:06:21 -0500
committerCasey Schaufler <casey@schaufler-ca.com>2018-02-28 12:27:12 -0500
commit58c442f34c77ad80941e3da85cc0738e8e21d4f3 (patch)
tree7f9cbe6fd978abc8c4d421f5857f683a016ccc9f /security
parenta02633e9b13dcb9b1a656b08f81bc8ba2d4d2294 (diff)
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)
3431 if (opt_dentry->d_parent == opt_dentry) { 3431 if (opt_dentry->d_parent == opt_dentry) {
3432 switch (sbp->s_magic) { 3432 switch (sbp->s_magic) {
3433 case CGROUP_SUPER_MAGIC: 3433 case CGROUP_SUPER_MAGIC:
3434 case CGROUP2_SUPER_MAGIC:
3434 /* 3435 /*
3435 * The cgroup filesystem is never mounted, 3436 * The cgroup filesystem is never mounted,
3436 * so there's no opportunity to set the mount 3437 * 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)
3474 switch (sbp->s_magic) { 3475 switch (sbp->s_magic) {
3475 case SMACK_MAGIC: 3476 case SMACK_MAGIC:
3476 case CGROUP_SUPER_MAGIC: 3477 case CGROUP_SUPER_MAGIC:
3478 case CGROUP2_SUPER_MAGIC:
3477 /* 3479 /*
3478 * Casey says that it's a little embarrassing 3480 * Casey says that it's a little embarrassing
3479 * that the smack file system doesn't do 3481 * that the smack file system doesn't do