Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:lsm_append

Proto:static int lsm_append(const char *new, char **result)

Type:int

Parameter:

TypeParameterName
const char *new
char **result
418  If ( * result == NULL) Then
419  result = kstrdup - allocate space for and copy an existing string*@s: the string to duplicate*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Return: newly allocated copy of @s or %NULL in case of error
420  If ( * result == NULL) Then Return -ENOMEM
422  Else
424  If match_last_lsm( * result, new) Then Return 0
426  cp = kasprintf(GFP_KERNEL, "%s,%s", * result, new)
427  If (cp == NULL) Then Return -ENOMEM
429  kfree( * result)
430  result = cp
432  Return 0
Caller
NameDescribe
security_initsecurity_init - initializes the security framework* This should be called early in the kernel initialization sequence.
security_add_hookssecurity_add_hooks - Add a modules hooks to the hook lists.*@hooks: the hooks to add*@count: the number of hooks to add*@lsm: the name of the security module* Each LSM has to register its hooks with the infrastructure.