diff options
| author | LorDClockaN <davor@losinj.com> | 2014-06-18 15:09:32 +0200 |
|---|---|---|
| committer | LorDClockaN <davor@losinj.com> | 2014-06-18 15:09:32 +0200 |
| commit | 3d258ae906ee28e8f43f1fe1f51d48a63b5fd1ca (patch) | |
| tree | daf27e2d6c97a18c9525ec3207a6aa6191165a2d /security/selinux | |
| parent | 69a8edcfd8ca6987626f20cd5a78051f43f532e9 (diff) | |
| parent | c795f63b44d1f605b84261bd9a76e53f6f1a0b7d (diff) | |
Change-Id: I1801401160f3216c9e2621b4cb337b3c11d82c9e
Diffstat (limited to 'security/selinux')
| -rw-r--r-- | security/selinux/include/classmap.h | 4 | ||||
| -rw-r--r-- | security/selinux/ss/services.c | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/security/selinux/include/classmap.h b/security/selinux/include/classmap.h index 4a4a9aebca9..20b00fc37cc 100644 --- a/security/selinux/include/classmap.h +++ b/security/selinux/include/classmap.h @@ -145,7 +145,9 @@ struct security_class_mapping secclass_map[] = { "node_bind", "name_connect", NULL } }, { "memprotect", { "mmap_zero", NULL } }, { "peer", { "recv", NULL } }, - { "capability2", { "mac_override", "mac_admin", "syslog", NULL } }, + { "capability2", + { "mac_override", "mac_admin", "syslog", "wake_alarm", "block_suspend", + NULL } }, { "kernel_service", { "use_as_override", "create_files_as", NULL } }, { "tun_socket", { COMMON_SOCK_PERMS, NULL } }, diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 185f849a26f..72b20b1089d 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -1229,6 +1229,10 @@ static int security_context_to_sid_core(const char *scontext, u32 scontext_len, struct context context; int rc = 0; + /* An empty security context is never valid. */ + if (!scontext_len) + return -EINVAL; + if (!ss_initialized) { int i; |
