函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:apparmor_socket_post_create - setup the per-socket security struct* Note:* - kernel sockets currently labeled unconfined but we may want to* move to a special kernel label* - socket may not have sk here if created with sock_create_lite or* sock_alloc

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

返回类型:int

参数:

类型参数名称
struct socket *sock
intfamily
inttype
intprotocol
intkern
847  如果kern
848  ns等于aa_get_current_ns()
850  label等于aa_get_label(ns_unconfined(ns))
851  aa_put_ns - decrement refcount on @ns*@ns: namespace to put reference of* Decrement reference count of @ns and if no longer in use free it
852  否则label等于aa_get_current_label - get the newest version of the current tasks label* Returns: newest version of confining label (NOT NULL)* This fn will not update the tasks cred, so it is safe inside of locks* The returned reference must be put with aa_put_label()
855  如果sk
856  ctx等于SK_CTX(sk)
858  aa_put_label(label)
859  label等于aa_get_label(label)
861  aa_put_label(label)
863  返回:0