Function report |
Source Code:security\smack\smack_lsm.c |
Create Date:2022-07-28 19:22:44 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:smack_socket_connect - connect access check*@sock: the socket*@sap: the other end*@addrlen: size of sap* Verifies that a connection may be possible* Returns 0 on success, and error code otherwise
Proto:static int smack_socket_connect(struct socket *sock, struct sockaddr *sap, int addrlen)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct socket * | sock | |
struct sockaddr * | sap | |
int | addrlen |
2833 | rc = 0 |
2835 | If (sk == NULL) Then Return 0 |
2837 | If sk_family != PF_INET && ( Not IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_IPV6) || sk_family != PF_INET6 ) Then Return 0 |
2840 | If addrlen < get the member end offset of(structsockaddr, sa_family) Then Return 0 |
2848 | If addrlen < SIN6_LEN_RFC2133 Then Return 0 |
2852 | If (rsp != NULL) Then |
2853 | ssp = sk_security |
2860 | rc = smk_ipv6_port_check - check Smack port access*@sk: socket*@address: address*@act: the action being taken* Create or update the port list entry |
2862 | Return rc |
2864 | If address family, AF_xxx != Internet IP Protocol || addrlen < sizeof(structsockaddr_in) Then Return 0 |
2867 | Return rc |
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 |