函数逻辑报告 |
Source Code:security\smack\smack_lsm.c |
Create Date:2022-07-27 20:53:15 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:smack_socket_sock_rcv_skb - Smack packet delivery access check*@sk: socket*@skb: packet* Returns 0 if the packet should be delivered, an error code otherwise
函数原型:static int smack_socket_sock_rcv_skb(struct sock *sk, struct sk_buff *skb)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct sock * | sk | |
struct sk_buff * | skb |
3844 | ssp等于sk_security |
3845 | struct smack_known * skp = NULL |
3846 | rc等于0 |
3869 | skp等于smack_from_secid(secmark) |
3870 | 转到:access_check |
3878 | rc等于netlbl_skbuff_getattr(skb, family, & secattr) |
3881 | 否则skp等于smack_net_ambient |
3887 | access_check : |
3890 | smk_ad_init_net( & ad, __func__, LSM_AUDIT_DATA_NET, & net) |
3901 | rc等于smk_access(skp, inbound label , MAY_WRITE, & ad) |
3902 | rc等于smk_bu_note("IPv4 delivery", skp, inbound label , MAY_WRITE, rc) |
3904 | 如果rc不等于0则netlbl_skbuff_err(skb, family, rc, 0) |
3906 | 退出 |
3909 | proto等于smk_skb_to_addr_ipv6(skb, & sadd) |
3910 | 如果proto不等于IPPROTO_UDP且proto不等于IPPROTO_UDPLITE且proto不等于IPPROTO_TCP且proto不等于IPPROTO_DCCP则退出 |
3914 | 如果skb且secmark不等于0则skp等于smack_from_secid(secmark) |
3916 | 否则如果smk_ipv6_localhost - Check for local ipv6 host address*@sip: the address* Returns boolean true if this is the localhost address则退出 |
3920 | 如果(skp == NULL)则skp等于smack_net_ambient |
3925 | smk_ad_init_net( & ad, __func__, LSM_AUDIT_DATA_NET, & net) |
3928 | ipv6_skb_to_auditdata(skb, & a, NULL) |
3930 | rc等于smk_access(skp, inbound label , MAY_WRITE, & ad) |
3931 | rc等于smk_bu_note("IPv6 delivery", skp, inbound label , MAY_WRITE, rc) |
3935 | 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 |
3937 | 如果rc不等于0则icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADM_PROHIBITED, 0) |
3940 | 退出 |
3944 | 返回:rc |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |