if (!ebitmap_get_bit(&levdatum->level->cat, i - 1)) 
if (!ebitmap_get_bit(&levdatum->level->cat, i)) 
int mls_context_isvalid(struct policydb *p, struct context *c){	struct level_datum *levdatum;	struct user_datum *usrdatum;	int i, l;	if (!selinux_mls_enabled)		return 1;	/*	 * MLS range validity checks: high must dominate low, low level must	 * be valid (category set <-> sensitivity check), and high level must	 * be valid (category set <-> sensitivity check)	 */	if (!mls_level_dom(&c->range.level[1], &c->range.level[0]))		/* High does not dominate low. */		return 0;	for (l = 0; l < 2; l++) {		if (!c->range.level[l].sens || c->range.level[l].sens > p->p_levels.nprim)			return 0;		levdatum = hashtab_search(p->p_levels.table,			p->p_sens_val_to_name[c->range.level[l].sens - 1]);		if (!levdatum)			return 0;		for (i = 1; i <= ebitmap_length(&c->range.level[l].cat); i++) {			if (ebitmap_get_bit(&c->range.level[l].cat, i - 1)) {				if (i > p->p_cats.nprim)					return 0;				if (!ebitmap_get_bit(&levdatum->level->cat, i - 1))					/*					 * Category may not be associated with					 * sensitivity in low level.					 */					return 0;			}		}	}	if (c->role == OBJECT_R_VAL)		return 1;	/*	 * User must be authorized for the MLS range.	 */	if (!c->user || c->user > p->p_users.nprim)		return 0;	usrdatum = p->user_val_to_struct[c->user - 1];	if (!mls_range_contains(usrdatum->range, c->range))		return 0; /* user may not be associated with range */	return 1;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/782ebb992ec20b5afdd5786ee8c2f1b58b631f24/mls.c/buggy/security/selinux/ss/mls.c