Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:selinux_netlbl_skbuff_getsid - Get the sid of a packet using NetLabel*@skb: the packet*@family: protocol family*@type: NetLabel labeling protocol type*@sid: the SID* Description:* Call the NetLabel mechanism to get the security attributes of the given*

Proto:int selinux_netlbl_skbuff_getsid(struct sk_buff *skb, u16 family, unsigned int *type, unsigned int *sid)

Type:int

Parameter:

TypeParameterName
struct sk_buff *skb
u16family
unsigned int *type
unsigned int *sid
196  If Not LSM protocol operations (NetLabel LSM/kernel API) Then
197  sid = unspecified SID
198  Return 0
201  lbl_secattr_init - Initialize a netlbl_lsm_secattr struct*@secattr: the struct to initialize* Description:* Initialize an already allocated netlbl_lsm_secattr struct.
202  rc = netlbl_skbuff_getattr(skb, family, & secattr)
203  If rc == 0 && flags != map values for 'flags' Then rc = selinux_netlbl_sidlookup_cached - Cache a SID lookup*@skb: the packet*@secattr: the NetLabel security attributes*@sid: the SID* Description:* Query the SELinux security server to lookup the correct SID for the given* security attributes
206  Else sid = unspecified SID
208  type = type
209  lbl_secattr_destroy - Clears a netlbl_lsm_secattr struct*@secattr: the struct to clear* Description:* Destroys the @secattr struct, including freeing all of the internal buffers.* The struct must be reset with a call to netlbl_secattr_init() before reuse.
211  Return rc
Caller
NameDescribe
selinux_skb_peerlbl_sidselinux_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