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:pack_trans_table - unpack a profile transition table*@e: serialized data extent information (NOT NULL)*@profile: profile to add the accept table to (NOT NULL)* Returns: 1 if table successfully unpacked

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

Type:bool

Parameter:

TypeParameterName
struct aa_ext *e
struct aa_profile *profile
479  saved_pos = pointer to current position in the buffer
482  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
485  size = unpack_array(e, NULL)
487  If size > 16 - 4 Then Go to fail
489  table = 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).
491  If Not table Then Go to fail
494  size = size
495  When i < size cycle
497  size2 = unpack_strdup(e, & str, NULL)
501  If Not size2 Then Go to fail
503  table[i] = str
509  When j < size2 - 1 cycle
510  If Not str[j] Then
511  pos = j
512  c++
515  If str == ':' Then
517  If Not str[1] Then Go to fail
525  If c == 1 Then str[pos] = ':'
527  Else if c > 1 Then Go to fail
529  Else if c Then Go to fail
533  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
535  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
538  Return 1
540  fail :
541  aa_free_domain_entries - free entries in a domain table*@domain: the domain table to free (MAYBE NULL)
542  pointer to current position in the buffer = saved_pos
543  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