Home
last modified time | relevance | path

Searched refs:str (Results 1 – 25 of 37) sorted by relevance

12

/security/apparmor/include/
Dlib.h54 const char *skipn_spaces(const char *str, size_t n);
58 void aa_info_message(const char *str);
71 static inline bool aa_strneq(const char *str, const char *sub, int len) in aa_strneq() argument
73 return !strncmp(str, sub, len) && !str[len]; in aa_strneq()
103 #define str_to_counted(str) \ argument
104 ((struct counted_str *)(str - offsetof(struct counted_str, name)))
112 static inline __counted char *aa_get_str(__counted char *str) in aa_get_str() argument
114 if (str) in aa_get_str()
115 kref_get(&(str_to_counted(str)->count)); in aa_get_str()
117 return str; in aa_get_str()
[all …]
Dmatch.h130 const char *str, int len);
132 const char *str);
138 const char *str, const char **retpos);
140 const char *str, int n, const char **retpos);
160 const char *str, unsigned int *count);
Dlabel.h312 int aa_label_snxprint(char *str, size_t size, struct aa_ns *view,
328 struct aa_label *aa_label_strn_parse(struct aa_label *base, const char *str,
331 struct aa_label *aa_label_parse(struct aa_label *base, const char *str,
334 static inline const char *aa_label_strn_split(const char *str, int n) in aa_label_strn_split() argument
339 state = aa_dfa_matchn_until(stacksplitdfa, DFA_START, str, n, &pos); in aa_label_strn_split()
346 static inline const char *aa_label_str_split(const char *str) in aa_label_str_split() argument
351 state = aa_dfa_match_until(stacksplitdfa, DFA_START, str, &pos); in aa_label_str_split()
/security/apparmor/
Dlabel.c1487 #define update_for_len(total, len, size, str) \ argument
1495 str += ulen; \
1512 static int aa_profile_snxprint(char *str, size_t size, struct aa_ns *view, in aa_profile_snxprint() argument
1518 AA_BUG(!str && size != 0); in aa_profile_snxprint()
1532 return snprintf(str, size, "%s", "unconfined"); in aa_profile_snxprint()
1533 return snprintf(str, size, "%s", ns_name); in aa_profile_snxprint()
1541 return snprintf(str, size, ":%s:%s (%s)", ns_name, in aa_profile_snxprint()
1543 return snprintf(str, size, "%s (%s)", profile->base.hname, in aa_profile_snxprint()
1548 return snprintf(str, size, ":%s:%s", ns_name, in aa_profile_snxprint()
1550 return snprintf(str, size, "%s", profile->base.hname); in aa_profile_snxprint()
[all …]
Dmatch.c440 const char *str, int len) in aa_dfa_match_len() argument
457 equiv[(u8) *str++]); in aa_dfa_match_len()
461 match_char(state, def, base, next, check, (u8) *str++); in aa_dfa_match_len()
480 const char *str) in aa_dfa_match() argument
496 while (*str) in aa_dfa_match()
498 equiv[(u8) *str++]); in aa_dfa_match()
501 while (*str) in aa_dfa_match()
502 match_char(state, def, base, next, check, (u8) *str++); in aa_dfa_match()
568 const char *str, const char **retpos) in aa_dfa_match_until() argument
585 while (*str) { in aa_dfa_match_until()
[all …]
Dlib.c74 const char *skipn_spaces(const char *str, size_t n) in skipn_spaces() argument
76 for (; n && isspace(*str); --n) in skipn_spaces()
77 ++str; in skipn_spaces()
79 return (char *)str; in skipn_spaces()
124 void aa_info_message(const char *str) in aa_info_message() argument
129 aad(&sa)->info = str; in aa_info_message()
132 printk(KERN_INFO "AppArmor: %s\n", str); in aa_info_message()
137 struct counted_str *str; in aa_str_alloc() local
139 str = kmalloc(sizeof(struct counted_str) + size, gfp); in aa_str_alloc()
140 if (!str) in aa_str_alloc()
[all …]
Dpath.c25 static int prepend(char **buffer, int buflen, const char *str, int namelen) in prepend() argument
31 memcpy(*buffer, str, namelen); in prepend()
200 char *str = NULL; in aa_path_name() local
201 int error = d_namespace_path(path, buffer, &str, flags, disconnected); in aa_path_name()
214 *name = str; in aa_path_name()
Dfile.c48 char str[10]; in file_audit_cb() local
51 aa_perm_mask_to_str(str, sizeof(str), aa_file_perm_chrs, in file_audit_cb()
53 audit_log_format(ab, " requested_mask=\"%s\"", str); in file_audit_cb()
56 aa_perm_mask_to_str(str, sizeof(str), aa_file_perm_chrs, in file_audit_cb()
58 audit_log_format(ab, " denied_mask=\"%s\"", str); in file_audit_cb()
Dpolicy_unpack.c496 char *str; in unpack_trans_table() local
497 int c, j, pos, size2 = unpack_strdup(e, &str, NULL); in unpack_trans_table()
503 profile->file.trans.table[i] = str; in unpack_trans_table()
505 if (isspace(*str)) in unpack_trans_table()
510 if (!str[j]) { in unpack_trans_table()
515 if (*str == ':') { in unpack_trans_table()
517 if (!str[1]) in unpack_trans_table()
526 str[pos] = ':'; in unpack_trans_table()
/security/selinux/ss/
Dcontext.h33 char *str; /* string representation if context cannot be mapped. */ member
157 if (src->str) { in context_cpy()
158 dst->str = kstrdup(src->str, GFP_ATOMIC); in context_cpy()
159 if (!dst->str) in context_cpy()
163 dst->str = NULL; in context_cpy()
168 kfree(dst->str); in context_cpy()
177 kfree(c->str); in context_destroy()
178 c->str = NULL; in context_destroy()
186 return (c1->len == c2->len && !strcmp(c1->str, c2->str)); in context_cmp()
Dsidtab.c27 char str[]; member
343 context->str); in sidtab_context_to_sid()
554 const char *str, u32 str_len) in sidtab_sid2str_put() argument
588 memcpy(cache->str, str, str_len); in sidtab_sid2str_put()
615 *out = kmemdup(cache->str, cache->len, GFP_ATOMIC); in sidtab_sid2str_get()
Dsidtab.h140 const char *str, u32 str_len);
146 const char *str, u32 str_len) in sidtab_sid2str_put() argument
Dcontext.c27 return full_name_hash(NULL, c->str, c->len); in context_compute_hash()
Dservices.c1247 *scontext = kstrdup(context->str, GFP_ATOMIC); in context_struct_to_string()
1526 char *scontext2, *str = NULL; in security_context_to_sid_core() local
1558 str = kstrdup(scontext2, gfp_flags); in security_context_to_sid_core()
1559 if (!str) in security_context_to_sid_core()
1570 context.str = str; in security_context_to_sid_core()
1571 context.len = strlen(str) + 1; in security_context_to_sid_core()
1572 str = NULL; in security_context_to_sid_core()
1578 if (context.str) { in security_context_to_sid_core()
1579 str = context.str; in security_context_to_sid_core()
1580 context.str = NULL; in security_context_to_sid_core()
[all …]
Dmls.h45 int mls_from_string(struct policydb *p, char *str, struct context *context,
/security/tomoyo/
Dload_policy.c24 static int __init tomoyo_loader_setup(char *str) in tomoyo_loader_setup() argument
26 tomoyo_loader = str; in tomoyo_loader_setup()
64 static int __init tomoyo_trigger_setup(char *str) in tomoyo_trigger_setup() argument
66 tomoyo_trigger = str; in tomoyo_trigger_setup()
Drealpath.c23 char *tomoyo_encode2(const char *str, int str_len) in tomoyo_encode2() argument
27 const char *p = str; in tomoyo_encode2()
49 p = str; in tomoyo_encode2()
78 char *tomoyo_encode(const char *str) in tomoyo_encode() argument
80 return str ? tomoyo_encode2(str, strlen(str)) : NULL; in tomoyo_encode()
Dutil.c185 u8 tomoyo_parse_ulong(unsigned long *result, char **str) in tomoyo_parse_ulong() argument
187 const char *cp = *str; in tomoyo_parse_ulong()
205 *str = ep; in tomoyo_parse_ulong()
316 static inline bool tomoyo_byte_range(const char *str) in tomoyo_byte_range() argument
318 return *str >= '0' && *str++ <= '3' && in tomoyo_byte_range()
319 *str >= '0' && *str++ <= '7' && in tomoyo_byte_range()
320 *str >= '0' && *str <= '7'; in tomoyo_byte_range()
/security/keys/encrypted-keys/
Dencrypted.h40 static inline void dump_hmac(const char *str, const u8 *digest, in dump_hmac() argument
43 if (str) in dump_hmac()
44 pr_info("encrypted_key: %s", str); in dump_hmac()
62 static inline void dump_hmac(const char *str, const u8 *digest, in dump_hmac() argument
/security/integrity/ima/
Dima_template.c100 static int __init ima_template_setup(char *str) in ima_template_setup() argument
103 int template_len = strlen(str); in ima_template_setup()
115 template_desc = lookup_template_desc(str); in ima_template_setup()
118 str, CONFIG_IMA_DEFAULT_TEMPLATE); in ima_template_setup()
126 if (template_len == 3 && strcmp(str, IMA_TEMPLATE_IMA_NAME) == 0 && in ima_template_setup()
138 static int __init ima_template_fmt_setup(char *str) in ima_template_fmt_setup() argument
145 if (template_desc_init_fields(str, NULL, NULL) < 0) { in ima_template_fmt_setup()
147 str, CONFIG_IMA_DEFAULT_TEMPLATE); in ima_template_fmt_setup()
151 builtin_templates[num_templates - 1].fmt = str; in ima_template_fmt_setup()
Dima_appraise.c26 const char *str = ima_appraise_cmdline_default; in ima_appraise_parse_cmdline() local
30 if (!str) in ima_appraise_parse_cmdline()
33 if (strncmp(str, "off", 3) == 0) in ima_appraise_parse_cmdline()
35 else if (strncmp(str, "log", 3) == 0) in ima_appraise_parse_cmdline()
37 else if (strncmp(str, "fix", 3) == 0) in ima_appraise_parse_cmdline()
39 else if (strncmp(str, "enforce", 7) == 0) in ima_appraise_parse_cmdline()
42 pr_err("invalid \"%s\" appraise option", str); in ima_appraise_parse_cmdline()
49 str); in ima_appraise_parse_cmdline()
Dima_main.c46 static int __init hash_setup(char *str) in hash_setup() argument
55 if (strncmp(str, "sha1", 4) == 0) { in hash_setup()
57 } else if (strncmp(str, "md5", 3) == 0) { in hash_setup()
61 str, IMA_TEMPLATE_IMA_NAME); in hash_setup()
67 i = match_string(hash_algo_name, HASH_ALGO__LAST, str); in hash_setup()
69 pr_err("invalid hash algorithm \"%s\"", str); in hash_setup()
Dima.h207 #define __ima_hook_enumify(ENUM, str) ENUM, argument
209 #define __ima_hook_measuring_stringify(ENUM, str) \ argument
210 (__ima_stringify(measuring_ ##str)),
/security/integrity/
Dintegrity_audit.c18 static int __init integrity_audit_setup(char *str) in integrity_audit_setup() argument
22 if (!kstrtoul(str, 0, &audit)) in integrity_audit_setup()
/security/integrity/evm/
Devm_main.c82 static int __init evm_set_fixmode(char *str) in evm_set_fixmode() argument
84 if (strncmp(str, "fix", 3) == 0) in evm_set_fixmode()
87 pr_err("invalid \"%s\" mode", str); in evm_set_fixmode()

12