Lines Matching refs:tsec

213 	struct task_security_struct *tsec;
215 tsec = selinux_cred(unrcu_pointer(current->real_cred));
216 tsec->osid = tsec->sid = SECINITSID_KERNEL;
224 const struct task_security_struct *tsec;
226 tsec = selinux_cred(cred);
227 return tsec->sid;
427 const struct task_security_struct *tsec = selinux_cred(cred);
430 rc = avc_has_perm(tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM,
435 rc = avc_has_perm(tsec->sid, sid, SECCLASS_FILESYSTEM,
444 const struct task_security_struct *tsec = selinux_cred(cred);
446 rc = avc_has_perm(tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM,
1770 selinux_determine_inode_label(const struct task_security_struct *tsec,
1782 tsec->create_sid) {
1783 *_new_isid = tsec->create_sid;
1786 return security_transition_sid(tsec->sid,
1799 const struct task_security_struct *tsec = selinux_cred(current_cred());
1809 sid = tsec->sid;
1820 rc = selinux_determine_inode_label(tsec, dir, &dentry->d_name, tclass,
2505 const struct task_security_struct *tsec = selinux_cred(current_cred());
2509 osid = tsec->osid;
2510 sid = tsec->sid;
2887 struct task_security_struct *tsec;
2896 tsec = selinux_cred(new);
2897 tsec->create_sid = newsid;
2905 const struct task_security_struct *tsec = selinux_cred(current_cred());
2914 newsid = tsec->create_sid;
2916 rc = selinux_determine_inode_label(tsec, dir, qstr,
2951 const struct task_security_struct *tsec = selinux_cred(current_cred());
2980 tsec->sid, tsec->sid,
2995 return avc_has_perm(tsec->sid,
3502 struct task_security_struct *tsec;
3511 tsec = selinux_cred(new_creds);
3514 tsec->create_sid = sid;
3539 const struct task_security_struct *tsec = selinux_cred(current_cred());
3567 if (tsec->create_sid) {
3568 newsid = tsec->create_sid;
3576 rc = security_transition_sid(tsec->sid,
3991 struct task_security_struct *tsec = selinux_cred(new);
3993 *tsec = *old_tsec;
4003 struct task_security_struct *tsec = selinux_cred(new);
4005 *tsec = *old_tsec;
4019 struct task_security_struct *tsec = selinux_cred(new);
4028 tsec->sid = secid;
4029 tsec->create_sid = 0;
4030 tsec->keycreate_sid = 0;
4031 tsec->sockcreate_sid = 0;
4043 struct task_security_struct *tsec = selinux_cred(new);
4053 tsec->create_sid = isec->sid;
4557 static int socket_sockcreate_sid(const struct task_security_struct *tsec,
4560 if (tsec->sockcreate_sid > SECSID_NULL) {
4561 *socksid = tsec->sockcreate_sid;
4565 return security_transition_sid(tsec->sid, tsec->sid,
4587 const struct task_security_struct *tsec = selinux_cred(current_cred());
4596 rc = socket_sockcreate_sid(tsec, secclass, &newsid);
4600 return avc_has_perm(tsec->sid, newsid, secclass, SOCKET__CREATE, NULL);
4606 const struct task_security_struct *tsec = selinux_cred(current_cred());
4614 err = socket_sockcreate_sid(tsec, sclass, &sid);
5535 const struct task_security_struct *tsec;
5538 tsec = selinux_cred(current_cred());
5539 tsid = tsec->sid;
6367 struct task_security_struct *tsec;
6443 tsec = selinux_cred(new);
6445 tsec->exec_sid = sid;
6447 tsec->create_sid = sid;
6455 tsec->keycreate_sid = sid;
6457 tsec->sockcreate_sid = sid;
6465 error = security_bounded_transition(tsec->sid, sid);
6471 error = avc_has_perm(tsec->sid, sid, SECCLASS_PROCESS,
6486 tsec->sid = sid;
6567 const struct task_security_struct *tsec;
6574 tsec = selinux_cred(cred);
6575 if (tsec->keycreate_sid)
6576 ksec->sid = tsec->keycreate_sid;
6578 ksec->sid = tsec->sid;