Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:aa_fqlookupn_profile

Proto:struct aa_profile *aa_fqlookupn_profile(struct aa_label *base, const char *fqname, size_t n)

Type:struct aa_profile

Parameter:

TypeParameterName
struct aa_label *base
const char *fqname
size_tn
464  name = aa_splitn_fqname(fqname, n, & ns_name, & ns_len)
465  If ns_name Then
466  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
467  If Not ns Then Return NULL
469  Else 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
472  If name Then profile = aa_lookup_profile - find a profile by its full or partial name*@ns: the namespace to start from (NOT NULL)*@hname: name to do lookup on. Does not contain namespace prefix (NOT NULL)*@n: size of @hname* Returns: refcounted profile or NULL if not found
474  Else if ns Then profile = aa_get_newest_profile - simple wrapper fn to wrap the label version*@p: profile (NOT NULL)* Returns refcount to newest version of the profile (maybe @p)* Requires: @p must be held with a valid refcount
477  Else profile = NULL
479  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
481  Return profile
Caller
NameDescribe
fqlookupn_profilesure stacks with components like* :ns:A//&B* have :ns: applied to both 'A' and 'B' by making the lookup relative* to the base if the lookup specifies an ns, else making the stacked lookup* relative to the last embedded ns in the string.