函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:int selinux_netlbl_socket_post_create(struct sock *sk, u16 family)

返回类型:int

参数:

类型参数名称
struct sock *sk
u16family
392  sksec等于sk_security
395  如果family不等于PF_INETfamily不等于PF_INET6则返回:0
398  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
399  如果(secattr == NULL)则返回:负ENOMEM
401  rc等于netlbl_sock_setattr(sk, family, secattr)
403  :rc恒等于0
404  nlbl_state等于NLBL_LABELED
405  退出
406  :rc恒等于负EDESTADDRREQ
407  nlbl_state等于NLBL_REQSKB
408  rc等于0
409  退出
412  返回:rc