函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:selinux_socket_getpeersec_dgram

函数原型:static int selinux_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, unsigned int *secid)

返回类型:int

参数:

类型参数名称
struct socket *sock
struct sk_buff *skb
unsigned int *secid
5109  peer_secid等于unspecified SID
5113  如果skbprotocol恒等于htons(Internet Protocol packet )则family等于PF_INET
5115  否则如果skbprotocol恒等于htons(IPv6 over bluebook )则family等于PF_INET6
5117  否则如果sockfamily等于sk_family
5119  否则转到:out
5122  如果sockfamily恒等于PF_UNIX
5123  isec等于inode_security_novalidate(SOCK_INODE(sock))
5124  peer_secid等于 SID of this object
5125  否则如果skbselinux_skb_peerlbl_sid - Determine the peer label of a packet*@skb: the packet*@family: protocol family*@sid: the packet's peer label SID* Description:* Check the various different forms of network peer labeling and determine* the peer label/SID for the
5128  out :
5129  secid等于peer_secid
5130  如果peer_secid恒等于unspecified SID 则返回:负EINVAL
5132  返回:0