Skip to contentSkip to conversation

fix hierarchy checking location

PATCH In review Joshua Brindle 2 participants 2 messages Jul 15, 2005 – Jul 18, 2005 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix hierarchy checking location

This patch puts the hierarchy check in the right place (currently it's before the policy expand)

trunk/checkpolicy/checkpolicy.c 2005-07-15 09:49:30.260465152 -0400 renamed from selinux-usr/checkpolicy/checkpolicy.c 2005-07-13 15:14:25.326064968 -0400 +5 -5
@@ -564,11 +564,6 @@ int main(int argc, char **argv)
                        exit(1);
                }
 
-               if (hierarchy_check_constraints(&parse_policy, error_msg, sizeof(error_msg))) {
-                       fprintf(stderr, "%s\n", error_msg);
-                       exit(1);
-               }
-
                if (policydb_init(&policydb, POLICY_KERN)) {
                        exit(1);
                 }
@@ -583,6 +578,11 @@ int main(int argc, char **argv)
                 }
                policydbp = &policydb;
 
+               if (hierarchy_check_constraints(policydbp, error_msg, sizeof(error_msg))) {
+                       fprintf(stderr, "%s\n", error_msg);
+                       exit(1);
+               }
+
                if (check_assertions(policydbp,
                                      policydbp->global->branch_list->avrules,
                                      &policydbp->te_avtab) ||

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw
Quoted 1 line · Joshua Brindle

This patch puts the hierarchy check in the right place (currently it's before the policy expand)

All hunks failed, but merged manually.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.