函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:aa_remove_profiles - remove profile(s) from the system*@policy_ns: namespace the remove is being done from*@subj: label attempting to remove policy*@fqname: name of the profile or namespace to remove (NOT NULL)*@size: size of the name* Remove a profile or

函数原型:ssize_t aa_remove_profiles(struct aa_ns *policy_ns, struct aa_label *subj, char *fqname, size_t size)

返回类型:ssize_t

参数:

类型参数名称
struct aa_ns *policy_ns
struct aa_label *subj
char *fqname
size_tsize
1097  struct aa_ns * ns = NULL
1098  struct aa_profile * profile = NULL
1099  const char * name = fqname, * info = NULL
1100  const char * ns_name = NULL
1101  error等于0
1103  如果fqname恒等于0则
1104  info等于"no profile specified"
1105  error等于负ENOENT
1106  转到:fail
1109  如果fqname[0]恒等于':'则
1112  name等于aa_splitn_fqname(fqname, size, & ns_name, & ns_len)
1114  ns等于aa_lookupn_ns - look up a policy namespace relative to @view*@view: namespace to search in (NOT NULL)*@name: name of namespace to find (NOT NULL)*@n: length of @name* Returns: a refcounted namespace on the list, or NULL if no namespace
1116  如果非ns
1117  info等于"namespace does not exist"
1118  error等于负ENOENT
1119  转到:fail
1121  否则ns等于aa_get_ns - increment references count on @ns*@ns: namespace to increment reference count of (MAYBE NULL)* Returns: pointer to @ns, if @ns is NULL returns NULL* Requires: @ns must be held with valid refcount when called
1125  如果非name
1127  mutex_lock_nested( & lock, level)
1128  __aa_bump_ns_revision(ns)
1129  __aa_remove_ns - remove a namespace and all its children*@ns: namespace to be removed (NOT NULL)* Requires: ns->parent->lock be held and ns removed from parent.
1130  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1131  否则
1133  mutex_lock_nested( & lock, level)
1134  profile等于aa_get_profile - increment refcount on profile @p*@p: profile (MAYBE NULL)* Returns: pointer to @p if @p is NULL will return NULL* Requires: @p must be held with valid refcount when called
1135  如果非profile
1136  error等于负ENOENT
1137  info等于"profile does not exist"
1138  转到:fail_ns_lock
1140  name等于hname
1141  __aa_bump_ns_revision(ns)
1142  __remove_profile - remove old profile, and children*@profile: profile to be replaced (NOT NULL)* Requires: namespace list lock be held, or list not be shared
1143  __aa_labelset_update_subtree(ns)
1144  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1148  audit_policy - Do auditing of policy changes*@label: label to check if it can manage policy*@op: policy operation being performed*@ns_name: name of namespace being manipulated*@name: name of profile being manipulated (NOT NULL)*@info: any extra
1150  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
1151  aa_put_profile - decrement refcount on profile @p*@p: profile (MAYBE NULL)
1152  返回:size
1154  fail_ns_lock :
1155  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1156  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
1158  fail :
1159  audit_policy - Do auditing of policy changes*@label: label to check if it can manage policy*@op: policy operation being performed*@ns_name: name of namespace being manipulated*@name: name of profile being manipulated (NOT NULL)*@info: any extra
1161  返回:error
调用者
名称描述
profile_remove.remove file hook fn to remove loaded policy