Lines Matching full:status

40 class Status(Exception):  class
171 (status, slist) = semanage.semanage_seuser_list(sh)
172 if status < 0:
174 print("Query status (commit number): %s" % status)
191 (status, ulist) = semanage.semanage_user_list(sh)
192 if status < 0:
194 print("Query status (commit number): %s" % status)
209 (status, rlist) = semanage.semanage_user_get_roles(sh, user)
210 if status < 0:
221 (status, plist) = semanage.semanage_port_list(sh)
222 if status < 0:
224 print("Query status (commit number): %s" % status)
251 (status, flist) = semanage.semanage_fcontext_list(sh)
252 if status < 0:
254 print("Query status (commit number): %s" % status)
279 (status, ilist) = semanage.semanage_iface_list(sh)
280 if status < 0:
282 print("Query status (commit number): %s" % status)
306 (status, blist) = semanage.semanage_bool_list(sh)
307 if status < 0:
309 print("Query status (commit number): %s" % status)
326 (status, ablist) = semanage.semanage_bool_list_active(sh)
327 if status < 0:
329 print("Query status (commit number): %s" % status)
346 (status, nlist) = semanage.semanage_node_list(sh)
347 if status < 0:
349 print("Query status (commit number): %s" % status)
359 (status, addr) = semanage.semanage_node_get_addr(sh, node)
360 if status < 0:
363 (status, mask) = semanage.semanage_node_get_mask(sh, node)
364 if status < 0:
371 (status, con_str) = semanage.semanage_context_to_string(sh, con)
372 if status < 0:
381 (status, user) = semanage.semanage_user_create(sh)
382 if status < 0:
387 status = semanage.semanage_user_set_name(sh, user, "testPyUser")
388 if status < 0:
393 status = semanage.semanage_user_add_role(sh, user, "user_r")
394 if status < 0:
397 status = semanage.semanage_user_set_prefix(sh, user, "user")
398 if status < 0:
403 status = semanage.semanage_user_set_mlsrange(sh, user, "s0")
404 if status < 0:
409 status = semanage.semanage_user_set_mlslevel(sh, user, "s0")
410 if status < 0:
415 (status, key) = semanage.semanage_user_key_extract(sh, user)
416 if status < 0:
421 (status, exists) = semanage.semanage_user_exists_local(sh, key)
422 if status < 0:
425 print("Exists status (commit number): %s" % status)
428 (status, old_user) = semanage.semanage_user_query_local(sh, key)
429 if status < 0:
432 print("Query status (commit number): %s" % status)
435 status = semanage.semanage_begin_transaction(sh)
436 if status < 0:
439 status = semanage.semanage_user_modify_local(sh, key, user)
440 if status < 0:
443 status = semanage.semanage_commit(sh)
444 if status < 0:
446 print("Commit status (transaction number): %s" % status)
448 status = semanage.semanage_begin_transaction(sh)
449 if status < 0:
454 status = semanage.semanage_user_del_local(sh, key)
455 if status < 0:
458 print("User delete: %s" % status)
461 status = semanage.semanage_user_modify_local(sh, key, old_user)
462 if status < 0:
465 print("User modify: %s" % status)
467 status = semanage.semanage_commit(sh)
468 if status < 0:
470 print("Commit status (transaction number): %s" % status)
480 (status, seuser) = semanage.semanage_seuser_create(sh)
481 if status < 0:
486 status = semanage.semanage_seuser_set_name(sh, seuser, "testPySEUser")
487 if status < 0:
492 status = semanage.semanage_seuser_set_sename(sh, seuser, "root")
493 if status < 0:
498 status = semanage.semanage_seuser_set_mlsrange(sh, seuser, "s0:c0.c255")
499 if status < 0:
504 (status, key) = semanage.semanage_seuser_key_extract(sh, seuser)
505 if status < 0:
510 (status, exists) = semanage.semanage_seuser_exists_local(sh, key)
511 if status < 0:
514 print("Exists status (commit number): %s" % status)
517 (status, old_seuser) = semanage.semanage_seuser_query_local(sh, key)
518 if status < 0:
521 print("Query status (commit number): %s" % status)
524 status = semanage.semanage_begin_transaction(sh)
525 if status < 0:
528 status = semanage.semanage_seuser_modify_local(sh, key, seuser)
529 if status < 0:
532 status = semanage.semanage_commit(sh)
533 if status < 0:
535 print("Commit status (transaction number): %s" % status)
537 status = semanage.semanage_begin_transaction(sh)
538 if status < 0:
543 status = semanage.semanage_seuser_del_local(sh, key)
544 if status < 0:
547 print("Seuser delete: %s" % status)
550 status = semanage.semanage_seuser_modify_local(sh, key, old_seuser)
551 if status < 0:
554 print("Seuser modify: %s" % status)
556 status = semanage.semanage_commit(sh)
557 if status < 0:
559 print("Commit status (transaction number): %s" % status)
569 (status, port) = semanage.semanage_port_create(sh)
570 if status < 0:
585 (status, con) = semanage.semanage_context_create(sh)
586 if status < 0:
591 status = semanage.semanage_context_set_user(sh, con, "system_u")
592 if status < 0:
597 status = semanage.semanage_context_set_role(sh, con, "object_r")
598 if status < 0:
603 status = semanage.semanage_context_set_type(sh, con, "http_port_t")
604 if status < 0:
609 status = semanage.semanage_context_set_mls(sh, con, "s0:c0.c255")
610 if status < 0:
615 status = semanage.semanage_port_set_con(sh, port, con)
616 if status < 0:
621 (status, key) = semanage.semanage_port_key_extract(sh, port)
622 if status < 0:
627 (status, exists) = semanage.semanage_port_exists_local(sh, key)
628 if status < 0:
631 print("Exists status (commit number): %s" % status)
634 (status, old_port) = semanage.semanage_port_query_local(sh, key)
635 if status < 0:
638 print("Query status (commit number): %s" % status)
641 status = semanage.semanage_begin_transaction(sh)
642 if status < 0:
645 status = semanage.semanage_port_modify_local(sh, key, port)
646 if status < 0:
649 status = semanage.semanage_commit(sh)
650 if status < 0:
652 print("Commit status (transaction number): %s" % status)
654 status = semanage.semanage_begin_transaction(sh)
655 if status < 0:
660 status = semanage.semanage_port_del_local(sh, key)
661 if status < 0:
664 print("Port range delete: %s" % status)
667 status = semanage.semanage_port_modify_local(sh, key, old_port)
668 if status < 0:
671 print("Port range modify: %s" % status)
673 status = semanage.semanage_commit(sh)
674 if status < 0:
676 print("Commit status (transaction number): %s" % status)
687 (status, fcon) = semanage.semanage_fcontext_create(sh)
688 if status < 0:
693 status = semanage.semanage_fcontext_set_expr(sh, fcon, "/test/fcontext(/.*)?")
694 if status < 0:
704 (status, con) = semanage.semanage_context_create(sh)
705 if status < 0:
710 status = semanage.semanage_context_set_user(sh, con, "system_u")
711 if status < 0:
716 status = semanage.semanage_context_set_role(sh, con, "object_r")
717 if status < 0:
722 status = semanage.semanage_context_set_type(sh, con, "default_t")
723 if status < 0:
728 status = semanage.semanage_context_set_mls(sh, con, "s0:c0.c255")
729 if status < 0:
734 status = semanage.semanage_fcontext_set_con(sh, fcon, con)
735 if status < 0:
740 (status, key) = semanage.semanage_fcontext_key_extract(sh, fcon)
741 if status < 0:
746 (status, exists) = semanage.semanage_fcontext_exists_local(sh, key)
747 if status < 0:
751 print("Exists status (commit number): %s" % status)
753 (status, old_fcontext) = semanage.semanage_fcontext_query_local(sh, key)
754 if status < 0:
757 print("Query status (commit number): %s" % status)
760 status = semanage.semanage_begin_transaction(sh)
761 if status < 0:
764 status = semanage.semanage_fcontext_modify_local(sh, key, fcon)
765 if status < 0:
768 status = semanage.semanage_commit(sh)
769 if status < 0:
771 print("Commit status (transaction number): %s" % status)
773 status = semanage.semanage_begin_transaction(sh)
774 if status < 0:
779 status = semanage.semanage_fcontext_del_local(sh, key)
780 if status < 0:
783 print("File context delete: %s" % status)
786 status = semanage.semanage_fcontext_modify_local(sh, key, old_fcontext)
787 if status < 0:
790 print("File context modify: %s" % status)
792 status = semanage.semanage_commit(sh)
793 if status < 0:
795 print("Commit status (transaction number): %s" % status)
806 (status, iface) = semanage.semanage_iface_create(sh)
807 if status < 0:
812 status = semanage.semanage_iface_set_name(sh, iface, "test_iface")
813 if status < 0:
818 (status, con) = semanage.semanage_context_create(sh)
819 if status < 0:
824 status = semanage.semanage_context_set_user(sh, con, "system_u")
825 if status < 0:
830 status = semanage.semanage_context_set_role(sh, con, "object_r")
831 if status < 0:
836 status = semanage.semanage_context_set_type(sh, con, "default_t")
837 if status < 0:
842 status = semanage.semanage_context_set_mls(sh, con, "s0:c0.c255")
843 if status < 0:
848 status = semanage.semanage_iface_set_ifcon(sh, iface, con)
849 if status < 0:
854 status = semanage.semanage_iface_set_msgcon(sh, iface, con)
855 if status < 0:
860 (status, key) = semanage.semanage_iface_key_extract(sh, iface)
861 if status < 0:
866 (status, exists) = semanage.semanage_iface_exists_local(sh, key)
867 if status < 0:
870 print("Exists status (commit number): %s" % status)
873 (status, old_iface) = semanage.semanage_iface_query_local(sh, key)
874 if status < 0:
877 print("Query status (commit number): %s" % status)
880 status = semanage.semanage_begin_transaction(sh)
881 if status < 0:
884 status = semanage.semanage_iface_modify_local(sh, key, iface)
885 if status < 0:
888 status = semanage.semanage_commit(sh)
889 if status < 0:
891 print("Commit status (transaction number): %s" % status)
893 status = semanage.semanage_begin_transaction(sh)
894 if status < 0:
899 status = semanage.semanage_iface_del_local(sh, key)
900 if status < 0:
903 print("Interface delete: %s" % status)
906 status = semanage.semanage_iface_modify_local(sh, key, old_iface)
907 if status < 0:
910 print("Interface modify: %s" % status)
912 status = semanage.semanage_commit(sh)
913 if status < 0:
915 print("Commit status (transaction number): %s" % status)
926 (status, pbool) = semanage.semanage_bool_create(sh)
927 if status < 0:
932 status = semanage.semanage_bool_set_name(sh, pbool, "allow_execmem")
933 if status < 0:
942 (status, key) = semanage.semanage_bool_key_extract(sh, pbool)
943 if status < 0:
948 (status, exists) = semanage.semanage_bool_exists_local(sh, key)
949 if status < 0:
952 print("Exists status (commit number): %s" % status)
955 (status, old_bool) = semanage.semanage_bool_query_local(sh, key)
956 if status < 0:
959 print("Query status (commit number): %s" % status)
962 status = semanage.semanage_begin_transaction(sh)
963 if status < 0:
966 status = semanage.semanage_bool_modify_local(sh, key, pbool)
968 if status < 0:
971 status = semanage.semanage_commit(sh)
972 if status < 0:
974 print("Commit status (transaction number): %s" % status)
976 status = semanage.semanage_begin_transaction(sh)
977 if status < 0:
982 status = semanage.semanage_bool_del_local(sh, key)
983 if status < 0:
986 print("Boolean delete: %s" % status)
989 status = semanage.semanage_bool_modify_local(sh, key, old_bool)
990 if status < 0:
993 print("Boolean modify: %s" % status)
995 status = semanage.semanage_commit(sh)
996 if status < 0:
998 print("Commit status (transaction number): %s" % status)
1008 (status, key) = semanage.semanage_bool_key_create(sh, "allow_execmem")
1009 if status < 0:
1014 (status, old_bool) = semanage.semanage_bool_query_active(sh, key)
1015 if status < 0:
1018 print("Query status (commit number): %s" % status)
1020 (status, abool) = semanage.semanage_bool_create(sh)
1021 if status < 0:
1026 status = semanage.semanage_bool_set_name(sh, abool, "allow_execmem")
1027 if status < 0:
1037 status = semanage.semanage_begin_transaction(sh)
1038 if status < 0:
1041 status = semanage.semanage_bool_set_active(sh, key, abool)
1042 if status < 0:
1045 status = semanage.semanage_commit(sh)
1046 if status < 0:
1048 print("Commit status (transaction number): %s" % status)
1051 status = semanage.semanage_begin_transaction(sh)
1052 if status < 0:
1055 status = semanage.semanage_bool_set_active(sh, key, old_bool)
1056 if status < 0:
1059 print("SEBool active reset: %s" % status)
1061 status = semanage.semanage_commit(sh)
1062 if status < 0:
1064 print("Commit status (transaction number): %s" % status)
1073 (status, node) = semanage.semanage_node_create(sh)
1074 if status < 0:
1079status = semanage.semanage_node_set_addr(sh, node, semanage.SEMANAGE_PROTO_IP6, "ffee:dddd::bbbb")
1080 if status < 0:
1083status = semanage.semanage_node_set_mask(sh, node, semanage.SEMANAGE_PROTO_IP6, "::ffff:ffff:abcd:…
1084 if status < 0:
1091 (status, con) = semanage.semanage_context_create(sh)
1092 if status < 0:
1097 status = semanage.semanage_context_set_user(sh, con, "system_u")
1098 if status < 0:
1103 status = semanage.semanage_context_set_role(sh, con, "object_r")
1104 if status < 0:
1109 status = semanage.semanage_context_set_type(sh, con, "lo_node_t")
1110 if status < 0:
1115 status = semanage.semanage_context_set_mls(sh, con, "s0:c0.c255")
1116 if status < 0:
1121 status = semanage.semanage_node_set_con(sh, node, con)
1122 if status < 0:
1127 (status, key) = semanage.semanage_node_key_extract(sh, node)
1128 if status < 0:
1133 (status, exists) = semanage.semanage_node_exists_local(sh, key)
1134 if status < 0:
1137 print("Exists status (commit number): %s" % status)
1140 (status, old_node) = semanage.semanage_node_query_local(sh, key)
1141 if status < 0:
1144 print("Query status (commit number): %s" % status)
1147 status = semanage.semanage_begin_transaction(sh)
1148 if status < 0:
1151 status = semanage.semanage_node_modify_local(sh, key, node)
1152 if status < 0:
1155 status = semanage.semanage_commit(sh)
1156 if status < 0:
1158 print("Commit status (transaction number): %s" % status)
1160 status = semanage.semanage_begin_transaction(sh)
1161 if status < 0:
1166 status = semanage.semanage_node_del_local(sh, key)
1167 if status < 0:
1170 print("Network node delete: %s" % status)
1173 status = semanage.semanage_node_modify_local(sh, key, old_node)
1174 if status < 0:
1177 print("Network node modify: %s" % status)
1179 status = semanage.semanage_commit(sh)
1180 if status < 0:
1182 print("Commit status (transaction number): %s" % status)
1273 raise Status("Unmanaged!")
1275 status = semanage.semanage_connect(sh)
1276 if status < 0:
1281 status = semanage.semanage_disconnect(sh)
1282 if status < 0:
1289 except Status as err: