/security/selinux/ss/ |
D | mls.h | 28 int mls_compute_context_len(struct policydb *p, struct context *context); 29 void mls_sid_to_context(struct policydb *p, struct context *context, 31 int mls_context_isvalid(struct policydb *p, struct context *c); 38 struct context *context, 42 int mls_from_string(struct policydb *p, char *str, struct context *context, 45 int mls_range_set(struct context *context, struct mls_range *range); 49 struct context *oldc, 50 struct context *newc); 53 struct context *scontext, 54 struct context *tcontext, [all …]
|
D | mls.c | 36 int mls_compute_context_len(struct policydb *p, struct context *context) in mls_compute_context_len() argument 48 int index_sens = context->range.level[l].sens; in mls_compute_context_len() 54 e = &context->range.level[l].cat; in mls_compute_context_len() 73 if (mls_level_eq(&context->range.level[0], in mls_compute_context_len() 74 &context->range.level[1])) in mls_compute_context_len() 90 struct context *context, in mls_sid_to_context() argument 108 context->range.level[l].sens - 1)); in mls_sid_to_context() 114 e = &context->range.level[l].cat; in mls_sid_to_context() 150 if (mls_level_eq(&context->range.level[0], in mls_sid_to_context() 151 &context->range.level[1])) in mls_sid_to_context() [all …]
|
D | sidtab.c | 40 static u32 context_to_sid(struct sidtab *s, struct context *context) in context_to_sid() argument 47 context->hash) { in context_to_sid() 48 if (context_cmp(&entry->context, context)) { in context_to_sid() 57 int sidtab_set_initial(struct sidtab *s, u32 sid, struct context *context) in sidtab_set_initial() argument 67 rc = context_cpy(&entry->leaf.context, context); in sidtab_set_initial() 79 if (!context_to_sid(s, context)) { in sidtab_set_initial() 81 hash_add(s->context_to_sid, &entry->leaf.list, context->hash); in sidtab_set_initial() 195 static struct context *sidtab_lookup(struct sidtab *s, u32 index) in sidtab_lookup() 203 return &sidtab_do_lookup(s, index, 0)->context; in sidtab_lookup() 206 static struct context *sidtab_lookup_initial(struct sidtab *s, u32 sid) in sidtab_lookup_initial() [all …]
|
D | context.h | 27 struct context { struct 37 static inline void mls_context_init(struct context *c) in mls_context_init() argument 42 static inline int mls_context_cpy(struct context *dst, struct context *src) in mls_context_cpy() 62 static inline int mls_context_cpy_low(struct context *dst, struct context *src) in mls_context_cpy_low() 82 static inline int mls_context_cpy_high(struct context *dst, struct context *src) in mls_context_cpy_high() 99 static inline int mls_context_cmp(struct context *c1, struct context *c2) in mls_context_cmp() 107 static inline void mls_context_destroy(struct context *c) in mls_context_destroy() 114 static inline void context_init(struct context *c) in context_init() 119 static inline int context_cpy(struct context *dst, struct context *src) in context_cpy() 144 static inline void context_destroy(struct context *c) in context_destroy() [all …]
|
D | sidtab.h | 22 struct context context; member 67 int (*func)(struct context *oldc, struct context *newc, void *args); 98 int sidtab_set_initial(struct sidtab *s, u32 sid, struct context *context); 99 struct context *sidtab_search(struct sidtab *s, u32 sid); 100 struct context *sidtab_search_force(struct sidtab *s, u32 sid); 104 int sidtab_context_to_sid(struct sidtab *s, struct context *context, u32 *sid);
|
D | services.c | 90 struct context *context, 95 struct context *scontext, 96 struct context *tcontext, 263 struct context *scontext, in constraint_expr_eval() 264 struct context *tcontext, in constraint_expr_eval() 265 struct context *xcontext, in constraint_expr_eval() 269 struct context *c; in constraint_expr_eval() 454 struct context *scontext, in security_dump_masked_av() 455 struct context *tcontext, in security_dump_masked_av() 533 struct context *scontext, in type_attribute_bounds_av() [all …]
|
D | services.h | 42 int context_add_hash(struct policydb *policydb, struct context *context);
|
D | policydb.h | 200 struct context context[2]; /* security context(s) */ member 315 extern int policydb_context_isvalid(struct policydb *p, struct context *c);
|
D | policydb.c | 360 context_destroy(&c->context[0]); in ocontext_destroy() 361 context_destroy(&c->context[1]); in ocontext_destroy() 864 if (!c->context[0].user) { in policydb_load_isids() 876 rc = context_add_hash(p, &c->context[0]); in policydb_load_isids() 882 rc = sidtab_set_initial(s, c->sid[0], &c->context[0]); in policydb_load_isids() 920 int policydb_context_isvalid(struct policydb *p, struct context *c) in policydb_context_isvalid() 1024 static int context_read_and_validate(struct context *c, in context_read_and_validate() 2034 rc = context_read_and_validate(&newc->context[0], p, fp); in genfs_read() 2108 rc = context_read_and_validate(&c->context[0], p, fp); in ocontext_read() 2123 rc = context_read_and_validate(&c->context[0], p, fp); in ocontext_read() [all …]
|
/security/selinux/ |
D | hooks.c | 396 const char *fscontext, *context, *rootcontext, *defcontext; member 403 kfree(opts->context); in selinux_free_mnt_opts() 430 A(context, true), 714 if (opts->context) { in selinux_set_mnt_opts() 715 rc = parse_sid(sb, opts->context, &context_sid); in selinux_set_mnt_opts() 1019 if (opts->context || opts->defcontext) in selinux_add_opt() 1021 opts->context = s; in selinux_add_opt() 1034 if (opts->context || opts->defcontext) in selinux_add_opt() 1089 char *context = NULL; in show_sid() local 1094 &context, &len); in show_sid() [all …]
|
/security/keys/ |
D | keyctl.c | 1560 char *context; in keyctl_get_security() local 1581 ret = security_key_getsecurity(key, &context); in keyctl_get_security() 1595 if (copy_to_user(buffer, context, buflen) != 0) in keyctl_get_security() 1599 kfree(context); in keyctl_get_security()
|