函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:selinux_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.

函数原型:static int selinux_netlbl_socket_connect_helper(struct sock *sk, struct sockaddr *addr)

返回类型:int

参数:

类型参数名称
struct sock *sk
struct sockaddr *addr
545  sksec等于sk_security
551  如果address family, AF_xxx 恒等于Supported address families.
552  netlbl_sock_delattr(sk)
553  nlbl_state等于NLBL_REQSKB
554  rc等于0
555  返回:rc
557  secattr等于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
558  如果(secattr == NULL)则
559  rc等于负ENOMEM
560  返回:rc
562  rc等于netlbl_conn_setattr(sk, addr, secattr)
563  如果rc恒等于0则nlbl_state等于NLBL_CONNLABELED
566  返回:rc
调用者
名称描述
selinux_netlbl_socket_connect_lockedselinux_netlbl_socket_connect_locked - Label a client-side socket on* connect*@sk: the socket to label*@addr: the destination address* Description:* Attempt to label a connected socket that already has the socket locked