函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:selinux_netlbl_socket_setsockopt - Do not allow users to remove a NetLabel*@sock: the socket*@level: the socket level or protocol*@optname: the socket option name* Description:* Check the setsockopt() call and if the user is trying to replace the IP*

函数原型:int selinux_netlbl_socket_setsockopt(struct socket *sock, int level, int optname)

返回类型:int

参数:

类型参数名称
struct socket *sock
intlevel
intoptname
505  rc等于0
506  sk等于sk
507  sksec等于sk_security
510  如果selinux_netlbl_option - Is this a NetLabel option*@level: the socket level or protocol*@optname: the socket option name* Description:* Returns true if @level and @optname refer to a NetLabel option.* Helper for selinux_netlbl_socket_setsockopt().nlbl_state恒等于NLBL_LABELEDnlbl_state恒等于NLBL_CONNLABELED的值则
513  lbl_secattr_init - Initialize a netlbl_lsm_secattr struct*@secattr: the struct to initialize* Description:* Initialize an already allocated netlbl_lsm_secattr struct.
514  lock_sock(sk)
518  rc等于netlbl_sock_getattr(sk, & secattr)
519  release_sock(sk)
520  如果rc恒等于0则rc等于负EACCES
522  否则如果rc恒等于负ENOMSGrc等于0
524  lbl_secattr_destroy - Clears a netlbl_lsm_secattr struct*@secattr: the struct to clear* Description:* Destroys the @secattr struct, including freeing all of the internal buffers.* The struct must be reset with a call to netlbl_secattr_init() before reuse.
527  返回:rc
调用者
名称描述
selinux_socket_setsockopt