Home
last modified time | relevance | path

Searched refs:context (Results 1 – 10 of 10) sorted by relevance

/security/selinux/ss/
Dmls.h27 int mls_compute_context_len(struct context *context);
28 void mls_sid_to_context(struct context *context, char **scontext);
29 int mls_context_isvalid(struct policydb *p, struct context *c);
36 struct context *context,
40 int mls_from_string(char *str, struct context *context, gfp_t gfp_mask);
44 struct context *context);
46 int mls_compute_sid(struct context *scontext,
47 struct context *tcontext,
50 struct context *newcontext);
52 int mls_setup_user_range(struct context *fromcon, struct user_datum *user,
[all …]
Dmls.c35 int mls_compute_context_len(struct context *context) in mls_compute_context_len() argument
47 int index_sens = context->range.level[l].sens; in mls_compute_context_len()
53 e = &context->range.level[l].cat; in mls_compute_context_len()
72 if (mls_level_eq(&context->range.level[0], in mls_compute_context_len()
73 &context->range.level[1])) in mls_compute_context_len()
88 void mls_sid_to_context(struct context *context, in mls_sid_to_context() argument
106 policydb.p_sens_val_to_name[context->range.level[l].sens - 1]); in mls_sid_to_context()
112 e = &context->range.level[l].cat; in mls_sid_to_context()
148 if (mls_level_eq(&context->range.level[0], in mls_sid_to_context()
149 &context->range.level[1])) in mls_sid_to_context()
[all …]
Dsidtab.c33 int sidtab_insert(struct sidtab *s, u32 sid, struct context *context) in sidtab_insert() argument
62 if (context_cpy(&newnode->context, context)) { in sidtab_insert()
85 static struct context *sidtab_search_core(struct sidtab *s, u32 sid, int force) in sidtab_search_core()
98 if (force && cur && sid == cur->sid && cur->context.len) in sidtab_search_core()
99 return &cur->context; in sidtab_search_core()
101 if (cur == NULL || sid != cur->sid || cur->context.len) { in sidtab_search_core()
112 return &cur->context; in sidtab_search_core()
115 struct context *sidtab_search(struct sidtab *s, u32 sid) in sidtab_search()
120 struct context *sidtab_search_force(struct sidtab *s, u32 sid) in sidtab_search_force()
127 struct context *context, in sidtab_map() argument
[all …]
Dsidtab.h14 struct context context; /* security context structure */ member
33 int sidtab_insert(struct sidtab *s, u32 sid, struct context *context);
34 struct context *sidtab_search(struct sidtab *s, u32 sid);
35 struct context *sidtab_search_force(struct sidtab *s, u32 sid);
39 struct context *context,
44 struct context *context,
Dcontext.h26 struct context { struct
35 static inline void mls_context_init(struct context *c) in mls_context_init()
40 static inline int mls_context_cpy(struct context *dst, struct context *src) in mls_context_cpy()
63 static inline int mls_context_cpy_low(struct context *dst, struct context *src) in mls_context_cpy_low()
83 static inline int mls_context_cmp(struct context *c1, struct context *c2) in mls_context_cmp()
94 static inline void mls_context_destroy(struct context *c) in mls_context_destroy()
104 static inline void context_init(struct context *c) in context_init()
109 static inline int context_cpy(struct context *dst, struct context *src) in context_cpy()
133 static inline void context_destroy(struct context *c) in context_destroy()
142 static inline int context_cmp(struct context *c1, struct context *c2) in context_cmp()
Dservices.c88 static int context_struct_to_string(struct context *context, char **scontext,
91 static int context_struct_compute_av(struct context *scontext,
92 struct context *tcontext,
107 static int constraint_expr_eval(struct context *scontext, in constraint_expr_eval()
108 struct context *tcontext, in constraint_expr_eval()
109 struct context *xcontext, in constraint_expr_eval()
113 struct context *c; in constraint_expr_eval()
285 static void type_attribute_bounds_av(struct context *scontext, in type_attribute_bounds_av()
286 struct context *tcontext, in type_attribute_bounds_av()
291 struct context lo_scontext; in type_attribute_bounds_av()
[all …]
Dpolicydb.h156 struct context context[2]; /* security context(s) */ member
262 extern int policydb_context_isvalid(struct policydb *p, struct context *c);
Dpolicydb.c617 context_destroy(&c->context[0]); in ocontext_destroy()
618 context_destroy(&c->context[1]); in ocontext_destroy()
740 if (!c->context[0].user) { in policydb_load_isids()
746 if (sidtab_insert(s, c->sid[0], &c->context[0])) { in policydb_load_isids()
782 int policydb_context_isvalid(struct policydb *p, struct context *c) in policydb_context_isvalid()
889 static int context_read_and_validate(struct context *c, in context_read_and_validate()
1888 rc = context_read_and_validate(&c->context[0], p, fp); in policydb_read()
1907 rc = context_read_and_validate(&c->context[0], p, fp); in policydb_read()
1910 rc = context_read_and_validate(&c->context[1], p, fp); in policydb_read()
1921 rc = context_read_and_validate(&c->context[0], p, fp); in policydb_read()
[all …]
/security/selinux/
Dhooks.c484 char *context = NULL; in selinux_get_mnt_opts() local
522 rc = security_sid_to_context(sbsec->sid, &context, &len); in selinux_get_mnt_opts()
525 opts->mnt_opts[i] = context; in selinux_get_mnt_opts()
529 rc = security_sid_to_context(sbsec->mntpoint_sid, &context, &len); in selinux_get_mnt_opts()
532 opts->mnt_opts[i] = context; in selinux_get_mnt_opts()
536 rc = security_sid_to_context(sbsec->def_sid, &context, &len); in selinux_get_mnt_opts()
539 opts->mnt_opts[i] = context; in selinux_get_mnt_opts()
546 rc = security_sid_to_context(isec->sid, &context, &len); in selinux_get_mnt_opts()
549 opts->mnt_opts[i] = context; in selinux_get_mnt_opts()
852 char *context = NULL, *defcontext = NULL; in selinux_parse_opts_str() local
[all …]
/security/keys/
Dkeyctl.c1170 char *context; in keyctl_get_security() local
1191 ret = security_key_getsecurity(key, &context); in keyctl_get_security()
1205 if (copy_to_user(buffer, context, buflen) != 0) in keyctl_get_security()
1209 kfree(context); in keyctl_get_security()