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_str

Proto:static int unpack_str(struct aa_ext *e, const char **string, const char *name)

Type:int

Parameter:

TypeParameterName
struct aa_ext *e
const char **string
const char *name
396  size = 0
397  pos = pointer to current position in the buffer
398  * string = NULL
399  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
400  size = aa_u16_chunck - test and do bounds checking for a u16 size based chunk*@e: serialized data read head (NOT NULL)*@chunk: start address for chunk of data (NOT NULL)* Returns: the size of chunk found with the read head at the end of the chunk.
401  If size Then
403  If src_str[size - 1] != 0 Then Go to fail
405  string = src_str
407  Return size
411  fail :
412  pointer to current position in the buffer = pos
413  Return 0
Caller
NameDescribe
unpack_strdup
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
verify_headerverify_head - unpack serialized stream header*@e: serialized data read head (NOT NULL)*@required: whether the header is required or optional*@ns: Returns - namespace if one is specified else NULL (NOT NULL)* Returns: error or 0 if header is good