函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\smack\smack_lsm.c Create Date:2022-07-27 20:52:54
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:static int smack_socket_sendmsg(struct socket *sock, struct msghdr *msg, int size)

返回类型:int

参数:

类型参数名称
struct socket *sock
struct msghdr *msg
intsize
3666  sip等于ptr to socket address structure
3668  sap等于ptr to socket address structure
3671  ssp等于sk_security
3674  rc等于0
3679  如果(sip == NULL)则返回:0
3683  :sk_family恒等于Internet IP Protocol
3684  如果size of socket address structure 小于sizeof(structsockaddr_in)或 Address family 不等于Internet IP Protocol 则返回:负EINVAL
3687  rc等于smack_netlbel_send - Set the secattr on a socket and perform access checks*@sk: the socket*@sap: the destination address* Set the correct secattr for the given socket based on the destination* address and perform any outbound access checks needed.
3688  退出
3690  :sk_family恒等于IP version 6
3691  如果size of socket address structure 小于SIN6_LEN_RFC2133 AF_INET6 不等于IP version 6 则返回:负EINVAL
3695  rsp等于smack_ipv6host_label - check host based restrictions*@sip: the object end* looks for host based access restrictions* This version will only be appropriate for really small sets of single label* hosts
3696  如果(rsp != NULL)则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  退出
3706  返回:rc