• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/security/selinux/ss/

Lines Matching refs:context

33  * security context string representation of `context'.
35 int mls_compute_context_len(struct context * context)
46 len += strlen(policydb.p_sens_val_to_name[context->range.level[l].sens - 1]);
48 ebitmap_for_each_bit(&context->range.level[l].cat, node, i) {
68 if (mls_level_eq(&context->range.level[0],
69 &context->range.level[1]))
80 * Write the security context string representation of
81 * the MLS fields of `context' into the string `*scontext'.
84 void mls_sid_to_context(struct context *context,
103 policydb.p_sens_val_to_name[context->range.level[l].sens - 1]);
104 scontextp += strlen(policydb.p_sens_val_to_name[context->range.level[l].sens - 1]);
107 ebitmap_for_each_bit(&context->range.level[l].cat, node, i) {
148 if (mls_level_eq(&context->range.level[0],
149 &context->range.level[1]))
163 * Return 1 if the MLS fields in the security context
166 int mls_context_isvalid(struct policydb *p, struct context *c)
223 * Set the MLS fields in the security context structure
224 * `context' based on the string representation in
233 * copy the MLS field of the associated default context.
242 struct context *context,
260 * No MLS component to the security context, try and map to
264 struct context *defcon;
273 rc = mls_context_cpy(context, defcon);
293 context->range.level[l].sens = levdatum->level->sens;
318 rc = ebitmap_set_bit(&context->range.level[l].cat,
339 rc = ebitmap_set_bit(&context->range.level[l].cat, i, 1);
363 context->range.level[1].sens = context->range.level[0].sens;
364 rc = ebitmap_cpy(&context->range.level[1].cat,
365 &context->range.level[0].cat);
376 * Set the MLS fields in the security context structure
377 * `context' based on the string representation in
381 int mls_from_string(char *str, struct context *context, gfp_t gfp_mask)
395 rc = mls_context_to_sid(':', &tmpstr, context,
404 * Copies the MLS range `range' into `context'.
406 static inline int mls_range_set(struct context *context,
411 /* Copy the MLS range into the context */
413 context->range.level[l].sens = range->level[l].sens;
414 rc = ebitmap_cpy(&context->range.level[l].cat,
423 int mls_setup_user_range(struct context *fromcon, struct user_datum *user,
424 struct context *usercon)
462 * Convert the MLS fields in the security context
468 struct context *c)
508 int mls_compute_sid(struct context *scontext,
509 struct context *tcontext,
512 struct context *newcontext)
558 * @context: the security context
562 * Given the security context copy the low MLS sensitivity level into the
566 void mls_export_netlbl_lvl(struct context *context,
572 secattr->mls_lvl = context->range.level[0].sens - 1;
578 * @context: the security context
582 * Given the security context and the NetLabel security attributes, copy the
583 * NetLabel MLS sensitivity level into the context.
586 void mls_import_netlbl_lvl(struct context *context,
592 context->range.level[0].sens = secattr->mls_lvl + 1;
593 context->range.level[1].sens = context->range.level[0].sens;
598 * @context: the security context
602 * Given the security context copy the low MLS categories into the NetLabel
606 int mls_export_netlbl_cat(struct context *context,
614 rc = ebitmap_netlbl_export(&context->range.level[0].cat,
624 * @context: the security context
628 * Copy the NetLabel security attributes into the SELinux context; since the
630 * both the low and high categories of the context. Returns zero on success,
634 int mls_import_netlbl_cat(struct context *context,
642 rc = ebitmap_netlbl_import(&context->range.level[0].cat,
647 rc = ebitmap_cpy(&context->range.level[1].cat,
648 &context->range.level[0].cat);
655 ebitmap_destroy(&context->range.level[0].cat);
656 ebitmap_destroy(&context->range.level[1].cat);