diff options
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index ad9a9b8e9979..7ce683259357 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -1508,6 +1508,11 @@ static int selinux_genfs_get_sid(struct dentry *dentry, | |||
1508 | } | 1508 | } |
1509 | rc = security_genfs_sid(&selinux_state, sb->s_type->name, | 1509 | rc = security_genfs_sid(&selinux_state, sb->s_type->name, |
1510 | path, tclass, sid); | 1510 | path, tclass, sid); |
1511 | if (rc == -ENOENT) { | ||
1512 | /* No match in policy, mark as unlabeled. */ | ||
1513 | *sid = SECINITSID_UNLABELED; | ||
1514 | rc = 0; | ||
1515 | } | ||
1511 | } | 1516 | } |
1512 | free_page((unsigned long)buffer); | 1517 | free_page((unsigned long)buffer); |
1513 | return rc; | 1518 | return rc; |
@@ -4186,7 +4191,7 @@ static int selinux_task_movememory(struct task_struct *p) | |||
4186 | PROCESS__SETSCHED, NULL); | 4191 | PROCESS__SETSCHED, NULL); |
4187 | } | 4192 | } |
4188 | 4193 | ||
4189 | static int selinux_task_kill(struct task_struct *p, struct siginfo *info, | 4194 | static int selinux_task_kill(struct task_struct *p, struct kernel_siginfo *info, |
4190 | int sig, const struct cred *cred) | 4195 | int sig, const struct cred *cred) |
4191 | { | 4196 | { |
4192 | u32 secid; | 4197 | u32 secid; |
@@ -7202,7 +7207,10 @@ void selinux_complete_init(void) | |||
7202 | 7207 | ||
7203 | /* SELinux requires early initialization in order to label | 7208 | /* SELinux requires early initialization in order to label |
7204 | all processes and objects when they are created. */ | 7209 | all processes and objects when they are created. */ |
7205 | security_initcall(selinux_init); | 7210 | DEFINE_LSM(selinux) = { |
7211 | .name = "selinux", | ||
7212 | .init = selinux_init, | ||
7213 | }; | ||
7206 | 7214 | ||
7207 | #if defined(CONFIG_NETFILTER) | 7215 | #if defined(CONFIG_NETFILTER) |
7208 | 7216 | ||