diff options
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index d51bd40a04a8..710894d4841b 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -161,7 +161,6 @@ static int task_alloc_security(struct task_struct *task) | |||
161 | if (!tsec) | 161 | if (!tsec) |
162 | return -ENOMEM; | 162 | return -ENOMEM; |
163 | 163 | ||
164 | tsec->task = task; | ||
165 | tsec->osid = tsec->sid = tsec->ptrace_sid = SECINITSID_UNLABELED; | 164 | tsec->osid = tsec->sid = tsec->ptrace_sid = SECINITSID_UNLABELED; |
166 | task->security = tsec; | 165 | task->security = tsec; |
167 | 166 | ||
@@ -218,7 +217,6 @@ static int file_alloc_security(struct file *file) | |||
218 | if (!fsec) | 217 | if (!fsec) |
219 | return -ENOMEM; | 218 | return -ENOMEM; |
220 | 219 | ||
221 | fsec->file = file; | ||
222 | fsec->sid = tsec->sid; | 220 | fsec->sid = tsec->sid; |
223 | fsec->fown_sid = tsec->sid; | 221 | fsec->fown_sid = tsec->sid; |
224 | file->f_security = fsec; | 222 | file->f_security = fsec; |
@@ -275,7 +273,6 @@ static int sk_alloc_security(struct sock *sk, int family, gfp_t priority) | |||
275 | if (!ssec) | 273 | if (!ssec) |
276 | return -ENOMEM; | 274 | return -ENOMEM; |
277 | 275 | ||
278 | ssec->sk = sk; | ||
279 | ssec->peer_sid = SECINITSID_UNLABELED; | 276 | ssec->peer_sid = SECINITSID_UNLABELED; |
280 | ssec->sid = SECINITSID_UNLABELED; | 277 | ssec->sid = SECINITSID_UNLABELED; |
281 | sk->sk_security = ssec; | 278 | sk->sk_security = ssec; |
@@ -1889,7 +1886,6 @@ static int selinux_bprm_alloc_security(struct linux_binprm *bprm) | |||
1889 | if (!bsec) | 1886 | if (!bsec) |
1890 | return -ENOMEM; | 1887 | return -ENOMEM; |
1891 | 1888 | ||
1892 | bsec->bprm = bprm; | ||
1893 | bsec->sid = SECINITSID_UNLABELED; | 1889 | bsec->sid = SECINITSID_UNLABELED; |
1894 | bsec->set = 0; | 1890 | bsec->set = 0; |
1895 | 1891 | ||
@@ -4561,7 +4557,6 @@ static int ipc_alloc_security(struct task_struct *task, | |||
4561 | return -ENOMEM; | 4557 | return -ENOMEM; |
4562 | 4558 | ||
4563 | isec->sclass = sclass; | 4559 | isec->sclass = sclass; |
4564 | isec->ipc_perm = perm; | ||
4565 | isec->sid = tsec->sid; | 4560 | isec->sid = tsec->sid; |
4566 | perm->security = isec; | 4561 | perm->security = isec; |
4567 | 4562 | ||
@@ -4583,7 +4578,6 @@ static int msg_msg_alloc_security(struct msg_msg *msg) | |||
4583 | if (!msec) | 4578 | if (!msec) |
4584 | return -ENOMEM; | 4579 | return -ENOMEM; |
4585 | 4580 | ||
4586 | msec->msg = msg; | ||
4587 | msec->sid = SECINITSID_UNLABELED; | 4581 | msec->sid = SECINITSID_UNLABELED; |
4588 | msg->security = msec; | 4582 | msg->security = msec; |
4589 | 4583 | ||
@@ -5194,7 +5188,6 @@ static int selinux_key_alloc(struct key *k, struct task_struct *tsk, | |||
5194 | if (!ksec) | 5188 | if (!ksec) |
5195 | return -ENOMEM; | 5189 | return -ENOMEM; |
5196 | 5190 | ||
5197 | ksec->obj = k; | ||
5198 | if (tsec->keycreate_sid) | 5191 | if (tsec->keycreate_sid) |
5199 | ksec->sid = tsec->keycreate_sid; | 5192 | ksec->sid = tsec->keycreate_sid; |
5200 | else | 5193 | else |