Lines Matching refs:tsec

215 	struct task_security_struct *tsec;  in cred_init_security()  local
217 tsec = selinux_cred(cred); in cred_init_security()
218 tsec->osid = tsec->sid = SECINITSID_KERNEL; in cred_init_security()
226 const struct task_security_struct *tsec; in cred_sid() local
228 tsec = selinux_cred(cred); in cred_sid()
229 return tsec->sid; in cred_sid()
419 const struct task_security_struct *tsec = selinux_cred(cred); in may_context_mount_sb_relabel() local
423 tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM, in may_context_mount_sb_relabel()
429 tsec->sid, sid, SECCLASS_FILESYSTEM, in may_context_mount_sb_relabel()
438 const struct task_security_struct *tsec = selinux_cred(cred); in may_context_mount_inode_relabel() local
441 tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM, in may_context_mount_inode_relabel()
1792 selinux_determine_inode_label(const struct task_security_struct *tsec, in selinux_determine_inode_label() argument
1804 tsec->create_sid) { in selinux_determine_inode_label()
1805 *_new_isid = tsec->create_sid; in selinux_determine_inode_label()
1808 return security_transition_sid(&selinux_state, tsec->sid, in selinux_determine_inode_label()
1821 const struct task_security_struct *tsec = selinux_cred(current_cred()); in may_create() local
1831 sid = tsec->sid; in may_create()
1843 rc = selinux_determine_inode_label(tsec, dir, &dentry->d_name, tclass, in may_create()
2557 const struct task_security_struct *tsec = selinux_cred(current_cred()); in selinux_bprm_committed_creds() local
2561 osid = tsec->osid; in selinux_bprm_committed_creds()
2562 sid = tsec->sid; in selinux_bprm_committed_creds()
2963 struct task_security_struct *tsec; in selinux_dentry_create_files_as() local
2972 tsec = selinux_cred(new); in selinux_dentry_create_files_as()
2973 tsec->create_sid = newsid; in selinux_dentry_create_files_as()
2982 const struct task_security_struct *tsec = selinux_cred(current_cred()); in selinux_inode_init_security() local
2990 newsid = tsec->create_sid; in selinux_inode_init_security()
2992 rc = selinux_determine_inode_label(tsec, dir, qstr, in selinux_inode_init_security()
3029 const struct task_security_struct *tsec = selinux_cred(current_cred()); in selinux_inode_init_security_anon() local
3058 &selinux_state, tsec->sid, tsec->sid, in selinux_inode_init_security_anon()
3074 tsec->sid, in selinux_inode_init_security_anon()
3575 struct task_security_struct *tsec; in selinux_inode_copy_up() local
3584 tsec = selinux_cred(new_creds); in selinux_inode_copy_up()
3587 tsec->create_sid = sid; in selinux_inode_copy_up()
3612 const struct task_security_struct *tsec = selinux_cred(current_cred()); in selinux_kernfs_init_security() local
3640 if (tsec->create_sid) { in selinux_kernfs_init_security()
3641 newsid = tsec->create_sid; in selinux_kernfs_init_security()
3649 rc = security_transition_sid(&selinux_state, tsec->sid, in selinux_kernfs_init_security()
4047 struct task_security_struct *tsec = selinux_cred(new); in selinux_cred_prepare() local
4049 *tsec = *old_tsec; in selinux_cred_prepare()
4059 struct task_security_struct *tsec = selinux_cred(new); in selinux_cred_transfer() local
4061 *tsec = *old_tsec; in selinux_cred_transfer()
4075 struct task_security_struct *tsec = selinux_cred(new); in selinux_kernel_act_as() local
4085 tsec->sid = secid; in selinux_kernel_act_as()
4086 tsec->create_sid = 0; in selinux_kernel_act_as()
4087 tsec->keycreate_sid = 0; in selinux_kernel_act_as()
4088 tsec->sockcreate_sid = 0; in selinux_kernel_act_as()
4100 struct task_security_struct *tsec = selinux_cred(new); in selinux_kernel_create_files_as() local
4111 tsec->create_sid = isec->sid; in selinux_kernel_create_files_as()
4623 static int socket_sockcreate_sid(const struct task_security_struct *tsec, in socket_sockcreate_sid() argument
4626 if (tsec->sockcreate_sid > SECSID_NULL) { in socket_sockcreate_sid()
4627 *socksid = tsec->sockcreate_sid; in socket_sockcreate_sid()
4631 return security_transition_sid(&selinux_state, tsec->sid, tsec->sid, in socket_sockcreate_sid()
4656 const struct task_security_struct *tsec = selinux_cred(current_cred()); in selinux_socket_create() local
4665 rc = socket_sockcreate_sid(tsec, secclass, &newsid); in selinux_socket_create()
4670 tsec->sid, newsid, secclass, SOCKET__CREATE, NULL); in selinux_socket_create()
4676 const struct task_security_struct *tsec = selinux_cred(current_cred()); in selinux_socket_post_create() local
4684 err = socket_sockcreate_sid(tsec, sclass, &sid); in selinux_socket_post_create()
6445 struct task_security_struct *tsec; in selinux_setprocattr() local
6527 tsec = selinux_cred(new); in selinux_setprocattr()
6529 tsec->exec_sid = sid; in selinux_setprocattr()
6531 tsec->create_sid = sid; in selinux_setprocattr()
6539 tsec->keycreate_sid = sid; in selinux_setprocattr()
6541 tsec->sockcreate_sid = sid; in selinux_setprocattr()
6551 tsec->sid, sid); in selinux_setprocattr()
6558 tsec->sid, sid, SECCLASS_PROCESS, in selinux_setprocattr()
6574 tsec->sid = sid; in selinux_setprocattr()
6654 const struct task_security_struct *tsec; in selinux_key_alloc() local
6661 tsec = selinux_cred(cred); in selinux_key_alloc()
6662 if (tsec->keycreate_sid) in selinux_key_alloc()
6663 ksec->sid = tsec->keycreate_sid; in selinux_key_alloc()
6665 ksec->sid = tsec->sid; in selinux_key_alloc()