函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:static bool unpack_trans_table(struct aa_ext *e, struct aa_profile *profile)

返回类型:bool

参数:

类型参数名称
struct aa_ext *e
struct aa_profile *profile
479  saved_pos等于pointer to current position in the buffer
482  如果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
485  size等于unpack_array(e, NULL)
487  如果size大于16减4则转到:fail
489  table等于分配数组内存并置零
491  如果非table则转到:fail
494  size等于size
495 i小于size循环
497  size2等于unpack_strdup(e, & str, NULL)
501  如果非size2则转到:fail
503  table[i]等于str
509 j小于size2减1循环
510  如果非str[j]则
511  pos等于j
512  c自加
515  如果str恒等于':'则
517  如果非str[1]则转到:fail
525  如果c恒等于1则str[pos]等于':'
527  否则如果c大于1则转到:fail
529  否则如果c则转到:fail
533  如果非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则转到:fail
535  如果非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则转到:fail
538  返回: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  返回:0
调用者
名称描述
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