Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:unpack_xattrs

Proto:static bool unpack_xattrs(struct aa_ext *e, struct aa_profile *profile)

Type:bool

Parameter:

TypeParameterName
struct aa_ext *e
struct aa_profile *profile
548  pos = pointer to current position in the buffer
550  If pack_nameX - check is the next element is of type X with a name of @name*@e: serialized data extent information (NOT NULL)*@code: type code*@name: name to match to the serialized element Then
553  size = unpack_array(e, NULL)
554  xattr_count = size
555  xattrs = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
556  If Not xattrs Then Go to fail
558  When i < size cycle
559  If Not unpack_strdup(e, & xattrs[i], NULL) Then Go to fail
562  If Not pack_nameX - check is the next element is of type X with a name of @name*@e: serialized data extent information (NOT NULL)*@code: type code*@name: name to match to the serialized element Then Go to fail
564  If Not pack_nameX - check is the next element is of type X with a name of @name*@e: serialized data extent information (NOT NULL)*@code: type code*@name: name to match to the serialized element Then Go to fail
568  Return 1
570  fail :
571  pointer to current position in the buffer = pos
572  Return 0
Caller
NameDescribe
unpack_profilepack_profile - unpack a serialized profile*@e: serialized data extent information (NOT NULL)* NOTE: unpack profile sets audit struct if there is a failure