函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smack_socket_post_create - finish socket setup*@sock: the socket*@family: protocol family*@type: unused*@protocol: unused*@kern: unused* Sets the netlabel information on the socket* Returns 0 on success, and error code otherwise

函数原型:static int smack_socket_post_create(struct socket *sock, int family, int type, int protocol, int kern)

返回类型:int

参数:

类型参数名称
struct socket *sock
intfamily
inttype
intprotocol
intkern
2755  如果(sk == NULL)则返回:0
2761  如果此条件成立可能性小(为编译器优化)(flags & I am a kernel thread )则
2762  ssp等于sk_security
2763  inbound label 等于smack_known_web
2764  outbound label 等于smack_known_web
2767  如果family不等于PF_INET则返回:0
2772  返回:smack_netlabel - Set the secattr on a socket*@sk: the socket*@labeled: socket label scheme* Convert the outbound smack value (smk_out) to a* secattr and attach it to the socket.* Returns 0 on success or an error code