Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:static int selinux_netlbl_socket_connect_helper(struct sock *sk, struct sockaddr *addr)

Type:int

Parameter:

TypeParameterName
struct sock *sk
struct sockaddr *addr
545  sksec = sk_security
551  If address family, AF_xxx == Supported address families. Then
552  netlbl_sock_delattr(sk)
553  nlbl_state = NLBL_REQSKB
554  rc = 0
555  Return 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  If (secattr == NULL) Then
559  rc = -ENOMEM
560  Return rc
562  rc = netlbl_conn_setattr(sk, addr, secattr)
563  If rc == 0 Then nlbl_state = NLBL_CONNLABELED
566  Return rc
Caller
NameDescribe
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