Tags 382618 + patch Thanks This bug is obviously due to a change in <sepol/policydb.h>, the addition of an "s" member, which has the "value" member inside.
I'm attaching a patch that fixes this problem, by adding all the corresponding "s." before the "value" member. BTW, when doing a "debian/rules clean" 3 files got deleted, which were included in the originally uncompressed source: VERSION, slat.spec and info/slat.html. I understand that these are auto-generated files, but it is still surprising to clean the tree and be left with something different than when you started. -- Love, Marga.
diff -Naru slat-2.0/src/slat/slat.c slat-marga/src/slat/slat.c --- slat-2.0/src/slat/slat.c 2006-08-19 21:05:50.000000000 -0300 +++ slat-marga/src/slat/slat.c 2006-08-19 21:05:08.517357807 -0300 @@ -324,7 +324,7 @@ if (fpa->write_dir ? !write_like(pf->dir) : !read_like(pf->dir)) return 0; - uint32_t value = pf->datum->value; + uint32_t value = pf->datum->s.value; if (fpa->allowed & (1 << (value - 1))) fpa->list = adjoin(k, fpa->list); @@ -370,7 +370,7 @@ if (hashtab_map(cf->perms.table, perm_flow_fun, args)) return 1; if (cf->datum->comdatum) { - common_flow_t *comf = flowdb->common + cf->datum->comdatum->value - 1; + common_flow_t *comf = flowdb->common + cf->datum->comdatum->s.value - 1; if (hashtab_map(comf->perms.table, perm_flow_fun, args)) return 1; } @@ -570,7 +570,7 @@ { perm_flow_args_t args[1]; policydb_t *p = flowdb->policy; - uint32_t value = datum->value; + uint32_t value = datum->s.value; class_flow_t *cf = flowdb->class + value - 1; char *name = p->p_class_val_to_name[value - 1]; sepol_access_vector_t allowed = node->permissions; @@ -713,7 +713,7 @@ return 1; if (list) { policydb_t *p = flowdb->policy; - char *name = p->p_common_val_to_name[comf->datum->value - 1]; + char *name = p->p_common_val_to_name[comf->datum->s.value - 1]; printf("\ncommon %s\n{\n", name); print_perm_flow(table, list); printf("}\n"); @@ -731,12 +731,12 @@ hashtab_t table = cf->perms.table; symbol_list_t list = 0; policydb_t *p = flowdb->policy; - char *name = p->p_class_val_to_name[cf->datum->value - 1]; + char *name = p->p_class_val_to_name[cf->datum->s.value - 1]; printf("\nclass %s\n", name); common_datum_t *datum = cf->datum->comdatum; if (datum) { - char *comname = p->p_common_val_to_name[datum->value - 1]; + char *comname = p->p_common_val_to_name[datum->s.value - 1]; printf("# inherits from %s\n", comname); } @@ -831,7 +831,7 @@ { common_datum_t *datum = (common_datum_t *)d; common_flow_t *com = (common_flow_t *)args; - com += datum->value - 1; + com += datum->s.value - 1; com->datum = datum; if (symtab_init(&com->perms, datum->permissions.table->size)) return 1; @@ -901,7 +901,7 @@ fprintf(stderr, "Cannot find common %s\n", name); return 1; } - table = flowdb->common[datum->value - 1].perms.table; + table = flowdb->common[datum->s.value - 1].perms.table; perm_flow_t *flow = (perm_flow_t *)hashtab_search(table, perm); if (flow) return addflow(flow, common, name, perm, dir); @@ -915,14 +915,14 @@ fprintf(stderr, "Cannot find class %s\n", name); return 1; } - table = flowdb->class[datum->value - 1].perms.table; + table = flowdb->class[datum->s.value - 1].perms.table; perm_flow_t *flow = (perm_flow_t *)hashtab_search(table, perm); if (flow) return addflow(flow, common, name, perm, dir); if (datum->comdatum) { - table = flowdb->common[datum->comdatum->value - 1].perms.table; + table = flowdb->common[datum->comdatum->s.value - 1].perms.table; flow = (perm_flow_t *)hashtab_search(table, perm); - char *parent = p->p_common_val_to_name[datum->comdatum->value - 1]; + char *parent = p->p_common_val_to_name[datum->comdatum->s.value - 1]; if (flow) return addflow(flow, 1, parent, perm, dir); }