Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\selinux\hooks.c Create Date:2022-07-28 19:00:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:selinux_socket_getpeersec_dgram

Proto:static int selinux_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, unsigned int *secid)

Type:int

Parameter:

TypeParameterName
struct socket *sock
struct sk_buff *skb
unsigned int *secid
5109  peer_secid = unspecified SID
5113  If skb && protocol == htons(Internet Protocol packet ) Then family = PF_INET
5115  Else if skb && protocol == htons(IPv6 over bluebook ) Then family = PF_INET6
5117  Else if sock Then family = sk_family
5119  Else Go to out
5122  If sock && family == PF_UNIX Then
5123  isec = inode_security_novalidate(SOCK_INODE(sock))
5124  peer_secid = SID of this object
5125  Else if skb Then selinux_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  If peer_secid == unspecified SID Then Return -EINVAL
5132  Return 0