Function report |
Source Code:security\selinux\hooks.c |
Create Date:2022-07-28 18:59:37 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:selinux_socket_post_create
Proto:static int selinux_socket_post_create(struct socket *sock, int family, int type, int protocol, int kern)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct socket * | sock | |
| int | family | |
| int | type | |
| int | protocol | |
| int | kern |
| 4529 | tsec = selinux_cred(current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.()) |
| 4530 | isec = inode_security_novalidate(SOCK_INODE(sock)) |
| 4532 | sclass = socket_type_to_security_class(family, type, protocol) |
| 4533 | sid = SECINITSID_KERNEL |
| 4534 | err = 0 |
| 4536 | If Not kern Then |
| 4537 | err = socket security operations |
| 4543 | SID of this object = sid |
| 4544 | initialization flag = initialized |
| 4546 | If sk Then |
| 4547 | sksec = sk_security |
| 4548 | sock security class = sclass |
| 4549 | SID of this object = sid |
| 4551 | If sock security class == SECCLASS_SCTP_SOCKET Then sctp_assoc_state = SCTP_ASSOC_UNSET |
| 4554 | err = selinux_netlbl_socket_post_create(sk, family) |
| 4557 | Return err |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |