函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:selinux_netlbl_sock_genattr - Generate the NetLabel socket secattr*@sk: the socket* Description:* Generate the NetLabel security attributes for a socket, making full use of* the socket's attribute cache. Returns a pointer to the security attributes

函数原型:static struct netlbl_lsm_secattr *selinux_netlbl_sock_genattr(struct sock *sk)

返回类型:struct netlbl_lsm_secattr

参数:

类型参数名称
struct sock *sk
70  sksec等于sk_security
73  如果( NetLabel sec attributes != NULL)则返回: NetLabel sec attributes
76  secattr等于lbl_secattr_alloc - Allocate and initialize a netlbl_lsm_secattr struct*@flags: the memory allocation flags* Description:* Allocate and initialize a netlbl_lsm_secattr struct. Returns a valid* pointer on success, or NULL on failure.
77  如果(secattr == NULL)则返回:NULL
79  rc等于security_netlbl_sid_to_secattr( & selinux_state, SID of this object , secattr)
81  如果rc不等于0则
82  lbl_secattr_free - Frees a netlbl_lsm_secattr struct*@secattr: the struct to free* Description:* Frees @secattr including all of the internal buffers.
83  返回:NULL
85  NetLabel sec attributes 等于secattr
87  返回:secattr
调用者
名称描述
selinux_netlbl_socket_post_createselinux_netlbl_socket_post_create - Label a socket using NetLabel*@sock: the socket to label*@family: protocol family* Description:* Attempt to label a socket using the NetLabel mechanism using the given* SID
selinux_netlbl_socket_connect_helperselinux_netlbl_socket_connect_helper - Help label a client-side socket on* connect*@sk: the socket to label*@addr: the destination address* Description:* Attempt to label a connected socket with NetLabel using the given address.