函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static int smack_socket_connect(struct socket *sock, struct sockaddr *sap, int addrlen)

返回类型:int

参数:

类型参数名称
struct socket *sock
struct sockaddr *sap
intaddrlen
2833  rc等于0
2835  如果(sk == NULL)则返回:0
2837  如果sk_family不等于PF_INET且非IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_IPV6)或sk_family不等于PF_INET6的值则返回:0
2840  如果addrlen小于ffsetofend(TYPE, MEMBER)*@TYPE: The type of the structure*@MEMBER: The member within the structure to get the end offset of(structsockaddr, sa_family)则返回:0
2842  如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_IPV6)且address family, AF_xxx 恒等于IP version 6
2843  sip等于sap
2848  如果addrlen小于SIN6_LEN_RFC2133则返回:0
2851  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
2852  如果(rsp != NULL)则
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  返回:rc
2864  如果address family, AF_xxx 不等于Internet IP Protocol addrlen小于sizeof(structsockaddr_in)则返回:0
2866  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.
2867  返回:rc