Lines Matching refs:tsec
211 struct task_security_struct *tsec; in cred_init_security() local
213 tsec = selinux_cred(cred); in cred_init_security()
214 tsec->osid = tsec->sid = SECINITSID_KERNEL; in cred_init_security()
222 const struct task_security_struct *tsec; in cred_sid() local
224 tsec = selinux_cred(cred); in cred_sid()
225 return tsec->sid; in cred_sid()
463 const struct task_security_struct *tsec = selinux_cred(cred); in may_context_mount_sb_relabel() local
467 tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM, in may_context_mount_sb_relabel()
473 tsec->sid, sid, SECCLASS_FILESYSTEM, in may_context_mount_sb_relabel()
482 const struct task_security_struct *tsec = selinux_cred(cred); in may_context_mount_inode_relabel() local
485 tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM, in may_context_mount_inode_relabel()
1786 selinux_determine_inode_label(const struct task_security_struct *tsec, in selinux_determine_inode_label() argument
1797 tsec->create_sid) { in selinux_determine_inode_label()
1798 *_new_isid = tsec->create_sid; in selinux_determine_inode_label()
1801 return security_transition_sid(&selinux_state, tsec->sid, in selinux_determine_inode_label()
1814 const struct task_security_struct *tsec = selinux_cred(current_cred()); in may_create() local
1824 sid = tsec->sid; in may_create()
2551 const struct task_security_struct *tsec = selinux_cred(current_cred()); in selinux_bprm_committed_creds() local
2556 osid = tsec->osid; in selinux_bprm_committed_creds()
2557 sid = tsec->sid; in selinux_bprm_committed_creds()
2884 struct task_security_struct *tsec; in selinux_dentry_create_files_as() local
2893 tsec = selinux_cred(new); in selinux_dentry_create_files_as()
2894 tsec->create_sid = newsid; in selinux_dentry_create_files_as()
2903 const struct task_security_struct *tsec = selinux_cred(current_cred()); in selinux_inode_init_security() local
2911 newsid = tsec->create_sid; in selinux_inode_init_security()
3415 struct task_security_struct *tsec; in selinux_inode_copy_up() local
3424 tsec = selinux_cred(new_creds); in selinux_inode_copy_up()
3427 tsec->create_sid = sid; in selinux_inode_copy_up()
3452 const struct task_security_struct *tsec = selinux_cred(current_cred()); in selinux_kernfs_init_security() local
3480 if (tsec->create_sid) { in selinux_kernfs_init_security()
3481 newsid = tsec->create_sid; in selinux_kernfs_init_security()
3489 rc = security_transition_sid(&selinux_state, tsec->sid, in selinux_kernfs_init_security()
3887 struct task_security_struct *tsec = selinux_cred(new); in selinux_cred_prepare() local
3889 *tsec = *old_tsec; in selinux_cred_prepare()
3899 struct task_security_struct *tsec = selinux_cred(new); in selinux_cred_transfer() local
3901 *tsec = *old_tsec; in selinux_cred_transfer()
3915 struct task_security_struct *tsec = selinux_cred(new); in selinux_kernel_act_as() local
3925 tsec->sid = secid; in selinux_kernel_act_as()
3926 tsec->create_sid = 0; in selinux_kernel_act_as()
3927 tsec->keycreate_sid = 0; in selinux_kernel_act_as()
3928 tsec->sockcreate_sid = 0; in selinux_kernel_act_as()
3940 struct task_security_struct *tsec = selinux_cred(new); in selinux_kernel_create_files_as() local
3951 tsec->create_sid = isec->sid; in selinux_kernel_create_files_as()
4456 static int socket_sockcreate_sid(const struct task_security_struct *tsec, in socket_sockcreate_sid() argument
4459 if (tsec->sockcreate_sid > SECSID_NULL) { in socket_sockcreate_sid()
4460 *socksid = tsec->sockcreate_sid; in socket_sockcreate_sid()
4464 return security_transition_sid(&selinux_state, tsec->sid, tsec->sid, in socket_sockcreate_sid()
4489 const struct task_security_struct *tsec = selinux_cred(current_cred()); in selinux_socket_create() local
4498 rc = socket_sockcreate_sid(tsec, secclass, &newsid); in selinux_socket_create()
4503 tsec->sid, newsid, secclass, SOCKET__CREATE, NULL); in selinux_socket_create()
4509 const struct task_security_struct *tsec = selinux_cred(current_cred()); in selinux_socket_post_create() local
4517 err = socket_sockcreate_sid(tsec, sclass, &sid); in selinux_socket_post_create()
6314 struct task_security_struct *tsec; in selinux_setprocattr() local
6394 tsec = selinux_cred(new); in selinux_setprocattr()
6396 tsec->exec_sid = sid; in selinux_setprocattr()
6398 tsec->create_sid = sid; in selinux_setprocattr()
6406 tsec->keycreate_sid = sid; in selinux_setprocattr()
6408 tsec->sockcreate_sid = sid; in selinux_setprocattr()
6418 tsec->sid, sid); in selinux_setprocattr()
6425 tsec->sid, sid, SECCLASS_PROCESS, in selinux_setprocattr()
6441 tsec->sid = sid; in selinux_setprocattr()
6520 const struct task_security_struct *tsec; in selinux_key_alloc() local
6527 tsec = selinux_cred(cred); in selinux_key_alloc()
6528 if (tsec->keycreate_sid) in selinux_key_alloc()
6529 ksec->sid = tsec->keycreate_sid; in selinux_key_alloc()
6531 ksec->sid = tsec->sid; in selinux_key_alloc()