aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-18 16:42:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-18 16:42:44 -0400
commite2f3b78557ff11f58d836e016900c3210f4fb1c1 (patch)
tree7ecaa578bee0dd90fc22daa0e3a736411f2d4309 /security/selinux
parent6f7024285864290259d6b4c36f9e84a4b89ec3c4 (diff)
parent3d2195c3324b27e65ba53d9626a6bd91a2515797 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull SELinux regression fixes from James Morris. Andrew Morton has a box that hit that open perms problem. I also renamed the "epollwakeup" selinux name for the new capability to be "block_suspend", to match the rename done by commit d9914cf66181 ("PM: Rename CAP_EPOLLWAKEUP to CAP_BLOCK_SUSPEND"). * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: SELinux: do not check open perms if they are not known to policy SELinux: include definition of new capabilities
Diffstat (limited to 'security/selinux')
-rw-r--r--security/selinux/hooks.c2
-rw-r--r--security/selinux/include/classmap.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 372ec6502aa8..ffd8900a38e8 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2717,7 +2717,7 @@ static int selinux_inode_setattr(struct dentry *dentry, struct iattr *iattr)
2717 ATTR_ATIME_SET | ATTR_MTIME_SET | ATTR_TIMES_SET)) 2717 ATTR_ATIME_SET | ATTR_MTIME_SET | ATTR_TIMES_SET))
2718 return dentry_has_perm(cred, dentry, FILE__SETATTR); 2718 return dentry_has_perm(cred, dentry, FILE__SETATTR);
2719 2719
2720 if (ia_valid & ATTR_SIZE) 2720 if (selinux_policycap_openperm && (ia_valid & ATTR_SIZE))
2721 av |= FILE__OPEN; 2721 av |= FILE__OPEN;
2722 2722
2723 return dentry_has_perm(cred, dentry, av); 2723 return dentry_has_perm(cred, dentry, av);
diff --git a/security/selinux/include/classmap.h b/security/selinux/include/classmap.h
index b8c53723e09b..df2de54a958d 100644
--- a/security/selinux/include/classmap.h
+++ b/security/selinux/include/classmap.h
@@ -145,7 +145,9 @@ struct security_class_mapping secclass_map[] = {
145 "node_bind", "name_connect", NULL } }, 145 "node_bind", "name_connect", NULL } },
146 { "memprotect", { "mmap_zero", NULL } }, 146 { "memprotect", { "mmap_zero", NULL } },
147 { "peer", { "recv", NULL } }, 147 { "peer", { "recv", NULL } },
148 { "capability2", { "mac_override", "mac_admin", "syslog", NULL } }, 148 { "capability2",
149 { "mac_override", "mac_admin", "syslog", "wake_alarm", "block_suspend",
150 NULL } },
149 { "kernel_service", { "use_as_override", "create_files_as", NULL } }, 151 { "kernel_service", { "use_as_override", "create_files_as", NULL } },
150 { "tun_socket", 152 { "tun_socket",
151 { COMMON_SOCK_PERMS, NULL } }, 153 { COMMON_SOCK_PERMS, NULL } },