函数逻辑报告 |
Source Code:security\selinux\hooks.c |
Create Date:2022-07-27 20:32:13 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:This supports connect(2) and SCTP connect services such as sctp_connectx(3)* and sctp_sendmsg(3) as described in Documentation/security/SCTP.rst
函数原型:static int selinux_socket_connect_helper(struct socket *sock, struct sockaddr *address, int addrlen)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct socket * | sock | |
struct sockaddr * | address | |
int | addrlen |
4714 | sksec等于sk_security |
4717 | err等于sock_has_perm(sk, SOCKET__CONNECT) |
4720 | 如果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)则返回:负EINVAL |
4726 | 如果address family, AF_xxx 恒等于Supported address families. 则返回:0 |
4737 | struct lsm_network_audit net = {0, } |
4738 | struct sockaddr_in * addr4 = NULL |
4739 | struct sockaddr_in6 * addr6 = NULL |
4755 | 当:address family, AF_xxx 恒等于IP version 6 |
4761 | 默认 |
4765 | 如果 sock security class 恒等于SECCLASS_SCTP_SOCKET则返回:负EINVAL |
4767 | 否则返回:负EAFNOSUPPORT |
4771 | err等于sel_netport_sid(sk_protocol, snum, & sid) |
4776 | 当: sock security class 恒等于SECCLASS_TCP_SOCKET |
4777 | perm等于TCP_SOCKET__NAME_CONNECT |
4778 | 退出 |
4779 | 当: sock security class 恒等于SECCLASS_DCCP_SOCKET |
4781 | 退出 |
4782 | 当: sock security class 恒等于SECCLASS_SCTP_SOCKET |
4784 | 退出 |
4787 | type等于LSM_AUDIT_DATA_NET |
4790 | family等于address family, AF_xxx |
4797 | 返回:0 |
名称 | 描述 |
---|---|
selinux_socket_connect | Supports connect(2), see comments in selinux_socket_connect_helper() |
selinux_sctp_bind_connect | Check if sctp IPv4/IPv6 addresses are valid for binding or connecting* based on their @optname. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |