Lines Matching full:if
71 if (self.users or self.all):
74 if (self.seusers or self.all):
77 if (self.ports or self.all):
80 if (self.modules or self.all):
83 if (self.fcontexts or self.all):
86 if (self.interfaces or self.all):
89 if (self.booleans or self.all):
92 if (self.abooleans or self.all):
95 if (self.nodes or self.all):
98 if (self.writeuser or self.all):
101 if (self.writeseuser or self.all):
104 if (self.writeport or self.all):
107 if (self.writefcontext or self.all):
110 if (self.writeinterface or self.all):
113 if (self.writeboolean or self.all):
116 if (self.writeaboolean or self.all):
119 if (self.writenode or self.all):
130 if self.verbose: print "List reference: ", mlist
132 if (mlist_size == 0):
138 if self.verbose: print "Module reference: ", module
145 if status < 0:
149 if ( len(slist) == 0):
154 if self.verbose: print "seseuser reference: ", seuser
164 if status < 0:
168 if ( len(ulist) == 0):
173 if self.verbose: print "User reference: ", user
181 if status < 0:
193 if status < 0:
197 if ( len(plist) == 0):
202 if self.verbose: print "Port reference: ", port
208 if low == high:
213 if rc < 0: con_str = ""
221 if status < 0:
225 if (len(flist) == 0):
230 if self.verbose: print "File Context reference: ", fcon
235 if not con:
239 if rc < 0: con_str = ""
247 if status < 0:
251 if (len(ilist) == 0):
256 if self.verbose: print "Interface reference: ", iface
261 if rc < 0: msg_con_str = ""
263 if rc < 0: if_con_str = ""
271 if status < 0:
275 if (len(blist) == 0):
280 if self.verbose: print "Boolean reference: ", pbool
290 if status < 0:
294 if (len(ablist) == 0):
299 if self.verbose: print "Active boolean reference: ", abool
309 if status < 0:
313 if (len(nlist) == 0):
318 if self.verbose: print "Network node reference: ", node
321 if status < 0: addr = ""
324 if status < 0: mask = ""
331 if status < 0: con_str = ""
340 if status < 0:
342 if self.verbose: print "User object created"
345 if status < 0:
347 if self.verbose: print "User name set: ", semanage.semanage_user_get_name(user)
350 if status < 0:
354 if status < 0:
356 if self.verbose: print "User prefix set: ", semanage.semanage_user_get_prefix(user)
359 if status < 0:
361 if self.verbose: print "User mlsrange: ", semanage.semanage_user_get_mlsrange(user)
364 if status < 0:
366 if self.verbose: print "User mlslevel: ", semanage.semanage_user_get_mlslevel(user)
369 if status < 0:
371 if self.verbose: print "User key extracted: ", key
374 if status < 0:
375 raise Error("Could not check if user exists")
376 if self.verbose: print "Exists status (commit number): ", status
378 if exists:
380 if status < 0:
382 if self.verbose: print "Query status (commit number): ", status
386 if status < 0:
390 if status < 0:
394 if status < 0:
399 if status < 0:
402 if not exists:
405 if status < 0:
407 if self.verbose: print "User delete: ", status
411 if status < 0:
413 if self.verbose: print "User modify: ", status
416 if status < 0:
422 if exists: semanage.semanage_user_free(old_user)
428 if status < 0:
430 if self.verbose: print "SEUser object created."
433 if status < 0:
435 if self.verbose: print "SEUser name set: ", semanage.semanage_seuser_get_name(seuser)
438 if status < 0:
440 … if self.verbose: print "SEUser seuser: ", semanage.semanage_seuser_get_sename(seuser)
443 if status < 0:
445 … if self.verbose: print "SEUser mlsrange: ", semanage.semanage_seuser_get_mlsrange(seuser)
448 if status < 0:
450 if self.verbose: print "SEUser key extracted: ", key
453 if status < 0:
454 raise Error("Could not check if SEUser exists")
455 if self.verbose: print "Exists status (commit number): ", status
457 if exists:
459 if status < 0:
461 if self.verbose: print "Query status (commit number): ", status
465 if status < 0:
469 if status < 0:
473 if status < 0:
478 if status < 0:
481 if not exists:
484 if status < 0:
486 if self.verbose: print "Seuser delete: ", status
490 if status < 0:
492 if self.verbose: print "Seuser modify: ", status
495 if status < 0:
501 if exists: semanage.semanage_seuser_free(old_seuser)
507 if status < 0:
509 if self.verbose: print "SEPort object created."
514 if self.verbose: print "SEPort range set: ", low, "-", high
517 if self.verbose: print "SEPort protocol set: ", \
521 if status < 0:
523 if self.verbose: print "SEContext object created (for port)."
526 if status < 0:
528 if self.verbose: print "SEContext user: ", semanage.semanage_context_get_user(con)
531 if status < 0:
533 if self.verbose: print "SEContext role: ", semanage.semanage_context_get_role(con)
536 if status < 0:
538 if self.verbose: print "SEContext type: ", semanage.semanage_context_get_type(con)
541 if status < 0:
543 if self.verbose: print "SEContext mls: ", semanage.semanage_context_get_mls(con)
546 if status < 0:
548 if self.verbose: print "SEPort context set: ", con
551 if status < 0:
553 if self.verbose: print "SEPort key extracted: ", key
556 if status < 0:
557 raise Error("Could not check if SEPort exists")
558 if self.verbose: print "Exists status (commit number): ", status
560 if exists:
562 if status < 0:
564 if self.verbose: print "Query status (commit number): ", status
568 if status < 0:
572 if status < 0:
576 if status < 0:
581 if status < 0:
584 if not exists:
587 if status < 0:
589 if self.verbose: print "Port range delete: ", status
593 if status < 0:
595 if self.verbose: print "Port range modify: ", status
598 if status < 0:
605 if exists: semanage.semanage_port_free(old_port)
611 if status < 0:
613 if self.verbose: print "SEFcontext object created."
616 if status < 0:
618 if self.verbose: print "SEFContext expr set: ", semanage.semanage_fcontext_get_expr(fcon)
621 if self.verbose:
626 if status < 0:
628 if self.verbose: print "SEContext object created (for file context)."
631 if status < 0:
633 if self.verbose: print "SEContext user: ", semanage.semanage_context_get_user(con)
636 if status < 0:
638 if self.verbose: print "SEContext role: ", semanage.semanage_context_get_role(con)
641 if status < 0:
643 if self.verbose: print "SEContext type: ", semanage.semanage_context_get_type(con)
646 if status < 0:
648 if self.verbose: print "SEContext mls: ", semanage.semanage_context_get_mls(con)
651 if status < 0:
653 if self.verbose: print "SEFcontext context set: ", con
656 if status < 0:
658 if self.verbose: print "SEFcontext key extracted: ", key
661 if status < 0:
662 raise Error("Could not check if SEFcontext exists")
664 if self.verbose: print "Exists status (commit number): ", status
665 if exists:
667 if status < 0:
669 if self.verbose: print "Query status (commit number): ", status
673 if status < 0:
677 if status < 0:
681 if status < 0:
686 if status < 0:
689 if not exists:
692 if status < 0:
694 if self.verbose: print "File context delete: ", status
698 if status < 0:
700 if self.verbose: print "File context modify: ", status
703 if status < 0:
710 if exists: semanage.semanage_fcontext_free(old_fcontext)
716 if status < 0:
718 if self.verbose: print "SEIface object created."
721 if status < 0:
723 if self.verbose: print "SEIface name set: ", semanage.semanage_iface_get_name(iface)
726 if status < 0:
728 if self.verbose: print "SEContext object created (for network interface)"
731 if status < 0:
733 if self.verbose: print "SEContext user: ", semanage.semanage_context_get_user(con)
736 if status < 0:
738 if self.verbose: print "SEContext role: ", semanage.semanage_context_get_role(con)
741 if status < 0:
743 if self.verbose: print "SEContext type: ", semanage.semanage_context_get_type(con)
746 if status < 0:
748 if self.verbose: print "SEContext mls: ", semanage.semanage_context_get_mls(con)
751 if status < 0:
753 if self.verbose: print "SEIface interface context set: ", con
756 if status < 0:
758 if self.verbose: print "SEIface message context set: ", con
761 if status < 0:
763 if self.verbose: print "SEIface key extracted: ", key
766 if status < 0:
767 raise Error("Could not check if SEIface exists")
768 if self.verbose: print "Exists status (commit number): ", status
770 if exists:
772 if status < 0:
774 if self.verbose: print "Query status (commit number): ", status
778 if status < 0:
782 if status < 0:
786 if status < 0:
791 if status < 0:
794 if not exists:
797 if status < 0:
799 if self.verbose: print "Interface delete: ", status
803 if status < 0:
805 if self.verbose: print "Interface modify: ", status
808 if status < 0:
815 if exists: semanage.semanage_iface_free(old_iface)
821 if status < 0:
823 if self.verbose: print "SEBool object created."
826 if status < 0:
828 if self.verbose: print "SEBool name set: ", semanage.semanage_bool_get_name(pbool)
831 if self.verbose: print "SEbool value set: ", semanage.semanage_bool_get_value(pbool)
834 if status < 0:
836 if self.verbose: print "SEBool key extracted: ", key
839 if status < 0:
840 raise Error("Could not check if SEBool exists")
841 if self.verbose: print "Exists status (commit number): ", status
843 if exists:
845 if status < 0:
847 if self.verbose: print "Query status (commit number): ", status
851 if status < 0:
856 if status < 0:
860 if status < 0:
865 if status < 0:
868 if not exists:
871 if status < 0:
873 if self.verbose: print "Boolean delete: ", status
877 if status < 0:
879 if self.verbose: print "Boolean modify: ", status
882 if status < 0:
888 if exists: semanage.semanage_bool_free(old_bool)
894 if status < 0:
896 if self.verbose: print "SEBool key created: ", key
899 if status < 0:
901 if self.verbose: print "Query status (commit number): ", status
904 if status < 0:
906 if self.verbose: print "SEBool object created."
909 if status < 0:
911 if self.verbose: print "SEBool name set: ", semanage.semanage_bool_get_name(abool)
914 if self.verbose: print "SEbool value set: ", semanage.semanage_bool_get_value(abool)
918 if status < 0:
922 if status < 0:
926 if status < 0:
932 if status < 0:
936 if status < 0:
938 if self.verbose: print "SEBool active reset: ", status
941 if status < 0:
954 if status < 0:
956 if self.verbose: print "SENode object created."
959 if status < 0:
963 if status < 0:
967 if self.verbose: print "SENode protocol set: ", \
971 if status < 0:
973 if self.verbose: print "SEContext object created (for node)."
976 if status < 0:
978 if self.verbose: print "SEContext user: ", semanage.semanage_context_get_user(con)
981 if status < 0:
983 if self.verbose: print "SEContext role: ", semanage.semanage_context_get_role(con)
986 if status < 0:
988 if self.verbose: print "SEContext type: ", semanage.semanage_context_get_type(con)
991 if status < 0:
993 if self.verbose: print "SEContext mls: ", semanage.semanage_context_get_mls(con)
996 if status < 0:
998 if self.verbose: print "SENode context set: ", con
1001 if status < 0:
1003 if self.verbose: print "SENode key extracted: ", key
1006 if status < 0:
1007 raise Error("Could not check if SENode exists")
1008 if self.verbose: print "Exists status (commit number): ", status
1010 if exists:
1012 if status < 0:
1014 if self.verbose: print "Query status (commit number): ", status
1018 if status < 0:
1022 if status < 0:
1026 if status < 0:
1031 if status < 0:
1034 if not exists:
1037 if status < 0:
1039 if self.verbose: print "Network node delete: ", status
1043 if status < 0:
1045 if self.verbose: print "Network node modify: ", status
1048 if status < 0:
1055 if exists: semanage.semanage_node_free(old_node)
1058 if argv is None:
1065 if o == "-v":
1068 if o == "-a":
1070 if o == "-u":
1072 if o == "-U":
1074 if o == "-s":
1076 if o == "-S":
1078 if o == "-p":
1080 if o == "-P":
1082 if o == "-f":
1084 if o == "-F":
1086 if o == "-i":
1088 if o == "-I":
1090 if o == "-b":
1092 if o == "-B":
1094 if o == "-c":
1096 if o == "-C":
1098 if o == "-n":
1100 if o == "-N":
1102 if o == "-m":
1104 if o == "-h":
1107 if not tests.selected():
1115 if (semanage.semanage_is_managed(sh) != 1):
1119 if status < 0:
1125 if status < 0:
1139 if __name__ == "__main__":