Commits

Stephen Smalley  committed 660dd6e

Skip attributes.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>

  • Participants
  • Parent commits 72db14e
  • Branches seandroid, seandroid-4.3 1
    1. seandroid-4.4

Comments (0)

Files changed (1)

File tools/sepolicy-analyze.c

 {
     avtab_t exp_avtab;
     struct avtab_node *type_rules, *l1, *l2;
+    struct type_datum *type;
     int i, j;
 
     /*
     for (i = 0; i < policydb->p_types.nprim - 1; i++) {
         if (!type_rules[i].next)
             continue;
+        type = policydb->type_val_to_struct[i];
+        if (type->flavor) {
+            free_type_rules(type_rules[i].next);
+            type_rules[i].next = NULL;
+            continue;
+        }
         for (j = i + 1; j < policydb->p_types.nprim; j++) {
+            type = policydb->type_val_to_struct[j];
+            if (type->flavor) {
+                free_type_rules(type_rules[j].next);
+                type_rules[j].next = NULL;
+                continue;
+            }
             for (l1 = type_rules[i].next, l2 = type_rules[j].next;
                  l1 && l2; l1 = l1->next, l2 = l2->next) {
                 if (l1->key.source_type != l2->key.source_type)