函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:policy_view_capable - check if viewing policy in at @ns is allowed* Returns: true if viewing policy is allowed* If @ns is NULL then the namespace being viewed is assumed to be the* tasks current namespace.

函数原型:bool policy_view_capable(struct aa_ns *ns)

返回类型:bool

参数:

类型参数名称
struct aa_ns *ns namespace being viewed by current task (may be NULL)
644  user_ns等于current_user_ns()
645  view_ns等于aa_get_current_ns()
646  root_in_user_ns等于uid_eq(current_euid(), make_kuid - Map a user-namespace uid pair into a kuid)或in_egroup_p(make_kgid - Map a user-namespace gid pair into a kgid)
648  bool response = false
649  如果非 namespace being viewed by current task (may be NULL) namespace being viewed by current task (may be NULL)等于view_ns
652  如果root_in_user_nsaa_ns_visible(view_ns, namespace being viewed by current task (may be NULL), true)且user_ns恒等于userns count is 1 for root user, 1 for init_uts_ns,* and 1 for... ?unprivileged_userns_apparmor_policy不等于0且level恒等于level的值则response = true
657  aa_put_ns - decrement refcount on @ns*@ns: namespace to put reference of* Decrement reference count of @ns and if no longer in use free it
659  返回:response
调用者
名称描述
profiles_open
policy_admin_capable
param_get_aalockpolicy
param_get_aabool
param_get_aauint
param_get_aacompressionlevel
param_get_audit
param_get_mode
rawdata_open