Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:selinux_socket_post_create

Proto:static int selinux_socket_post_create(struct socket *sock, int family, int type, int protocol, int kern)

Type:int

Parameter:

TypeParameterName
struct socket *sock
intfamily
inttype
intprotocol
intkern
4529  tsec = selinux_cred(current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.())
4530  isec = inode_security_novalidate(SOCK_INODE(sock))
4532  sclass = socket_type_to_security_class(family, type, protocol)
4533  sid = SECINITSID_KERNEL
4534  err = 0
4536  If Not kern Then
4537  err = socket security operations
4538  If err Then Return err
4542  security class of this object = sclass
4543  SID of this object = sid
4544  initialization flag = initialized
4546  If sk Then
4547  sksec = sk_security
4548  sock security class = sclass
4549  SID of this object = sid
4551  If sock security class == SECCLASS_SCTP_SOCKET Then sctp_assoc_state = SCTP_ASSOC_UNSET
4554  err = selinux_netlbl_socket_post_create(sk, family)
4557  Return err