函数逻辑报告 |
Source Code:security\selinux\hooks.c |
Create Date:2022-07-27 20:32:03 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Range of port numbers used to automatically bind.Need to determine whether we should perform a name_bindpermission check between the socket and the port number.
函数原型:static int selinux_socket_bind(struct socket *sock, struct sockaddr *address, int addrlen)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct socket * | sock | |
struct sockaddr * | address | |
int | addrlen |
4579 | sksec等于sk_security |
4583 | err等于sock_has_perm(sk, SOCKET__BIND) |
4592 | struct lsm_network_audit net = {0, } |
4593 | struct sockaddr_in * addr4 = NULL |
4594 | struct sockaddr_in6 * addr6 = NULL |
4605 | 如果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 |
4610 | 当:family_sa恒等于Internet IP Protocol |
4611 | 如果addrlen小于sizeof(structsockaddr_in)则返回:负EINVAL |
4614 | 如果family_sa恒等于Supported address families. 则 |
4618 | 如果s_addr不等于htonl(Address to accept any incoming messages. )则转到:err_af |
4622 | snum等于ntohs( Port number ) |
4624 | 退出 |
4625 | 当:family_sa恒等于IP version 6 |
4632 | 默认 |
4633 | 转到:err_af |
4636 | type等于LSM_AUDIT_DATA_NET |
4641 | 如果snum则 |
4644 | inet_get_local_port_range(sock_net(sk), & low, & high) |
4648 | err等于sel_netport_sid(sk_protocol, snum, & sid) |
4662 | 当: sock security class 恒等于SECCLASS_TCP_SOCKET |
4664 | 退出 |
4666 | 当: sock security class 恒等于SECCLASS_UDP_SOCKET |
4668 | 退出 |
4670 | 当: sock security class 恒等于SECCLASS_DCCP_SOCKET |
4672 | 退出 |
4674 | 当: sock security class 恒等于SECCLASS_SCTP_SOCKET |
4676 | 退出 |
4678 | 默认 |
4680 | 退出 |
4683 | err等于sel_netnode_sid(addrp, family_sa, & sid) |
4687 | 如果family_sa恒等于Internet IP Protocol 则saddr等于s_addr |
4689 | 否则saddr等于 IPv6 address |
4698 | out : |
4699 | 返回:err |
4700 | err_af : |
4702 | 如果 sock security class 恒等于SECCLASS_SCTP_SOCKET则返回:负EINVAL |
4704 | 返回:负EAFNOSUPPORT |
名称 | 描述 |
---|---|
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 插件可实现:逻辑报告 代码生成和批量转换代码 |