Home
last modified time | relevance | path

Searched refs:c (Results 1 – 18 of 18) sorted by relevance

/security/tomoyo/
Dutil.c203 char c = *(cp + 1); in tomoyo_parse_ulong() local
204 if (c == 'x' || c == 'X') { in tomoyo_parse_ulong()
207 } else if (c >= '0' && c <= '7') { in tomoyo_parse_ulong()
338 static inline bool tomoyo_alphabet_char(const char c) in tomoyo_alphabet_char() argument
340 return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'); in tomoyo_alphabet_char()
364 static inline bool tomoyo_valid(const unsigned char c) in tomoyo_valid() argument
366 return c > ' ' && c < 127; in tomoyo_valid()
376 static inline bool tomoyo_invalid(const unsigned char c) in tomoyo_invalid() argument
378 return c && (c <= ' ' || c >= 127); in tomoyo_invalid()
447 unsigned char c; in tomoyo_correct_word2() local
[all …]
Drealpath.c32 const unsigned char c = p[i]; in tomoyo_encode2() local
34 if (c == '\\') in tomoyo_encode2()
36 else if (c > ' ' && c < 127) in tomoyo_encode2()
49 const unsigned char c = p[i]; in tomoyo_encode2() local
51 if (c == '\\') { in tomoyo_encode2()
54 } else if (c > ' ' && c < 127) { in tomoyo_encode2()
55 *cp++ = c; in tomoyo_encode2()
58 *cp++ = (c >> 6) + '0'; in tomoyo_encode2()
59 *cp++ = ((c >> 3) & 7) + '0'; in tomoyo_encode2()
60 *cp++ = (c & 7) + '0'; in tomoyo_encode2()
Daudit.c50 const unsigned char c = kaddr[offset++]; in tomoyo_print_bprm() local
56 } else if (c == '\\') { in tomoyo_print_bprm()
59 } else if (c > ' ' && c < 127) { in tomoyo_print_bprm()
60 *cp++ = c; in tomoyo_print_bprm()
61 } else if (!c) { in tomoyo_print_bprm()
67 *cp++ = (c >> 6) + '0'; in tomoyo_print_bprm()
68 *cp++ = ((c >> 3) & 7) + '0'; in tomoyo_print_bprm()
69 *cp++ = (c & 7) + '0'; in tomoyo_print_bprm()
71 if (c) in tomoyo_print_bprm()
Ddomain.c625 const unsigned char c = env_page.data[offset++]; in tomoyo_environ() local
627 if (c && arg_len < TOMOYO_EXEC_TMPSIZE - 10) { in tomoyo_environ()
628 if (c == '=') { in tomoyo_environ()
630 } else if (c == '\\') { in tomoyo_environ()
633 } else if (c > ' ' && c < 127) { in tomoyo_environ()
634 arg_ptr[arg_len++] = c; in tomoyo_environ()
637 arg_ptr[arg_len++] = (c >> 6) + '0'; in tomoyo_environ()
639 = ((c >> 3) & 7) + '0'; in tomoyo_environ()
640 arg_ptr[arg_len++] = (c & 7) + '0'; in tomoyo_environ()
645 if (c) in tomoyo_environ()
Dcondition.c132 const unsigned char c = kaddr[offset++]; in tomoyo_scan_bprm() local
133 if (c && arg_len < TOMOYO_EXEC_TMPSIZE - 10) { in tomoyo_scan_bprm()
134 if (c == '\\') { in tomoyo_scan_bprm()
137 } else if (c > ' ' && c < 127) { in tomoyo_scan_bprm()
138 arg_ptr[arg_len++] = c; in tomoyo_scan_bprm()
141 arg_ptr[arg_len++] = (c >> 6) + '0'; in tomoyo_scan_bprm()
143 ((c >> 3) & 7) + '0'; in tomoyo_scan_bprm()
144 arg_ptr[arg_len++] = (c & 7) + '0'; in tomoyo_scan_bprm()
149 if (c) in tomoyo_scan_bprm()
Dcommon.c598 const u8 c = tomoyo_index2category[i]; in tomoyo_set_mode() local
600 tomoyo_category_keywords[c]; in tomoyo_set_mode()
2602 char c; in tomoyo_write_control() local
2616 if (get_user(c, buffer)) { in tomoyo_write_control()
2622 cp0[head->w.avail++] = c; in tomoyo_write_control()
2623 if (c != '\n') in tomoyo_write_control()
/security/selinux/ss/
Dcontext.h35 static inline void mls_context_init(struct context *c) in mls_context_init() argument
37 memset(&c->range, 0, sizeof(c->range)); in mls_context_init()
105 static inline void mls_context_destroy(struct context *c) in mls_context_destroy() argument
107 ebitmap_destroy(&c->range.level[0].cat); in mls_context_destroy()
108 ebitmap_destroy(&c->range.level[1].cat); in mls_context_destroy()
109 mls_context_init(c); in mls_context_destroy()
112 static inline void context_init(struct context *c) in context_init() argument
114 memset(c, 0, sizeof(*c)); in context_init()
141 static inline void context_destroy(struct context *c) in context_destroy() argument
143 c->user = c->role = c->type = 0; in context_destroy()
[all …]
Dpolicydb.c772 static void ocontext_destroy(struct ocontext *c, int i) in ocontext_destroy() argument
774 if (!c) in ocontext_destroy()
777 context_destroy(&c->context[0]); in ocontext_destroy()
778 context_destroy(&c->context[1]); in ocontext_destroy()
781 kfree(c->u.name); in ocontext_destroy()
782 kfree(c); in ocontext_destroy()
790 struct ocontext *c, *ctmp; in policydb_destroy() local
817 c = p->ocontexts[i]; in policydb_destroy()
818 while (c) { in policydb_destroy()
819 ctmp = c; in policydb_destroy()
[all …]
Dservices.c277 struct context *c; in constraint_expr_eval() local
402 c = scontext; in constraint_expr_eval()
404 c = tcontext; in constraint_expr_eval()
406 c = xcontext; in constraint_expr_eval()
407 if (!c) { in constraint_expr_eval()
413 val1 = c->user; in constraint_expr_eval()
415 val1 = c->role; in constraint_expr_eval()
417 val1 = c->type; in constraint_expr_eval()
1847 struct context *c, in convert_context() argument
1866 if (c->str) { in convert_context()
[all …]
Dmls.c199 int mls_context_isvalid(struct policydb *p, struct context *c) in mls_context_isvalid() argument
206 if (!mls_range_isvalid(p, &c->range)) in mls_context_isvalid()
209 if (c->role == OBJECT_R_VAL) in mls_context_isvalid()
215 if (!c->user || c->user > p->p_users.nprim) in mls_context_isvalid()
217 usrdatum = p->user_val_to_struct[c->user - 1]; in mls_context_isvalid()
218 if (!mls_range_contains(usrdatum->range, c->range)) in mls_context_isvalid()
472 struct context *c) in mls_convert_context() argument
486 c->range.level[l].sens - 1)); in mls_convert_context()
490 c->range.level[l].sens = levdatum->level->sens; in mls_convert_context()
493 ebitmap_for_each_positive_bit(&c->range.level[l].cat, node, i) { in mls_convert_context()
[all …]
Dmls.h29 int mls_context_isvalid(struct policydb *p, struct context *c);
Dpolicydb.h306 extern int policydb_context_isvalid(struct policydb *p, struct context *c);
/security/apparmor/include/
Dpolicy.h214 static inline struct aa_policy *aa_get_common(struct aa_policy *c) in aa_get_common() argument
216 if (c) in aa_get_common()
217 kref_get(&c->count); in aa_get_common()
219 return c; in aa_get_common()
Dmatch.h120 const char c);
/security/keys/
Dtrusted.c131 unsigned char c; in TSS_authhmac() local
141 c = h3; in TSS_authhmac()
165 TPM_NONCE_SIZE, h2, 1, &c, 0, 0); in TSS_authhmac()
730 static int getoptions(char *c, struct trusted_key_payload *pay, in getoptions() argument
734 char *p = c; in getoptions()
740 while ((p = strsep(&c, " \t"))) { in getoptions()
810 char *c; in datablob_parse() local
813 c = strsep(&datablob, " \t"); in datablob_parse()
814 if (!c) in datablob_parse()
816 key_cmd = match_token(c, key_tokens, args); in datablob_parse()
[all …]
/security/selinux/
Davc.c789 struct avc_callback_node *c; in avc_add_callback() local
792 c = kmalloc(sizeof(*c), GFP_KERNEL); in avc_add_callback()
793 if (!c) { in avc_add_callback()
798 c->callback = callback; in avc_add_callback()
799 c->events = events; in avc_add_callback()
800 c->next = avc_callbacks; in avc_add_callback()
801 avc_callbacks = c; in avc_add_callback()
946 struct avc_callback_node *c; in avc_ss_reset() local
951 for (c = avc_callbacks; c; c = c->next) { in avc_ss_reset()
952 if (c->events & AVC_CALLBACK_RESET) { in avc_ss_reset()
[all …]
/security/apparmor/
Dpolicy_unpack.c387 int c, j, size2 = unpack_strdup(e, &str, NULL); in unpack_trans_table() local
399 for (c = j = 0; j < size2 - 2; j++) { in unpack_trans_table()
401 c++; in unpack_trans_table()
408 if (c != 1) in unpack_trans_table()
413 } else if (c) in unpack_trans_table()
Dmatch.c398 const char c) in aa_dfa_next() argument
412 pos = base[state] + equiv[(u8) c]; in aa_dfa_next()
419 pos = base[state] + (u8) c; in aa_dfa_next()