int cil_resolve_senscat(struct cil_tree_node *current, void *extra_args)
{
	int rc = SEPOL_ERR;
	struct cil_senscat *senscat = current->data;
	struct cil_symtab_datum *sens_datum;
	struct cil_sens *sens = NULL;

	rc = cil_resolve_name(current, (char*)senscat->sens_str, CIL_SYM_SENS, extra_args, &sens_datum);
	if (rc != SEPOL_OK) {
		cil_log(CIL_ERR, "Failed to find sensitivity\n");
		goto exit;
	}

	rc = cil_resolve_cats(current, senscat->cats, extra_args);
	if (rc != SEPOL_OK) {
		goto exit;
	}

	sens = (struct cil_sens *)sens_datum;

	if (sens->cats_list == NULL ) {
		cil_list_init(&sens->cats_list, CIL_CAT);
	}

	cil_list_append(sens->cats_list, CIL_CAT, senscat->cats);

	return SEPOL_OK;

exit:
	return rc;
}
int cil_resolve_senscat(struct cil_tree_node *current, void *extra_args)
{
	int rc = SEPOL_ERR;
	struct cil_senscat *senscat = current->data;
	struct cil_symtab_datum *sens_datum;
	struct cil_sens *sens = NULL;

	rc = cil_resolve_name(current, (char*)senscat->sens_str, CIL_SYM_SENS, extra_args, &sens_datum);
	if (rc != SEPOL_OK) {
		cil_log(CIL_ERR, "Failed to find sensitivity\n");
		goto exit;
	}

	rc = cil_resolve_cats(current, senscat->cats, extra_args);
	if (rc != SEPOL_OK) {
		goto exit;
	}

	sens = (struct cil_sens *)sens_datum;

	if (sens->cats_list == NULL ) {
		cil_list_init(&sens->cats_list, CIL_CAT);
	}

	cil_list_append(sens->cats_list, CIL_CAT, senscat->cats);

	return SEPOL_OK;

exit:
	return rc;
}