u32 buf[7]; u32 items, items2; int rc; 
u16 buf16[4], enabled; u32 buf32[7], items, items2, val; struct avtab_key key; struct avtab_datum datum; int i, rc; 
int avtab_read_item(void *fp, struct avtab_datum *avdatum, struct avtab_key *avkey){	u32 buf[7];	u32 items, items2;	int rc;	memset(avkey, 0, sizeof(struct avtab_key));	memset(avdatum, 0, sizeof(struct avtab_datum));	rc = next_entry(buf, fp, sizeof(u32));	if (rc < 0) {		printk(KERN_ERR "security: avtab: truncated entry\n");		goto bad;	}	items2 = le32_to_cpu(buf[0]);	if (items2 > ARRAY_SIZE(buf)) {		printk(KERN_ERR "security: avtab: entry overflow\n");		goto bad;	}	rc = next_entry(buf, fp, sizeof(u32)*items2);	if (rc < 0) {		printk(KERN_ERR "security: avtab: truncated entry\n");		goto bad;	}	items = 0;	avkey->source_type = le32_to_cpu(buf[items++]);	avkey->target_type = le32_to_cpu(buf[items++]);	avkey->target_class = le32_to_cpu(buf[items++]);	avdatum->specified = le32_to_cpu(buf[items++]);	if (!(avdatum->specified & (AVTAB_AV | AVTAB_TYPE))) {		printk(KERN_ERR "security: avtab: null entry\n");		goto bad;	}	if ((avdatum->specified & AVTAB_AV) &&	    (avdatum->specified & AVTAB_TYPE)) {		printk(KERN_ERR "security: avtab: entry has both access vectors and types\n");		goto bad;	}	if (avdatum->specified & AVTAB_AV) {		if (avdatum->specified & AVTAB_ALLOWED)			avtab_allowed(avdatum) = le32_to_cpu(buf[items++]);		if (avdatum->specified & AVTAB_AUDITDENY)			avtab_auditdeny(avdatum) = le32_to_cpu(buf[items++]);		if (avdatum->specified & AVTAB_AUDITALLOW)			avtab_auditallow(avdatum) = le32_to_cpu(buf[items++]);	} else {		if (avdatum->specified & AVTAB_TRANSITION)			avtab_transition(avdatum) = le32_to_cpu(buf[items++]);		if (avdatum->specified & AVTAB_CHANGE)			avtab_change(avdatum) = le32_to_cpu(buf[items++]);		if (avdatum->specified & AVTAB_MEMBER)			avtab_member(avdatum) = le32_to_cpu(buf[items++]);	}	if (items != items2) {		printk(KERN_ERR "security: avtab: entry only had %d items, expected %d\n",		       items2, items);		goto bad;	}	return 0;bad:	return -1;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/782ebb992ec20b5afdd5786ee8c2f1b58b631f24/avtab.c/clean/security/selinux/ss/avtab.c