Home
last modified time | relevance | path

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

12

/security/apparmor/include/
Dlib.h63 const char *skipn_spaces(const char *str, size_t n);
67 void aa_info_message(const char *str);
77 static inline bool aa_strneq(const char *str, const char *sub, int len) in aa_strneq() argument
79 return !strncmp(str, sub, len) && !str[len]; in aa_strneq()
109 #define str_to_counted(str) \ argument
110 ((struct counted_str *)(str - offsetof(struct counted_str, name)))
118 static inline __counted char *aa_get_str(__counted char *str) in aa_get_str() argument
120 if (str) in aa_get_str()
121 kref_get(&(str_to_counted(str)->count)); in aa_get_str()
123 return str; in aa_get_str()
[all …]
Dmatch.h127 const char *str, int len);
129 const char *str);
Dperms.h140 void aa_perm_mask_to_str(char *str, const char *chrs, u32 mask);
Dlabel.h314 int aa_label_snxprint(char *str, size_t size, struct aa_ns *view,
330 struct aa_label *aa_label_parse(struct aa_label *base, const char *str,
/security/selinux/ss/
Dcontext.h33 char *str; /* string representation if context cannot be mapped. */ member
125 if (src->str) { in context_cpy()
126 dst->str = kstrdup(src->str, GFP_ATOMIC); in context_cpy()
127 if (!dst->str) in context_cpy()
131 dst->str = NULL; in context_cpy()
136 kfree(dst->str); in context_cpy()
145 kfree(c->str); in context_destroy()
146 c->str = NULL; in context_destroy()
154 return (c1->len == c2->len && !strcmp(c1->str, c2->str)); in context_cmp()
Dservices.c1207 *scontext = kstrdup(context->str, GFP_ATOMIC); in context_struct_to_string()
1412 char *scontext2, *str = NULL; in security_context_to_sid_core() local
1442 str = kstrdup(scontext2, gfp_flags); in security_context_to_sid_core()
1443 if (!str) in security_context_to_sid_core()
1451 context.str = str; in security_context_to_sid_core()
1452 context.len = strlen(str) + 1; in security_context_to_sid_core()
1453 str = NULL; in security_context_to_sid_core()
1462 kfree(str); in security_context_to_sid_core()
1880 if (c->str) { in convert_context()
1884 s = kstrdup(c->str, GFP_KERNEL); in convert_context()
[all …]
Dmls.h41 int mls_from_string(char *str, struct context *context, gfp_t gfp_mask);
/security/apparmor/
Dlabel.c1464 #define update_for_len(total, len, size, str) \ argument
1472 str += ulen; \
1489 static int aa_profile_snxprint(char *str, size_t size, struct aa_ns *view, in aa_profile_snxprint() argument
1495 AA_BUG(!str && size != 0); in aa_profile_snxprint()
1509 return snprintf(str, size, "%s", "unconfined"); in aa_profile_snxprint()
1510 return snprintf(str, size, "%s", ns_name); in aa_profile_snxprint()
1518 return snprintf(str, size, ":%s:%s (%s)", ns_name, in aa_profile_snxprint()
1520 return snprintf(str, size, "%s (%s)", profile->base.hname, in aa_profile_snxprint()
1525 return snprintf(str, size, ":%s:%s", ns_name, in aa_profile_snxprint()
1527 return snprintf(str, size, "%s", profile->base.hname); in aa_profile_snxprint()
[all …]
Dlib.c78 const char *skipn_spaces(const char *str, size_t n) in skipn_spaces() argument
80 for (; n && isspace(*str); --n) in skipn_spaces()
81 ++str; in skipn_spaces()
83 return (char *)str; in skipn_spaces()
128 void aa_info_message(const char *str) in aa_info_message() argument
133 aad(&sa)->info = str; in aa_info_message()
136 printk(KERN_INFO "AppArmor: %s\n", str); in aa_info_message()
141 struct counted_str *str; in aa_str_alloc() local
143 str = kmalloc(sizeof(struct counted_str) + size, gfp); in aa_str_alloc()
144 if (!str) in aa_str_alloc()
[all …]
Dpath.c29 static int prepend(char **buffer, int buflen, const char *str, int namelen) in prepend() argument
35 memcpy(*buffer, str, namelen); in prepend()
204 char *str = NULL; in aa_path_name() local
205 int error = d_namespace_path(path, buffer, &str, flags, disconnected); in aa_path_name()
218 *name = str; in aa_path_name()
Dmatch.c332 const char *str, int len) in aa_dfa_match_len() argument
349 pos = base_idx(base[state]) + equiv[(u8) *str++]; in aa_dfa_match_len()
358 pos = base_idx(base[state]) + (u8) *str++; in aa_dfa_match_len()
382 const char *str) in aa_dfa_match() argument
398 while (*str) { in aa_dfa_match()
399 pos = base_idx(base[state]) + equiv[(u8) *str++]; in aa_dfa_match()
407 while (*str) { in aa_dfa_match()
408 pos = base_idx(base[state]) + (u8) *str++; in aa_dfa_match()
Dpolicy_unpack.c468 char *str; in unpack_trans_table() local
469 int c, j, pos, size2 = unpack_strdup(e, &str, NULL); in unpack_trans_table()
475 profile->file.trans.table[i] = str; in unpack_trans_table()
477 if (isspace(*str)) in unpack_trans_table()
482 if (!str[j]) { in unpack_trans_table()
487 if (*str == ':') { in unpack_trans_table()
489 if (!str[1]) in unpack_trans_table()
498 str[pos] = ':'; in unpack_trans_table()
Dfile.c47 char str[10]; in audit_file_mask() local
49 aa_perm_mask_to_str(str, aa_file_perm_chrs, map_mask_to_chr_mask(mask)); in audit_file_mask()
50 audit_log_string(ab, str); in audit_file_mask()
/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()
63 static int __init tomoyo_trigger_setup(char *str) in tomoyo_trigger_setup() argument
65 tomoyo_trigger = str; in tomoyo_trigger_setup()
Drealpath.c22 char *tomoyo_encode2(const char *str, int str_len) in tomoyo_encode2() argument
26 const char *p = str; in tomoyo_encode2()
48 p = str; in tomoyo_encode2()
77 char *tomoyo_encode(const char *str) in tomoyo_encode() argument
79 return str ? tomoyo_encode2(str, strlen(str)) : NULL; in tomoyo_encode()
Dutil.c200 u8 tomoyo_parse_ulong(unsigned long *result, char **str) in tomoyo_parse_ulong() argument
202 const char *cp = *str; in tomoyo_parse_ulong()
218 *str = ep; in tomoyo_parse_ulong()
327 static inline bool tomoyo_byte_range(const char *str) in tomoyo_byte_range() argument
329 return *str >= '0' && *str++ <= '3' && in tomoyo_byte_range()
330 *str >= '0' && *str++ <= '7' && in tomoyo_byte_range()
331 *str >= '0' && *str <= '7'; in tomoyo_byte_range()
Dcommon.h944 char *tomoyo_encode(const char *str);
945 char *tomoyo_encode2(const char *str, int str_len);
1032 u8 tomoyo_parse_ulong(unsigned long *result, char **str);
/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.c55 static int __init ima_template_setup(char *str) in ima_template_setup() argument
58 int template_len = strlen(str); in ima_template_setup()
69 template_desc = lookup_template_desc(str); in ima_template_setup()
72 str, CONFIG_IMA_DEFAULT_TEMPLATE); in ima_template_setup()
80 if (template_len == 3 && strcmp(str, IMA_TEMPLATE_IMA_NAME) == 0 && in ima_template_setup()
91 static int __init ima_template_fmt_setup(char *str) in ima_template_fmt_setup() argument
98 if (template_desc_init_fields(str, NULL, NULL) < 0) { in ima_template_fmt_setup()
100 str, CONFIG_IMA_DEFAULT_TEMPLATE); in ima_template_fmt_setup()
104 builtin_templates[num_templates - 1].fmt = str; in ima_template_fmt_setup()
Dima_appraise.c21 static int __init default_appraise_setup(char *str) in default_appraise_setup() argument
24 if (strncmp(str, "off", 3) == 0) in default_appraise_setup()
26 else if (strncmp(str, "log", 3) == 0) in default_appraise_setup()
28 else if (strncmp(str, "fix", 3) == 0) in default_appraise_setup()
Dima_main.c44 static int __init hash_setup(char *str) in hash_setup() argument
53 if (strncmp(str, "sha1", 4) == 0) in hash_setup()
55 else if (strncmp(str, "md5", 3) == 0) in hash_setup()
63 if (strcmp(str, hash_algo_name[i]) == 0) { in hash_setup()
Dima_policy.c177 static int __init default_measure_policy_setup(char *str) in default_measure_policy_setup() argument
189 static int __init policy_setup(char *str) in policy_setup() argument
193 while ((p = strsep(&str, " |\n")) != NULL) { in policy_setup()
208 static int __init default_appraise_policy_setup(char *str) in default_appraise_policy_setup() argument
973 #define __ima_hook_stringify(str) (#str), argument
/security/integrity/
Dintegrity_audit.c21 static int __init integrity_audit_setup(char *str) in integrity_audit_setup() argument
25 if (!kstrtoul(str, 0, &audit)) in integrity_audit_setup()
/security/integrity/evm/
Devm_main.c60 static int __init evm_set_fixmode(char *str) in evm_set_fixmode() argument
62 if (strncmp(str, "fix", 3) == 0) in evm_set_fixmode()
/security/
Ddevice_cgroup.c268 static void set_majmin(char *str, unsigned m) in set_majmin() argument
271 strcpy(str, "*"); in set_majmin()
273 sprintf(str, "%u", m); in set_majmin()

12