Function report |
Source Code:security\smack\smack_lsm.c |
Create Date:2022-07-28 19:23:38 |
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_sendmsg - Smack check based on destination host*@sock: the socket*@msg: the message*@size: the size of the message* Return 0 if the current subject can write to the destination host.
Proto:static int smack_socket_sendmsg(struct socket *sock, struct msghdr *msg, int size)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct socket * | sock | |
struct msghdr * | msg | |
int | size |
3671 | ssp = sk_security |
3674 | rc = 0 |
3679 | If (sip == NULL) Then Return 0 |
3683 | Case sk_family == Internet IP Protocol |
3684 | If size of socket address structure < sizeof(structsockaddr_in) || Address family != Internet IP Protocol Then Return -EINVAL |
3688 | Break |
3690 | Case sk_family == IP version 6 |
3691 | If size of socket address structure < SIN6_LEN_RFC2133 || AF_INET6 != IP version 6 Then Return -EINVAL |
3696 | If (rsp != NULL) Then rc = smk_ipv6_check - check Smack access*@subject: subject Smack label*@object: object Smack label*@address: address*@act: the action being taken* Check an IPv6 access |
3701 | 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 |
3704 | Break |
3706 | 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 |