函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:sel_netport_sid_slow - Lookup the SID of a network address using the policy*@protocol: protocol*@pnum: port*@sid: port SID* Description:* This function determines the SID of a network port by quering the security* policy

函数原型:static int sel_netport_sid_slow(u8 protocol, u16 pnum, unsigned int *sid)

返回类型:int

参数:

类型参数名称
u8protocol
u16pnum
unsigned int *sid
144  spin_lock_bh( & sel_netport_lock)
145  port等于sel_netport_find - Search for a port record*@protocol: protocol*@port: pnum* Description:* Search the network port table and return the matching record. If an entry* can not be found in the table return NULL.
146  如果(port != NULL)则
147  sid等于 SID for this node
148  spin_unlock_bh( & sel_netport_lock)
149  返回:0
152  ret等于security_port_sid( & selinux_state, protocol, pnum, sid)
153  如果ret不等于0则转到:out
155  new等于分配内存并置零
156  如果new
157  port number 等于pnum
158  transport protocol 等于protocol
159  SID for this node 等于sid
160  sel_netport_insert - Insert a new port into the table*@port: the new port record* Description:* Add a new port record to the network address hash table.
163  out :
164  spin_unlock_bh( & sel_netport_lock)
165  如果此条件成立可能性小(为编译器优化)(ret)则打印警告信息("SELinux: failure in %s(), unable to determine network port label\n", __func__)
168  返回:ret
调用者
名称描述
sel_netport_sidsel_netport_sid - Lookup the SID of a network port*@protocol: protocol*@pnum: port*@sid: port SID* Description:* This function determines the SID of a network port using the fastest method* possible