函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:selinux_netlbl_sock_getattr - Get the cached NetLabel secattr*@sk: the socket*@sid: the SID* Query the socket's cached secattr and if the SID matches the cached value* return the cache, otherwise return NULL.

函数原型:static struct netlbl_lsm_secattr *selinux_netlbl_sock_getattr(const struct sock *sk, unsigned int sid)

返回类型:struct netlbl_lsm_secattr

参数:

类型参数名称
const struct sock *sk
unsigned intsid
103  sksec等于sk_security
104  secattr等于 NetLabel sec attributes
106  如果(secattr == NULL)则返回:NULL
109  如果flags按位与NETLBL_SECATTR_SECIDsecid恒等于sid则返回:secattr
113  返回:NULL
调用者
名称描述
selinux_netlbl_skbuff_setsidselinux_netlbl_skbuff_setsid - Set the NetLabel on a packet given a sid*@skb: the packet*@family: protocol family*@sid: the SID* Description* Call the NetLabel mechanism to set the label of a packet using @sid.