函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:helper fn for transition on pivotroot* Returns: label for transition or ERR_PTR. Does not return NULL

函数原型:static struct aa_label *build_pivotroot(struct aa_profile *profile, const struct path *new_path, char *new_buffer, const struct path *old_path, char *old_buffer)

返回类型:struct aa_label

参数:

类型参数名称
struct aa_profile *profile
const struct path *new_path
char *new_buffer
const struct path *old_path
char *old_buffer
644  const char * old_name, * new_name = NULL, * info = NULL
645  const char * trans_name = NULL
646  struct aa_perms perms = {}
650  AA_BUG(!profile)
651  AA_BUG(!new_path)
652  AA_BUG(!old_path)
654  如果profile_unconfined(profile)或非PROFILE_MEDIATES(profile, AA_CLASS_MOUNT)则返回:aa_get_newest_label - find the newest version of @l*@l: the label to check for newer versions of* Returns: refcounted newest version of @l taking into account* replacement, renames and removals* return @l.
658  error等于aa_path_name - get the pathname to a buffer ensure dir / is appended*@path: path the file (NOT NULL)*@flags: flags controlling path name generation*@buffer: buffer to put name in (NOT NULL)*@name: Returns - the generated path name if !error (NOT
661  如果error则转到:audit
663  error等于aa_path_name - get the pathname to a buffer ensure dir / is appended*@path: path the file (NOT NULL)*@flags: flags controlling path name generation*@buffer: buffer to put name in (NOT NULL)*@name: Returns - the generated path name if !error (NOT
666  如果error则转到:audit
669  error等于负EACCES
670  state等于aa_dfa_match - traverse @dfa to find state @str stops at*@dfa: the dfa to match @str against (NOT NULL)*@start: the state of the dfa to start matching in*@str: the null terminated string of bytes to match against the dfa (NOT NULL)* aa_dfa_match will
673  state等于aa_dfa_null_transition - step to next state after null character*@dfa: the dfa to match against*@start: the state of the dfa to start matching in* aa_dfa_null_transition transitions to the next state after a null* character which is not used in standard
674  state等于aa_dfa_match - traverse @dfa to find state @str stops at*@dfa: the dfa to match @str against (NOT NULL)*@start: the state of the dfa to start matching in*@str: the null terminated string of bytes to match against the dfa (NOT NULL)* aa_dfa_match will
675  perms等于mpute_mnt_perms - compute mount permission associated with @state*@dfa: dfa to match against (NOT NULL)*@state: state match finished in* Returns: mount permissions
677  如果mount perms 按位与allowerror等于0
680  audit :
681  error等于audit_mount - handle the auditing of mount operations*@profile: the profile being enforced (NOT NULL)*@op: operation being mediated (NOT NULL)*@name: name of object being mediated (MAYBE NULL)*@src_name: src_name of object being mediated
684  如果error则返回:错误号
687  返回:aa_get_newest_label - find the newest version of @l*@l: the label to check for newer versions of* Returns: refcounted newest version of @l taking into account* replacement, renames and removals* return @l.
调用者
名称描述
aa_pivotroot