• Home
  • Raw
  • Download

Lines Matching refs:tsec

193 	struct task_security_struct *tsec;  in cred_init_security()  local
195 tsec = kzalloc(sizeof(struct task_security_struct), GFP_KERNEL); in cred_init_security()
196 if (!tsec) in cred_init_security()
199 tsec->osid = tsec->sid = SECINITSID_KERNEL; in cred_init_security()
200 cred->security = tsec; in cred_init_security()
208 const struct task_security_struct *tsec; in cred_sid() local
210 tsec = cred->security; in cred_sid()
211 return tsec->sid; in cred_sid()
446 const struct task_security_struct *tsec = cred->security; in may_context_mount_sb_relabel() local
449 rc = avc_has_perm(tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM, in may_context_mount_sb_relabel()
454 rc = avc_has_perm(tsec->sid, sid, SECCLASS_FILESYSTEM, in may_context_mount_sb_relabel()
463 const struct task_security_struct *tsec = cred->security; in may_context_mount_inode_relabel() local
465 rc = avc_has_perm(tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM, in may_context_mount_inode_relabel()
1896 selinux_determine_inode_label(const struct task_security_struct *tsec, in selinux_determine_inode_label() argument
1907 tsec->create_sid) { in selinux_determine_inode_label()
1908 *_new_isid = tsec->create_sid; in selinux_determine_inode_label()
1911 return security_transition_sid(tsec->sid, dsec->sid, tclass, in selinux_determine_inode_label()
1923 const struct task_security_struct *tsec = current_security(); in may_create() local
1933 sid = tsec->sid; in may_create()
2625 const struct task_security_struct *tsec = current_security(); in selinux_bprm_committed_creds() local
2630 osid = tsec->osid; in selinux_bprm_committed_creds()
2631 sid = tsec->sid; in selinux_bprm_committed_creds()
2942 struct task_security_struct *tsec; in selinux_dentry_create_files_as() local
2951 tsec = new->security; in selinux_dentry_create_files_as()
2952 tsec->create_sid = newsid; in selinux_dentry_create_files_as()
2961 const struct task_security_struct *tsec = current_security(); in selinux_inode_init_security() local
2969 sid = tsec->sid; in selinux_inode_init_security()
2970 newsid = tsec->create_sid; in selinux_inode_init_security()
3423 struct task_security_struct *tsec; in selinux_inode_copy_up() local
3432 tsec = new_creds->security; in selinux_inode_copy_up()
3435 tsec->create_sid = sid; in selinux_inode_copy_up()
3829 struct task_security_struct *tsec; in selinux_cred_alloc_blank() local
3831 tsec = kzalloc(sizeof(struct task_security_struct), gfp); in selinux_cred_alloc_blank()
3832 if (!tsec) in selinux_cred_alloc_blank()
3835 cred->security = tsec; in selinux_cred_alloc_blank()
3844 struct task_security_struct *tsec = cred->security; in selinux_cred_free() local
3852 kfree(tsec); in selinux_cred_free()
3862 struct task_security_struct *tsec; in selinux_cred_prepare() local
3866 tsec = kmemdup(old_tsec, sizeof(struct task_security_struct), gfp); in selinux_cred_prepare()
3867 if (!tsec) in selinux_cred_prepare()
3870 new->security = tsec; in selinux_cred_prepare()
3880 struct task_security_struct *tsec = new->security; in selinux_cred_transfer() local
3882 *tsec = *old_tsec; in selinux_cred_transfer()
3891 struct task_security_struct *tsec = new->security; in selinux_kernel_act_as() local
3900 tsec->sid = secid; in selinux_kernel_act_as()
3901 tsec->create_sid = 0; in selinux_kernel_act_as()
3902 tsec->keycreate_sid = 0; in selinux_kernel_act_as()
3903 tsec->sockcreate_sid = 0; in selinux_kernel_act_as()
3915 struct task_security_struct *tsec = new->security; in selinux_kernel_create_files_as() local
3925 tsec->create_sid = isec->sid; in selinux_kernel_create_files_as()
4365 static int socket_sockcreate_sid(const struct task_security_struct *tsec, in socket_sockcreate_sid() argument
4368 if (tsec->sockcreate_sid > SECSID_NULL) { in socket_sockcreate_sid()
4369 *socksid = tsec->sockcreate_sid; in socket_sockcreate_sid()
4373 return security_transition_sid(tsec->sid, tsec->sid, secclass, NULL, in socket_sockcreate_sid()
4397 const struct task_security_struct *tsec = current_security(); in selinux_socket_create() local
4406 rc = socket_sockcreate_sid(tsec, secclass, &newsid); in selinux_socket_create()
4410 return avc_has_perm(tsec->sid, newsid, secclass, SOCKET__CREATE, NULL); in selinux_socket_create()
4416 const struct task_security_struct *tsec = current_security(); in selinux_socket_post_create() local
4424 err = socket_sockcreate_sid(tsec, sclass, &sid); in selinux_socket_post_create()
5988 struct task_security_struct *tsec; in selinux_setprocattr() local
6059 tsec = new->security; in selinux_setprocattr()
6061 tsec->exec_sid = sid; in selinux_setprocattr()
6063 tsec->create_sid = sid; in selinux_setprocattr()
6069 tsec->keycreate_sid = sid; in selinux_setprocattr()
6071 tsec->sockcreate_sid = sid; in selinux_setprocattr()
6080 error = security_bounded_transition(tsec->sid, sid); in selinux_setprocattr()
6086 error = avc_has_perm(tsec->sid, sid, SECCLASS_PROCESS, in selinux_setprocattr()
6101 tsec->sid = sid; in selinux_setprocattr()
6178 const struct task_security_struct *tsec; in selinux_key_alloc() local
6185 tsec = cred->security; in selinux_key_alloc()
6186 if (tsec->keycreate_sid) in selinux_key_alloc()
6187 ksec->sid = tsec->keycreate_sid; in selinux_key_alloc()
6189 ksec->sid = tsec->sid; in selinux_key_alloc()