函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:x_to_label - get target label for a given xindex*@profile: current profile (NOT NULL)*@bprm: binprm structure of transitioning task*@name: name to lookup (NOT NULL)*@xindex: index into x transition table*@lookupname: returns: name used in lookup if one

函数原型:static struct aa_label *x_to_label(struct aa_profile *profile, const struct linux_binprm *bprm, const char *name, unsigned int xindex, const char **lookupname, const char **info)

返回类型:struct aa_label

参数:

类型参数名称
struct aa_profile *profile
const struct linux_binprm *bprm
const char *name
unsigned intxindex
const char **lookupname
const char **info
556  struct aa_label * new = NULL
557  ns等于ns
558  xtype等于xindex按位与AA_X_TYPE_MASK
559  const char * stack = NULL
562  :xtype恒等于AA_X_NONE
564  * lookupname = NULL
565  退出
566  :xtype恒等于use a specified name ->n#
568  stack等于table[xindex & The xindex is broken into 3 parts* - index - an index into either the exec name table or the variable table* - exec type - which determines how the executable name and index are used* - flags - which modify how the destination name is applied]
569  如果stack不等于'&'则
572  stack = NULL
573  退出
576  :xtype恒等于use executable name px
577  如果xindex按位与make >AA_X_NONE apply to children new等于d_attach - do attachment search for unconfined processes*@bprm - binprm structure of transitioning task*@ns: the current namespace (NOT NULL)*@head - profile list to walk (NOT NULL)*@name - to match against (NOT NULL)*@info - info message if there was an
581  否则new等于d_attach - do attachment search for unconfined processes*@bprm - binprm structure of transitioning task*@ns: the current namespace (NOT NULL)*@head - profile list to walk (NOT NULL)*@name - to match against (NOT NULL)*@info - info message if there was an
585  lookupname等于name
586  退出
589  如果非new
590  如果xindex按位与AA_X_INHERIT
594  info等于"ix fallback"
597  否则如果xindex按位与AA_X_UNCONFINED
599  info等于"ux fallback"
603  如果newstack
605  base等于new
607  new等于aa_label_parse(base, stack, GFP_KERNEL, true, false)
608  如果是错误new = NULL
610  aa_put_label(base)
614  返回:new
调用者
名称描述
profile_transition