Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\apparmor\domain.c Create Date:2022-07-28 19:51:38
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:helper fn for change_hat* Returns: label for hat transition OR ERR_PTR. Does NOT return NULL

Proto:static struct aa_label *build_change_hat(struct aa_profile *profile, const char *name, bool sibling)

Type:struct aa_label

Parameter:

TypeParameterName
struct aa_profile *profile
const char *name
boolsibling
1002  struct aa_profile * root, * hat = NULL
1003  const char * info = NULL
1004  error = 0
1006  If sibling && PROFILE_IS_HAT(profile) Then
1007  root = aa_get_profile_rcu - increment a refcount profile that can be replaced*@p: pointer to profile that can be replaced (NOT NULL)* Returns: pointer to a refcounted profile.* else NULL if no profile
1008  Else if Not sibling && Not PROFILE_IS_HAT(profile) Then
1009  root = 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
1010  Else
1011  info = "conflicting target types"
1012  error = -EPERM
1013  Go to audit
1016  hat = aa_find_child - find a profile by @name in @parent*@parent: profile to search (NOT NULL)*@name: profile name to search for (NOT NULL)* Returns: a refcounted profile or NULL if not found
1017  If Not hat Then
1018  error = -ENOENT
1019  If COMPLAIN_MODE(profile) Then
1022  If Not hat Then
1023  info = "failed null profile create"
1024  error = -ENOMEM
1028  aa_put_profile - decrement refcount on profile @p*@p: profile (MAYBE NULL)
1030  audit :
1031  aa_audit_file - handle the auditing of file operations*@profile: the profile being enforced (NOT NULL)*@perms: the permissions computed for the request (NOT NULL)*@op: operation being mediated*@request: permissions requested*@name: name of object being
1035  If Not hat || error && error != -ENOENT Then Return ERR_PTR(error)
1040  Return label
Caller
NameDescribe
change_hathelper fn for changing into a hat* Returns: label for hat transition or ERR_PTR. Does not return NULL