/kernel/linux/linux-5.10/security/apparmor/ |
H A D | policy.c | 59 * is referred to as an hname (hierarchical). 252 * @hname: name of the profile (NOT NULL) 257 struct aa_profile *aa_alloc_profile(const char *hname, struct aa_proxy *proxy, in aa_alloc_profile() argument 268 if (!aa_policy_init(&profile->base, NULL, hname, gfp)) in aa_alloc_profile() 282 profile->label.hname = profile->base.hname; in aa_alloc_profile() 349 * __lookup_parent - lookup the parent of a profile of name @hname 351 * @hname: hierarchical profile name to find parent of (NOT NULL) 354 * that matches hname does not need to exist, in general this 362 const char *hname) in __lookup_parent() 361 __lookup_parent(struct aa_ns *ns, const char *hname) __lookup_parent() argument 396 __lookupn_profile(struct aa_policy *base, const char *hname, size_t n) __lookupn_profile() argument 419 __lookup_profile(struct aa_policy *base, const char *hname) __lookup_profile() argument 433 aa_lookupn_profile(struct aa_ns *ns, const char *hname, size_t n) aa_lookupn_profile() argument 452 aa_lookup_profile(struct aa_ns *ns, const char *hname) aa_lookup_profile() argument 797 __lookup_replace(struct aa_ns *ns, const char *hname, bool noreplace, struct aa_profile **p, const char **info) __lookup_replace() argument [all...] |
H A D | policy_ns.c | 69 * thus the curr ns.hname is a prefix of its name. in aa_ns_name() 71 * Add + 2 to skip over // separating curr hname prefix in aa_ns_name() 72 * from the visible tail of the views hname in aa_ns_name() 74 return view->base.hname + strlen(curr->base.hname) + 2; in aa_ns_name() 189 * __aa_lookupn_ns - lookup the namespace matching @hname 191 * @hname: hierarchical ns name (NOT NULL) 192 * @n: length of @hname 200 struct aa_ns *__aa_lookupn_ns(struct aa_ns *view, const char *hname, size_t n) in __aa_lookupn_ns() argument 205 for (split = strnstr(hname, "//", in __aa_lookupn_ns() [all...] |
H A D | lib.c | 491 char *hname; in aa_policy_init() local 495 hname = aa_str_alloc(strlen(prefix) + strlen(name) + 3, gfp); in aa_policy_init() 496 if (hname) in aa_policy_init() 497 sprintf(hname, "%s//%s", prefix, name); in aa_policy_init() 499 hname = aa_str_alloc(strlen(name) + 1, gfp); in aa_policy_init() 500 if (hname) in aa_policy_init() 501 strcpy(hname, name); in aa_policy_init() 503 if (!hname) in aa_policy_init() 505 policy->hname = hname; in aa_policy_init() [all...] |
H A D | label.c | 113 AA_BUG(!a->base.hname); in ns_cmp() 114 AA_BUG(!b->base.hname); in ns_cmp() 123 return strcmp(a->base.hname, b->base.hname); in ns_cmp() 143 AA_BUG(!a->base.hname); in profile_cmp() 144 AA_BUG(!b->base.hname); in profile_cmp() 146 if (a == b || a->base.hname == b->base.hname) in profile_cmp() 152 return strcmp(a->base.hname, b->base.hname); in profile_cmp() [all...] |
H A D | audit.c | 83 profile->ns->base.hname); in audit_pre() 86 audit_log_untrustedstring(ab, profile->base.hname); in audit_pre()
|
H A D | domain.c | 106 return aa_dfa_match(profile->file.dfa, state, tp->base.hname); in match_component() 113 return aa_dfa_match(profile->file.dfa, state, tp->base.hname); in match_component() 1018 name, hat ? hat->base.hname : NULL, in build_change_hat()
|
H A D | policy_unpack.c | 115 aad(&sa)->name = new->base.hname; in audit_iface()
|
/kernel/linux/linux-6.6/security/apparmor/ |
H A D | policy.c | 59 * is referred to as an hname (hierarchical). 288 * @hname: name of the profile (NOT NULL) 294 struct aa_profile *aa_alloc_profile(const char *hname, struct aa_proxy *proxy, in aa_alloc_profile() argument 305 if (!aa_policy_init(&profile->base, NULL, hname, gfp)) in aa_alloc_profile() 327 profile->label.hname = profile->base.hname; in aa_alloc_profile() 394 * __lookup_parent - lookup the parent of a profile of name @hname 396 * @hname: hierarchical profile name to find parent of (NOT NULL) 399 * that matches hname does not need to exist, in general this 407 const char *hname) in __lookup_parent() 406 __lookup_parent(struct aa_ns *ns, const char *hname) __lookup_parent() argument 440 __create_missing_ancestors(struct aa_ns *ns, const char *hname, gfp_t gfp) __create_missing_ancestors() argument 490 __lookupn_profile(struct aa_policy *base, const char *hname, size_t n) __lookupn_profile() argument 513 __lookup_profile(struct aa_policy *base, const char *hname) __lookup_profile() argument 527 aa_lookupn_profile(struct aa_ns *ns, const char *hname, size_t n) aa_lookupn_profile() argument 546 aa_lookup_profile(struct aa_ns *ns, const char *hname) aa_lookup_profile() argument 973 __lookup_replace(struct aa_ns *ns, const char *hname, bool noreplace, struct aa_profile **p, const char **info) __lookup_replace() argument [all...] |
H A D | lib.c | 450 char *hname; in aa_policy_init() local 454 hname = aa_str_alloc(strlen(prefix) + strlen(name) + 3, gfp); in aa_policy_init() 455 if (hname) in aa_policy_init() 456 sprintf(hname, "%s//%s", prefix, name); in aa_policy_init() 458 hname = aa_str_alloc(strlen(name) + 1, gfp); in aa_policy_init() 459 if (hname) in aa_policy_init() 460 strcpy(hname, name); in aa_policy_init() 462 if (!hname) in aa_policy_init() 464 policy->hname = hname; in aa_policy_init() [all...] |
H A D | policy_ns.c | 72 * thus the curr ns.hname is a prefix of its name. in aa_ns_name() 74 * Add + 2 to skip over // separating curr hname prefix in aa_ns_name() 75 * from the visible tail of the views hname in aa_ns_name() 77 return view->base.hname + strlen(curr->base.hname) + 2; in aa_ns_name() 200 * __aa_lookupn_ns - lookup the namespace matching @hname 202 * @hname: hierarchical ns name (NOT NULL) 203 * @n: length of @hname 211 struct aa_ns *__aa_lookupn_ns(struct aa_ns *view, const char *hname, size_t n) in __aa_lookupn_ns() argument 216 for (split = strnstr(hname, "//", in __aa_lookupn_ns() [all...] |
H A D | label.c | 113 AA_BUG(!a->base.hname); in ns_cmp() 114 AA_BUG(!b->base.hname); in ns_cmp() 123 return strcmp(a->base.hname, b->base.hname); in ns_cmp() 143 AA_BUG(!a->base.hname); in profile_cmp() 144 AA_BUG(!b->base.hname); in profile_cmp() 146 if (a == b || a->base.hname == b->base.hname) in profile_cmp() 152 return strcmp(a->base.hname, b->base.hname); in profile_cmp() [all...] |
H A D | audit.c | 125 profile->ns->base.hname); in audit_pre() 128 audit_log_untrustedstring(ab, profile->base.hname); in audit_pre()
|
H A D | domain.c | 98 return aa_dfa_match(rules->file.dfa, state, tp->base.hname); in match_component() 105 return aa_dfa_match(rules->file.dfa, state, tp->base.hname); in match_component() 1044 name, hat ? hat->base.hname : NULL, in build_change_hat()
|
H A D | policy_unpack.c | 72 ad.name = new->base.hname; in audit_iface()
|
/kernel/linux/linux-5.10/security/apparmor/include/ |
H A D | lib.h | 129 * @hname - The hierarchical name 135 __counted char *hname; member 141 * basename - find the last component of an hname 142 * @name: hname to find the base profile name component of (NOT NULL) 144 * Returns: the tail (base profile name) name component of an hname 146 static inline const char *basename(const char *hname) in basename() argument 150 hname = strim((char *)hname); in basename() 151 for (split = strstr(hname, "//"); split; split = strstr(hname, "//")) in basename() [all...] |
H A D | policy_ns.h | 92 struct aa_ns *__aa_lookupn_ns(struct aa_ns *view, const char *hname, size_t n); 154 const char *hname) in __aa_lookup_ns() 156 return __aa_lookupn_ns(base, hname, strlen(hname)); in __aa_lookup_ns() 153 __aa_lookup_ns(struct aa_ns *base, const char *hname) __aa_lookup_ns() argument
|
H A D | policy.h | 172 #define name_is_shared(A, B) ((A)->hname && (A)->hname == (B)->hname) 185 struct aa_profile *aa_lookupn_profile(struct aa_ns *ns, const char *hname,
|
H A D | label.h | 119 * @hname: text representation of the label (MAYBE_NULL) 130 __counted char *hname; member
|
/kernel/linux/linux-6.6/security/apparmor/include/ |
H A D | lib.h | 140 * @hname - The hierarchical name 146 __counted char *hname; member 152 * basename - find the last component of an hname 153 * @name: hname to find the base profile name component of (NOT NULL) 155 * Returns: the tail (base profile name) name component of an hname 157 static inline const char *basename(const char *hname) in basename() argument 161 hname = strim((char *)hname); in basename() 162 for (split = strstr(hname, "//"); split; split = strstr(hname, "//")) in basename() [all...] |
H A D | policy_ns.h | 93 struct aa_ns *__aa_lookupn_ns(struct aa_ns *view, const char *hname, size_t n); 155 const char *hname) in __aa_lookup_ns() 157 return __aa_lookupn_ns(base, hname, strlen(hname)); in __aa_lookup_ns() 154 __aa_lookup_ns(struct aa_ns *base, const char *hname) __aa_lookup_ns() argument
|
H A D | policy.h | 228 #define name_is_shared(A, B) ((A)->hname && (A)->hname == (B)->hname) 244 struct aa_profile *aa_lookupn_profile(struct aa_ns *ns, const char *hname,
|
H A D | label.h | 117 * @hname: text representation of the label (MAYBE_NULL) 128 __counted char *hname; member
|
/kernel/liteos_m/components/net/lwip-2.1/porting/src/ |
H A D | api_shell.c | 63 LWIP_STATIC unsigned int get_hostip(const char *hname); 269 LWIP_STATIC unsigned int get_hostip(const char *hname) in get_hostip() argument 280 struct hostent *pent = gethostnameinfo(hname, tmphstbuf, hstbuflen); in get_hostip()
|
/kernel/liteos_a/net/lwip-2.1/enhancement/src/ |
H A D | api_shell.c | 136 LWIP_STATIC unsigned int get_hostip(const char *hname); 1589 LWIP_STATIC unsigned int get_hostip(const char *hname) argument 1594 struct hostent *pent = gethostnameinfo(hname);
|