Lines Matching refs:diff
132 diff = setools.PolicyDifference(p1, p2) variable
135 print("Policy Properties ({0} Modified)".format(len(diff.modified_properties)))
137 if diff.modified_properties and not args.stats:
138 for name, added, removed in sorted(diff.modified_properties, key=lambda x: x.property):
144 if diff.added_commons or diff.removed_commons or diff.modified_commons or args.common:
146 len(diff.added_commons), len(diff.removed_commons), len(diff.modified_commons)))
147 if diff.added_commons and not args.stats:
148 print(" Added Commons: {0}".format(len(diff.added_commons)))
149 for c in sorted(diff.added_commons):
151 if diff.removed_commons and not args.stats:
152 print(" Removed Commons: {0}".format(len(diff.removed_commons)))
153 for c in sorted(diff.removed_commons):
155 if diff.modified_commons and not args.stats:
156 print(" Modified Commons: {0}".format(len(diff.modified_commons)))
157 for name, mod in sorted(diff.modified_commons.items()):
172 if diff.added_classes or diff.removed_classes or diff.modified_classes or args.class_:
174 len(diff.added_classes), len(diff.removed_classes), len(diff.modified_classes)))
175 if diff.added_classes and not args.stats:
176 print(" Added Classes: {0}".format(len(diff.added_classes)))
177 for c in sorted(diff.added_classes):
179 if diff.removed_classes and not args.stats:
180 print(" Removed Classes: {0}".format(len(diff.removed_classes)))
181 for c in sorted(diff.removed_classes):
183 if diff.modified_classes and not args.stats:
184 print(" Modified Classes: {0}".format(len(diff.modified_classes)))
185 for name, mod in sorted(diff.modified_classes.items()):
200 if diff.added_booleans or diff.removed_booleans or \
201 diff.modified_booleans or args.bool_:
203 len(diff.added_booleans), len(diff.removed_booleans),
204 len(diff.modified_booleans)))
205 if diff.added_booleans and not args.stats:
206 print(" Added Booleans: {0}".format(len(diff.added_booleans)))
207 for a in sorted(diff.added_booleans):
209 if diff.removed_booleans and not args.stats:
210 print(" Removed Booleans: {0}".format(len(diff.removed_booleans)))
211 for a in sorted(diff.removed_booleans):
213 if diff.modified_booleans and not args.stats:
214 print(" Modified Booleans: {0}".format(len(diff.modified_booleans)))
215 for name, mod in sorted(diff.modified_booleans.items()):
223 if diff.added_roles or diff.removed_roles or diff.modified_roles or args.role:
224 print("Roles ({0} Added, {1} Removed, {2} Modified)".format(len(diff.added_roles),
225 len(diff.removed_roles),
226 len(diff.modified_roles)))
227 if diff.added_roles and not args.stats:
228 print(" Added Roles: {0}".format(len(diff.added_roles)))
229 for r in sorted(diff.added_roles):
231 if diff.removed_roles and not args.stats:
232 print(" Removed Roles: {0}".format(len(diff.removed_roles)))
233 for r in sorted(diff.removed_roles):
235 if diff.modified_roles and not args.stats:
236 print(" Modified Roles: {0}".format(len(diff.modified_roles)))
237 for name, mod in sorted(diff.modified_roles.items()):
252 if diff.added_types or diff.removed_types or diff.modified_types or args.type_:
253 print("Types ({0} Added, {1} Removed, {2} Modified)".format(len(diff.added_types),
254 len(diff.removed_types),
255 len(diff.modified_types)))
256 if diff.added_types and not args.stats:
257 print(" Added Types: {0}".format(len(diff.added_types)))
258 for r in sorted(diff.added_types):
260 if diff.removed_types and not args.stats:
261 print(" Removed Types: {0}".format(len(diff.removed_types)))
262 for r in sorted(diff.removed_types):
264 if diff.modified_types and not args.stats:
265 print(" Modified Types: {0}".format(len(diff.modified_types)))
266 for name, mod in sorted(diff.modified_types.items()):
300 if diff.added_type_attributes or diff.removed_type_attributes or \
301 diff.modified_type_attributes or args.attribute:
303 len(diff.added_type_attributes), len(diff.removed_type_attributes),
304 len(diff.modified_type_attributes)))
305 if diff.added_type_attributes and not args.stats:
306 print(" Added Type Attributes: {0}".format(len(diff.added_type_attributes)))
307 for a in sorted(diff.added_type_attributes):
309 if diff.removed_type_attributes and not args.stats:
310 print(" Removed Type Attributes: {0}".format(len(diff.removed_type_attributes)))
311 for a in sorted(diff.removed_type_attributes):
313 if diff.modified_type_attributes and not args.stats:
314 print(" Modified Type Attributes: {0}".format(len(diff.modified_type_attributes)))
315 for name, mod in sorted(diff.modified_type_attributes.items()):
330 if diff.added_users or diff.removed_users or diff.modified_users or args.user:
331 print("Users ({0} Added, {1} Removed, {2} Modified)".format(len(diff.added_users),
332 len(diff.removed_users),
333 len(diff.modified_users)))
334 if diff.added_users and not args.stats:
335 print(" Added Users: {0}".format(len(diff.added_users)))
336 for u in sorted(diff.added_users):
338 if diff.removed_users and not args.stats:
339 print(" Removed Users: {0}".format(len(diff.removed_users)))
340 for u in sorted(diff.removed_users):
342 if diff.modified_users and not args.stats:
343 print(" Modified Users: {0}".format(len(diff.modified_users)))
344 for name, mod in sorted(diff.modified_users.items()):
375 if diff.added_categories or diff.removed_categories or diff.modified_categories \
378 len(diff.added_categories), len(diff.removed_categories),
379 len(diff.modified_categories)))
380 if diff.added_categories and not args.stats:
381 print(" Added Categories: {0}".format(len(diff.added_categories)))
382 for c in sorted(diff.added_categories):
384 if diff.removed_categories and not args.stats:
385 print(" Removed Categories: {0}".format(len(diff.removed_categories)))
386 for c in sorted(diff.removed_categories):
388 if diff.modified_categories and not args.stats:
389 print(" Modified Categories: {0}".format(len(diff.modified_categories)))
390 for name, mod in sorted(diff.modified_categories.items()):
407 if diff.added_sensitivities or diff.removed_sensitivities or diff.modified_sensitivities \
410 len(diff.added_sensitivities), len(diff.removed_sensitivities),
411 len(diff.modified_sensitivities)))
412 if diff.added_sensitivities and not args.stats:
413 print(" Added Sensitivites: {0}".format(len(diff.added_sensitivities)))
414 for s in sorted(diff.added_sensitivities):
416 if diff.removed_sensitivities and not args.stats:
417 print(" Removed Sensitivities: {0}".format(len(diff.removed_sensitivities)))
418 for s in sorted(diff.removed_sensitivities):
420 if diff.modified_sensitivities and not args.stats:
421 print(" Modified Sensitivities: {0}".format(len(diff.modified_sensitivities)))
422 for name, mod in sorted(diff.modified_sensitivities.items()):
439 if diff.added_levels or diff.removed_levels or \
440 diff.modified_levels or args.level:
442 len(diff.added_levels), len(diff.removed_levels),
443 len(diff.modified_levels)))
444 if diff.added_levels and not args.stats:
445 print(" Added Levels: {0}".format(len(diff.added_levels)))
446 for l in sorted(diff.added_levels):
448 if diff.removed_levels and not args.stats:
449 print(" Removed Levels: {0}".format(len(diff.removed_levels)))
450 for l in sorted(diff.removed_levels):
452 if diff.modified_levels and not args.stats:
453 print(" Modified Levels: {0}".format(len(diff.modified_levels)))
454 for level, added_categories, removed_categories, _ in sorted(diff.modified_levels,
470 if diff.added_allows or diff.removed_allows or diff.modified_allows or args.allow:
472 len(diff.added_allows), len(diff.removed_allows), len(diff.modified_allows)))
474 if diff.added_allows and not args.stats:
475 print(" Added Allow Rules: {0}".format(len(diff.added_allows)))
476 for r in sorted(diff.added_allows):
479 if diff.removed_allows and not args.stats:
480 print(" Removed Allow Rules: {0}".format(len(diff.removed_allows)))
481 for r in sorted(diff.removed_allows):
484 if diff.modified_allows and not args.stats:
485 print(" Modified Allow Rules: {0}".format(len(diff.modified_allows)))
487 for rule, added_perms, removed_perms, matched_perms in sorted(diff.modified_allows,
504 if diff.added_allowxperms or diff.removed_allowxperms or diff.modified_allowxperms \
508 len(diff.added_allowxperms), len(diff.removed_allowxperms),
509 len(diff.modified_allowxperms)))
511 if diff.added_allowxperms and not args.stats:
512 print(" Added Allowxperm Rules: {0}".format(len(diff.added_allowxperms)))
513 for r in sorted(diff.added_allowxperms):
516 if diff.removed_allowxperms and not args.stats:
517 print(" Removed Allowxperm Rules: {0}".format(len(diff.removed_allowxperms)))
518 for r in sorted(diff.removed_allowxperms):
521 if diff.modified_allowxperms and not args.stats:
522 print(" Modified Allowxperm Rules: {0}".format(len(diff.modified_allowxperms)))
525 diff.modified_allowxperms, key=lambda x: x.rule):
560 if diff.added_neverallows or diff.removed_neverallows or diff.modified_neverallows or \
563 len(diff.added_neverallows), len(diff.removed_neverallows),
564 len(diff.modified_neverallows)))
566 if diff.added_neverallows and not args.stats:
567 print(" Added Neverallow Rules: {0}".format(len(diff.added_neverallows)))
568 for r in sorted(diff.added_neverallows):
571 if diff.removed_neverallows and not args.stats:
572 print(" Removed Neverallow Rules: {0}".format(len(diff.removed_neverallows)))
573 for r in sorted(diff.removed_neverallows):
576 if diff.modified_neverallows and not args.stats:
577 print(" Modified Neverallow Rules: {0}".format(len(diff.modified_neverallows)))
580 diff.modified_neverallows, key=lambda x: x.rule):
596 if diff.added_neverallowxperms or diff.removed_neverallowxperms or \
597 diff.modified_neverallowxperms or args.neverallowxperm:
600 len(diff.added_neverallowxperms), len(diff.removed_neverallowxperms),
601 len(diff.modified_neverallowxperms)))
603 if diff.added_neverallowxperms and not args.stats:
605 len(diff.added_neverallowxperms)))
606 for r in sorted(diff.added_neverallowxperms):
609 if diff.removed_neverallowxperms and not args.stats:
611 len(diff.removed_neverallowxperms)))
612 for r in sorted(diff.removed_neverallowxperms):
615 if diff.modified_neverallowxperms and not args.stats:
617 len(diff.modified_neverallowxperms)))
620 diff.modified_neverallowxperms, key=lambda x: x.rule):
655 if diff.added_auditallows or diff.removed_auditallows or diff.modified_auditallows or \
658 len(diff.added_auditallows), len(diff.removed_auditallows),
659 len(diff.modified_auditallows)))
661 if diff.added_auditallows and not args.stats:
662 print(" Added Auditallow Rules: {0}".format(len(diff.added_auditallows)))
663 for r in sorted(diff.added_auditallows):
666 if diff.removed_auditallows and not args.stats:
667 print(" Removed Auditallow Rules: {0}".format(len(diff.removed_auditallows)))
668 for r in sorted(diff.removed_auditallows):
671 if diff.modified_auditallows and not args.stats:
672 print(" Modified Auditallow Rules: {0}".format(len(diff.modified_auditallows)))
675 diff.modified_auditallows, key=lambda x: x.rule):
691 if diff.added_auditallowxperms or diff.removed_auditallowxperms or \
692 diff.modified_auditallowxperms or args.auditallowxperm:
695 len(diff.added_auditallowxperms), len(diff.removed_auditallowxperms),
696 len(diff.modified_auditallowxperms)))
698 if diff.added_auditallowxperms and not args.stats:
700 len(diff.added_auditallowxperms)))
701 for r in sorted(diff.added_auditallowxperms):
704 if diff.removed_auditallowxperms and not args.stats:
706 len(diff.removed_auditallowxperms)))
707 for r in sorted(diff.removed_auditallowxperms):
710 if diff.modified_auditallowxperms and not args.stats:
712 len(diff.modified_auditallowxperms)))
715 diff.modified_auditallowxperms, key=lambda x: x.rule):
750 if diff.added_dontaudits or diff.removed_dontaudits or diff.modified_dontaudits or \
753 len(diff.added_dontaudits), len(diff.removed_dontaudits),
754 len(diff.modified_dontaudits)))
756 if diff.added_dontaudits and not args.stats:
757 print(" Added Dontaudit Rules: {0}".format(len(diff.added_dontaudits)))
758 for r in sorted(diff.added_dontaudits):
761 if diff.removed_dontaudits and not args.stats:
762 print(" Removed Dontaudit Rules: {0}".format(len(diff.removed_dontaudits)))
763 for r in sorted(diff.removed_dontaudits):
766 if diff.modified_dontaudits and not args.stats:
767 print(" Modified Dontaudit Rules: {0}".format(len(diff.modified_dontaudits)))
770 diff.modified_dontaudits, key=lambda x: x.rule):
786 if diff.added_dontauditxperms or diff.removed_dontauditxperms or \
787 diff.modified_dontauditxperms or args.dontauditxperm:
790 len(diff.added_dontauditxperms), len(diff.removed_dontauditxperms),
791 len(diff.modified_dontauditxperms)))
793 if diff.added_dontauditxperms and not args.stats:
795 len(diff.added_dontauditxperms)))
796 for r in sorted(diff.added_dontauditxperms):
799 if diff.removed_dontauditxperms and not args.stats:
801 len(diff.removed_dontauditxperms)))
802 for r in sorted(diff.removed_dontauditxperms):
805 if diff.modified_dontauditxperms and not args.stats:
807 len(diff.modified_dontauditxperms)))
810 diff.modified_dontauditxperms, key=lambda x: x.rule):
845 if diff.added_type_transitions or diff.removed_type_transitions or \
846 diff.modified_type_transitions or args.type_trans:
848 len(diff.added_type_transitions), len(diff.removed_type_transitions),
849 len(diff.modified_type_transitions)))
851 if diff.added_type_transitions and not args.stats:
853 len(diff.added_type_transitions)))
854 for r in sorted(diff.added_type_transitions):
857 if diff.removed_type_transitions and not args.stats:
859 len(diff.removed_type_transitions)))
860 for r in sorted(diff.removed_type_transitions):
863 if diff.modified_type_transitions and not args.stats:
865 len(diff.modified_type_transitions)))
867 for rule, added_default, removed_default in sorted(diff.modified_type_transitions,
889 if diff.added_type_changes or diff.removed_type_changes or \
890 diff.modified_type_changes or args.type_change:
892 len(diff.added_type_changes), len(diff.removed_type_changes),
893 len(diff.modified_type_changes)))
895 if diff.added_type_changes and not args.stats:
896 print(" Added Type_change Rules: {0}".format(len(diff.added_type_changes)))
897 for r in sorted(diff.added_type_changes):
900 if diff.removed_type_changes and not args.stats:
901 print(" Removed Type_change Rules: {0}".format(len(diff.removed_type_changes)))
902 for r in sorted(diff.removed_type_changes):
905 if diff.modified_type_changes and not args.stats:
906 print(" Modified Type_change Rules: {0}".format(len(diff.modified_type_changes)))
908 for rule, added_default, removed_default in sorted(diff.modified_type_changes,
930 if diff.added_type_members or diff.removed_type_members or \
931 diff.modified_type_members or args.type_member:
933 len(diff.added_type_members), len(diff.removed_type_members),
934 len(diff.modified_type_members)))
936 if diff.added_type_members and not args.stats:
937 print(" Added Type_member Rules: {0}".format(len(diff.added_type_members)))
938 for r in sorted(diff.added_type_members):
941 if diff.removed_type_members and not args.stats:
942 print(" Removed Type_member Rules: {0}".format(len(diff.removed_type_members)))
943 for r in sorted(diff.removed_type_members):
946 if diff.modified_type_members and not args.stats:
947 print(" Modified Type_member Rules: {0}".format(len(diff.modified_type_members)))
949 for rule, added_default, removed_default in sorted(diff.modified_type_members,
971 if diff.added_role_allows or diff.removed_role_allows or args.role_allow:
973 len(diff.added_role_allows), len(diff.removed_role_allows)))
975 if diff.added_role_allows and not args.stats:
977 len(diff.added_role_allows)))
978 for r in sorted(diff.added_role_allows):
981 if diff.removed_role_allows and not args.stats:
983 len(diff.removed_role_allows)))
984 for r in sorted(diff.removed_role_allows):
990 if diff.added_role_transitions or diff.removed_role_transitions or \
991 diff.modified_role_transitions or args.role_trans:
993 len(diff.added_role_transitions), len(diff.removed_role_transitions),
994 len(diff.modified_role_transitions)))
996 if diff.added_role_transitions and not args.stats:
998 len(diff.added_role_transitions)))
999 for r in sorted(diff.added_role_transitions):
1002 if diff.removed_role_transitions and not args.stats:
1004 len(diff.removed_role_transitions)))
1005 for r in sorted(diff.removed_role_transitions):
1008 if diff.modified_role_transitions and not args.stats:
1010 len(diff.modified_role_transitions)))
1012 for rule, added_default, removed_default in sorted(diff.modified_role_transitions,
1023 if diff.added_range_transitions or diff.removed_range_transitions or \
1024 diff.modified_range_transitions or args.range_trans:
1026 len(diff.added_range_transitions), len(diff.removed_range_transitions),
1027 len(diff.modified_range_transitions)))
1029 if diff.added_range_transitions and not args.stats:
1031 len(diff.added_range_transitions)))
1032 for r in sorted(diff.added_range_transitions):
1035 if diff.removed_range_transitions and not args.stats:
1037 len(diff.removed_range_transitions)))
1038 for r in sorted(diff.removed_range_transitions):
1041 if diff.modified_range_transitions and not args.stats:
1043 len(diff.modified_range_transitions)))
1045 for rule, added_default, removed_default in sorted(diff.modified_range_transitions,
1058 if diff.added_constrains or diff.removed_constrains or args.constrain:
1060 len(diff.added_constrains), len(diff.removed_constrains)))
1062 if diff.added_constrains and not args.stats:
1064 len(diff.added_constrains)))
1065 for r in sorted(diff.added_constrains):
1068 if diff.removed_constrains and not args.stats:
1070 len(diff.removed_constrains)))
1071 for r in sorted(diff.removed_constrains):
1077 if diff.added_mlsconstrains or diff.removed_mlsconstrains or args.mlsconstrain:
1079 len(diff.added_mlsconstrains), len(diff.removed_mlsconstrains)))
1081 if diff.added_mlsconstrains and not args.stats:
1083 len(diff.added_mlsconstrains)))
1084 for r in sorted(diff.added_mlsconstrains):
1087 if diff.removed_mlsconstrains and not args.stats:
1089 len(diff.removed_mlsconstrains)))
1090 for r in sorted(diff.removed_mlsconstrains):
1096 if diff.added_validatetrans or diff.removed_validatetrans or args.validatetrans:
1098 len(diff.added_validatetrans), len(diff.removed_validatetrans)))
1100 if diff.added_validatetrans and not args.stats:
1102 len(diff.added_validatetrans)))
1103 for r in sorted(diff.added_validatetrans):
1106 if diff.removed_validatetrans and not args.stats:
1108 len(diff.removed_validatetrans)))
1109 for r in sorted(diff.removed_validatetrans):
1115 if diff.added_mlsvalidatetrans or diff.removed_mlsvalidatetrans or args.mlsvalidatetrans:
1117 len(diff.added_mlsvalidatetrans), len(diff.removed_mlsvalidatetrans)))
1119 if diff.added_mlsvalidatetrans and not args.stats:
1121 len(diff.added_mlsvalidatetrans)))
1122 for r in sorted(diff.added_mlsvalidatetrans):
1125 if diff.removed_mlsvalidatetrans and not args.stats:
1127 len(diff.removed_mlsvalidatetrans)))
1128 for r in sorted(diff.removed_mlsvalidatetrans):
1134 if diff.added_initialsids or diff.removed_initialsids or diff.modified_initialsids \
1137 len(diff.added_initialsids), len(diff.removed_initialsids),
1138 len(diff.modified_initialsids)))
1139 if diff.added_initialsids and not args.stats:
1140 print(" Added Initial SIDs: {0}".format(len(diff.added_initialsids)))
1141 for s in sorted(diff.added_initialsids):
1143 if diff.removed_initialsids and not args.stats:
1144 print(" Removed Initial SIDs: {0}".format(len(diff.removed_initialsids)))
1145 for s in sorted(diff.removed_initialsids):
1147 if diff.modified_initialsids and not args.stats:
1148 print(" Modified Initial SIDs: {0}".format(len(diff.modified_initialsids)))
1149 for name, mod in sorted(diff.modified_initialsids.items()):
1156 if diff.added_fs_uses or diff.removed_fs_uses or diff.modified_fs_uses \
1159 len(diff.added_fs_uses), len(diff.removed_fs_uses),
1160 len(diff.modified_fs_uses)))
1161 if diff.added_fs_uses and not args.stats:
1162 print(" Added Fs_use: {0}".format(len(diff.added_fs_uses)))
1163 for s in sorted(diff.added_fs_uses):
1165 if diff.removed_fs_uses and not args.stats:
1166 print(" Removed Fs_use: {0}".format(len(diff.removed_fs_uses)))
1167 for s in sorted(diff.removed_fs_uses):
1169 if diff.modified_fs_uses and not args.stats:
1170 print(" Modified Fs_use: {0}".format(len(diff.modified_fs_uses)))
1171 for entry in sorted(diff.modified_fs_uses, key=lambda x: x.rule):
1178 if diff.added_genfscons or diff.removed_genfscons or diff.modified_genfscons \
1181 len(diff.added_genfscons), len(diff.removed_genfscons),
1182 len(diff.modified_genfscons)))
1183 if diff.added_genfscons and not args.stats:
1184 print(" Added Genfscons: {0}".format(len(diff.added_genfscons)))
1185 for s in sorted(diff.added_genfscons):
1187 if diff.removed_genfscons and not args.stats:
1188 print(" Removed Genfscons: {0}".format(len(diff.removed_genfscons)))
1189 for s in sorted(diff.removed_genfscons):
1191 if diff.modified_genfscons and not args.stats:
1192 print(" Modified Genfscons: {0}".format(len(diff.modified_genfscons)))
1193 for entry in sorted(diff.modified_genfscons, key=lambda x: x.rule):
1200 if diff.added_netifcons or diff.removed_netifcons or \
1201 diff.modified_netifcons or args.netifcon:
1203 len(diff.added_netifcons), len(diff.removed_netifcons),
1204 len(diff.modified_netifcons)))
1205 if diff.added_netifcons and not args.stats:
1206 print(" Added Netifcons: {0}".format(len(diff.added_netifcons)))
1207 for n in sorted(diff.added_netifcons):
1209 if diff.removed_netifcons and not args.stats:
1210 print(" Removed Netifcons: {0}".format(len(diff.removed_netifcons)))
1211 for n in sorted(diff.removed_netifcons):
1213 if diff.modified_netifcons and not args.stats:
1214 print(" Modified Netifcons: {0}".format(len(diff.modified_netifcons)))
1215 for entry in sorted(diff.modified_netifcons, key=lambda x: x.rule):
1240 if diff.added_nodecons or diff.removed_nodecons or diff.modified_nodecons \
1243 len(diff.added_nodecons), len(diff.removed_nodecons),
1244 len(diff.modified_nodecons)))
1245 if diff.added_nodecons and not args.stats:
1246 print(" Added Nodecons: {0}".format(len(diff.added_nodecons)))
1247 for n in sorted(diff.added_nodecons):
1249 if diff.removed_nodecons and not args.stats:
1250 print(" Removed Nodecons: {0}".format(len(diff.removed_nodecons)))
1251 for n in sorted(diff.removed_nodecons):
1253 if diff.modified_nodecons and not args.stats:
1254 print(" Modified Nodecons: {0}".format(len(diff.modified_nodecons)))
1255 for con, added_context, removed_context in sorted(diff.modified_nodecons,
1263 if diff.added_portcons or diff.removed_portcons or diff.modified_portcons \
1266 len(diff.added_portcons), len(diff.removed_portcons),
1267 len(diff.modified_portcons)))
1268 if diff.added_portcons and not args.stats:
1269 print(" Added Portcons: {0}".format(len(diff.added_portcons)))
1270 for n in sorted(diff.added_portcons):
1272 if diff.removed_portcons and not args.stats:
1273 print(" Removed Portcons: {0}".format(len(diff.removed_portcons)))
1274 for n in sorted(diff.removed_portcons):
1276 if diff.modified_portcons and not args.stats:
1277 print(" Modified Portcons: {0}".format(len(diff.modified_portcons)))
1278 for con, added_context, removed_context in sorted(diff.modified_portcons,
1291 if diff.added_polcaps or diff.removed_polcaps or args.polcap:
1293 len(diff.added_polcaps), len(diff.removed_polcaps)))
1294 if diff.added_polcaps and not args.stats:
1295 print(" Added Policy Capabilities: {0}".format(len(diff.added_polcaps)))
1296 for n in sorted(diff.added_polcaps):
1298 if diff.removed_polcaps and not args.stats:
1299 print(" Removed Policy Capabilities: {0}".format(len(diff.removed_polcaps)))
1300 for n in sorted(diff.removed_polcaps):
1306 if diff.added_defaults or diff.removed_defaults or args.default:
1308 len(diff.added_defaults), len(diff.removed_defaults), len(diff.modified_defaults)))
1309 if diff.added_defaults and not args.stats:
1310 print(" Added Defaults: {0}".format(len(diff.added_defaults)))
1311 for d in sorted(diff.added_defaults):
1313 if diff.removed_defaults and not args.stats:
1314 print(" Removed Defaults: {0}".format(len(diff.removed_defaults)))
1315 for d in sorted(diff.removed_defaults):
1317 if diff.modified_defaults and not args.stats:
1318 print(" Modified Defaults: {0}".format(len(diff.modified_defaults)))
1320 diff.modified_defaults, key=lambda x: x.rule):
1339 if diff.added_typebounds or diff.removed_typebounds or args.typebounds:
1341 len(diff.added_typebounds), len(diff.removed_typebounds),
1342 len(diff.modified_typebounds)))
1343 if diff.added_typebounds and not args.stats:
1344 print(" Added Typebounds: {0}".format(len(diff.added_typebounds)))
1345 for d in sorted(diff.added_typebounds):
1347 if diff.removed_typebounds and not args.stats:
1348 print(" Removed Typebounds: {0}".format(len(diff.removed_typebounds)))
1349 for d in sorted(diff.removed_typebounds):
1351 if diff.modified_typebounds and not args.stats:
1352 print(" Modified Typebounds: {0}".format(len(diff.modified_typebounds)))
1354 diff.modified_typebounds, key=lambda x: x.rule):