From 18ae90763f3904516882cb5cc9db95d3f2142d33 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Thu, 15 Apr 2021 16:36:29 -0400 Subject: [PATCH 01/28] ConfigSetDescriptor: Fix parsing of multiline values. The parsing did not correctly handle newline and tab characters. Add a multiline value in the sechecker test config file to make sure this case is tested. Signed-off-by: Chris PeBenito --- ChangeLog | 2 ++ setools/checker/descriptors.py | 3 ++- tests/checker/checker-valid.ini | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b38a57c7..4e1ca480 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ + * Fix bug in sechecker parsing of multiline values. + *setools-4.4.0 (5 Mar 2021) * Updated policy representation to handle policydb version 33, compressed diff --git a/setools/checker/descriptors.py b/setools/checker/descriptors.py index 551b4d3b..84568221 100644 --- a/setools/checker/descriptors.py +++ b/setools/checker/descriptors.py @@ -16,6 +16,7 @@ # License along with SETools. If not, see # . # +import re from typing import Callable, Union from ..exception import InvalidCheckValue @@ -90,7 +91,7 @@ def __set__(self, obj, value): else: lookup = getattr(obj.policy, self.lookup_function) ret = set() - for item in (i for i in value.split(" ") if i): + for item in (i for i in re.split(r"\s", value) if i): try: o = lookup(item) if self.expand: diff --git a/tests/checker/checker-valid.ini b/tests/checker/checker-valid.ini index 2a25c53c..d601cfd7 100644 --- a/tests/checker/checker-valid.ini +++ b/tests/checker/checker-valid.ini @@ -7,7 +7,8 @@ attr = empty_source_attr desc = read only executables test check_type = ro_execs exempt_exec_domain = unconfined -exempt_write_domain = domain1 domain2 unconfined +exempt_write_domain = domain1 + domain2 unconfined [assertte] check_type = assert_te From 8383ee0a98a4065ecec8284e6dd5548b2acef630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Thu, 3 Jun 2021 17:33:23 +0200 Subject: [PATCH 02/28] Update permission map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add watch permissions, added in https://github.com/SELinuxProject/selinux-kernel/commit/ac5656d8a4cdd93cd2c74355ed12e5617817e0e7 Add `perf_event` class, added in https://github.com/SELinuxProject/selinux-kernel/commit/da97e18458fb42d7c00fac5fd1c56a3896ec666e Add `lockdown` class, added in https://github.com/SELinuxProject/selinux-kernel/commit/59438b46471ae6cdfb761afc8c9beaf1e428a331 Add `anon_inode` class, added in https://github.com/SELinuxProject/selinux-kernel/commit/29cd6591ab6fee3125ea5c1bf350f5013bc615e1 Drop inexistent permissions `execute_no_trans` and `entrypoint` from `chr_file` Signed-off-by: Christian Göttsche --- setools/perm_map | 93 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 83 insertions(+), 10 deletions(-) diff --git a/setools/perm_map b/setools/perm_map index f5403787..483a6965 100644 --- a/setools/perm_map +++ b/setools/perm_map @@ -121,7 +121,7 @@ class db_procedure 9 setattr w 7 relabelto w 1 -class dir 26 +class dir 31 rmdir b 1 audit_access r 1 remove_name w 1 @@ -148,11 +148,16 @@ class dir 26 quotaon b 1 swapon b 1 map n 1 + watch r 3 + watch_mount r 3 + watch_sb r 3 + watch_with_perm r 3 + watch_reads r 3 class peer 1 recv r 10 -class blk_file 21 +class blk_file 26 audit_access r 1 execmod n 1 open n 1 @@ -174,12 +179,15 @@ class blk_file 21 quotaon b 1 swapon b 1 map n 1 + watch r 3 + watch_mount r 3 + watch_sb r 3 + watch_with_perm r 3 + watch_reads r 3 -class chr_file 23 +class chr_file 26 audit_access r 1 - entrypoint r 1 execmod n 1 - execute_no_trans r 1 open n 1 append w 10 create w 1 @@ -199,6 +207,11 @@ class chr_file 23 quotaon b 1 swapon b 1 map n 1 + watch r 3 + watch_mount r 3 + watch_sb r 3 + watch_with_perm r 3 + watch_reads r 3 class db_table 11 select n 1 @@ -237,7 +250,7 @@ class ipc 9 read r 10 unix_write w 3 -class lnk_file 21 +class lnk_file 26 audit_access r 1 execmod n 1 open n 1 @@ -259,6 +272,11 @@ class lnk_file 21 quotaon b 1 swapon b 1 map n 1 + watch r 3 + watch_mount r 3 + watch_sb r 3 + watch_with_perm r 3 + watch_reads r 3 class process 31 getcap r 3 @@ -338,7 +356,7 @@ class socket 23 listen r 1 map n 1 -class fifo_file 21 +class fifo_file 26 audit_access r 1 execmod n 1 open n 1 @@ -360,8 +378,13 @@ class fifo_file 21 quotaon b 1 swapon b 1 map n 1 + watch r 3 + watch_mount r 3 + watch_sb r 3 + watch_with_perm r 3 + watch_reads r 3 -class file 23 +class file 28 audit_access r 1 entrypoint r 1 execmod n 1 @@ -385,6 +408,11 @@ class file 23 quotaon b 1 swapon b 1 map n 1 + watch r 3 + watch_mount r 3 + watch_sb r 3 + watch_with_perm r 3 + watch_reads r 3 class node 11 rawip_recv r 10 @@ -743,7 +771,7 @@ class netlink_firewall_socket 25 listen r 1 map n 1 -class sock_file 21 +class sock_file 26 audit_access r 1 execmod n 1 open n 1 @@ -765,6 +793,11 @@ class sock_file 21 quotaon b 1 swapon b 1 map n 1 + watch r 3 + watch_mount r 3 + watch_sb r 3 + watch_with_perm r 3 + watch_reads r 3 class unix_dgram_socket 23 append w 10 @@ -828,7 +861,7 @@ class db_blob 10 setattr w 7 relabelto w 1 -class filesystem 10 +class filesystem 11 associate n 1 quotaget r 1 relabelfrom r 10 @@ -839,6 +872,7 @@ class filesystem 10 remount w 1 unmount w 1 relabelto w 10 + watch r 3 class netlink_xfrm_socket 25 nlmsg_write w 10 @@ -2368,3 +2402,42 @@ class xdp_socket 23 relabelto w 10 listen r 1 map n 1 + +class lockdown 2 + integrity b 1 + confidentiality r 1 + +class perf_event 6 + open r 1 + cpu r 5 + kernel r 5 + tracepoint r 5 + read r 1 + write w 1 + +class anon_inode 25 + audit_access r 1 + execmod n 1 + open n 1 + append w 10 + create w 1 + execute r 1 + write w 10 + relabelfrom r 10 + link w 1 + unlink w 1 + ioctl n 1 + getattr r 7 + setattr w 7 + read r 10 + rename w 5 + lock n 1 + relabelto w 10 + mounton b 1 + quotaon b 1 + map n 1 + watch r 3 + watch_mount r 3 + watch_sb r 3 + watch_with_perm r 3 + watch_reads r 3 From 550e21caade6636f3ab8b4426d7ec8d53c227855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Thu, 3 Jun 2021 17:30:42 +0200 Subject: [PATCH 03/28] Update permission map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop removed permission. They are removed in Linux 4.3 and not checked since at least 2.6.30, see https://github.com/SELinuxProject/selinux-kernel/commit/42a9699a9fa179c0054ea3cf5ad3cc67104a6162 Signed-off-by: Christian Göttsche --- setools/perm_map | 290 ++++++++++++----------------------------------- 1 file changed, 70 insertions(+), 220 deletions(-) diff --git a/setools/perm_map b/setools/perm_map index 483a6965..82913d08 100644 --- a/setools/perm_map +++ b/setools/perm_map @@ -29,7 +29,7 @@ # Number of object classes. 129 -class netlink_audit_socket 28 +class netlink_audit_socket 26 nlmsg_relay w 10 nlmsg_tty_audit w 10 nlmsg_readpriv r 10 @@ -44,8 +44,6 @@ class netlink_audit_socket 28 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -59,11 +57,8 @@ class netlink_audit_socket 28 listen r 1 map n 1 -class tcp_socket 28 - acceptfrom r 1 - connectto w 1 +class tcp_socket 23 node_bind n 1 - newconn w 1 name_connect w 1 append w 10 bind w 1 @@ -74,8 +69,6 @@ class tcp_socket 28 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -121,7 +114,7 @@ class db_procedure 9 setattr w 7 relabelto w 1 -class dir 31 +class dir 30 rmdir b 1 audit_access r 1 remove_name w 1 @@ -146,7 +139,6 @@ class dir 31 relabelto w 10 mounton b 1 quotaon b 1 - swapon b 1 map n 1 watch r 3 watch_mount r 3 @@ -157,7 +149,7 @@ class dir 31 class peer 1 recv r 10 -class blk_file 26 +class blk_file 25 audit_access r 1 execmod n 1 open n 1 @@ -177,7 +169,6 @@ class blk_file 26 relabelto w 10 mounton b 1 quotaon b 1 - swapon b 1 map n 1 watch r 3 watch_mount r 3 @@ -185,7 +176,7 @@ class blk_file 26 watch_with_perm r 3 watch_reads r 3 -class chr_file 26 +class chr_file 25 audit_access r 1 execmod n 1 open n 1 @@ -205,7 +196,6 @@ class chr_file 26 relabelto w 10 mounton b 1 quotaon b 1 - swapon b 1 map n 1 watch r 3 watch_mount r 3 @@ -250,7 +240,7 @@ class ipc 9 read r 10 unix_write w 3 -class lnk_file 26 +class lnk_file 25 audit_access r 1 execmod n 1 open n 1 @@ -270,7 +260,6 @@ class lnk_file 26 relabelto w 10 mounton b 1 quotaon b 1 - swapon b 1 map n 1 watch r 3 watch_mount r 3 @@ -331,7 +320,7 @@ class packet 7 relabelto w 3 flow_in r 10 -class socket 23 +class socket 21 append w 10 bind w 1 connect w 1 @@ -341,8 +330,6 @@ class socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -356,7 +343,7 @@ class socket 23 listen r 1 map n 1 -class fifo_file 26 +class fifo_file 25 audit_access r 1 execmod n 1 open n 1 @@ -376,7 +363,6 @@ class fifo_file 26 relabelto w 10 mounton b 1 quotaon b 1 - swapon b 1 map n 1 watch r 3 watch_mount r 3 @@ -384,7 +370,7 @@ class fifo_file 26 watch_with_perm r 3 watch_reads r 3 -class file 28 +class file 27 audit_access r 1 entrypoint r 1 execmod n 1 @@ -406,7 +392,6 @@ class file 28 relabelto w 10 mounton b 1 quotaon b 1 - swapon b 1 map n 1 watch r 3 watch_mount r 3 @@ -414,16 +399,7 @@ class file 28 watch_with_perm r 3 watch_reads r 3 -class node 11 - rawip_recv r 10 - tcp_recv r 10 - udp_recv r 10 - rawip_send w 10 - tcp_send w 10 - udp_send w 10 - dccp_recv r 10 - dccp_send w 10 - enforce_dest n 1 +class node 2 sendto w 10 recvfrom r 10 @@ -453,7 +429,7 @@ class db_view 7 setattr w 5 relabelto w 1 -class netlink_nflog_socket 23 +class netlink_nflog_socket 21 append w 10 bind w 1 connect w 1 @@ -463,8 +439,6 @@ class netlink_nflog_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -487,7 +461,7 @@ class key 7 read r 10 search r 5 -class netlink_tcpdiag_socket 25 +class netlink_tcpdiag_socket 23 nlmsg_write w 10 nlmsg_read r 10 append w 10 @@ -499,8 +473,6 @@ class netlink_tcpdiag_socket 25 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -514,10 +486,8 @@ class netlink_tcpdiag_socket 25 listen r 1 map n 1 -class unix_stream_socket 26 - acceptfrom r 1 +class unix_stream_socket 22 connectto w 1 - newconn w 1 append w 10 bind w 1 connect w 1 @@ -527,8 +497,6 @@ class unix_stream_socket 26 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -573,7 +541,7 @@ class kernel_service 2 create_files_as n 1 use_as_override n 1 -class netlink_route_socket 25 +class netlink_route_socket 23 nlmsg_write w 10 nlmsg_read r 10 append w 10 @@ -585,8 +553,6 @@ class netlink_route_socket 25 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -631,7 +597,7 @@ class x_resource 2 write w 10 read r 10 -class netlink_selinux_socket 23 +class netlink_selinux_socket 21 append w 10 bind w 1 connect w 1 @@ -641,8 +607,6 @@ class netlink_selinux_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -690,7 +654,7 @@ class capability 32 sys_resource n 1 chown n 1 -class netlink_ip6fw_socket 25 +class netlink_ip6fw_socket 23 nlmsg_write w 10 nlmsg_read r 10 append w 10 @@ -702,8 +666,6 @@ class netlink_ip6fw_socket 25 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -717,7 +679,7 @@ class netlink_ip6fw_socket 25 listen r 1 map n 1 -class dccp_socket 25 +class dccp_socket 23 node_bind n 1 name_connect w 10 append w 10 @@ -729,8 +691,6 @@ class dccp_socket 25 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -744,7 +704,7 @@ class dccp_socket 25 listen r 1 map n 1 -class netlink_firewall_socket 25 +class netlink_firewall_socket 23 nlmsg_write w 10 nlmsg_read r 10 append w 10 @@ -756,8 +716,6 @@ class netlink_firewall_socket 25 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -771,7 +729,7 @@ class netlink_firewall_socket 25 listen r 1 map n 1 -class sock_file 26 +class sock_file 25 audit_access r 1 execmod n 1 open n 1 @@ -791,7 +749,6 @@ class sock_file 26 relabelto w 10 mounton b 1 quotaon b 1 - swapon b 1 map n 1 watch r 3 watch_mount r 3 @@ -799,7 +756,7 @@ class sock_file 26 watch_with_perm r 3 watch_reads r 3 -class unix_dgram_socket 23 +class unix_dgram_socket 21 append w 10 bind w 1 connect w 1 @@ -809,8 +766,6 @@ class unix_dgram_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -824,7 +779,7 @@ class unix_dgram_socket 23 listen r 1 map n 1 -class netlink_kobject_uevent_socket 23 +class netlink_kobject_uevent_socket 21 append w 10 bind w 1 connect w 1 @@ -834,8 +789,6 @@ class netlink_kobject_uevent_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -861,11 +814,10 @@ class db_blob 10 setattr w 7 relabelto w 1 -class filesystem 11 +class filesystem 10 associate n 1 quotaget r 1 relabelfrom r 10 - transition w 1 getattr r 1 quotamod w 1 mount w 1 @@ -874,7 +826,7 @@ class filesystem 11 relabelto w 10 watch r 3 -class netlink_xfrm_socket 25 +class netlink_xfrm_socket 23 nlmsg_write w 10 nlmsg_read r 10 append w 10 @@ -886,8 +838,6 @@ class netlink_xfrm_socket 25 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -933,7 +883,7 @@ class db_schema 9 setattr w 5 relabelto r 1 -class netlink_dnrt_socket 23 +class netlink_dnrt_socket 21 append w 10 bind w 1 connect w 1 @@ -943,8 +893,6 @@ class netlink_dnrt_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1006,7 +954,7 @@ class x_font 6 getattr r 7 use r 1 -class key_socket 23 +class key_socket 21 append w 10 bind w 1 connect w 1 @@ -1016,8 +964,6 @@ class key_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1031,19 +977,11 @@ class key_socket 23 listen r 1 map n 1 -class netif 10 - rawip_recv r 10 - tcp_recv r 10 - udp_recv r 10 - rawip_send w 10 +class netif 2 egress w 10 ingress r 10 - tcp_send w 10 - udp_send w 10 - dccp_recv r 10 - dccp_send w 10 -class packet_socket 23 +class packet_socket 21 append w 10 bind w 1 connect w 1 @@ -1053,8 +991,6 @@ class packet_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1075,7 +1011,7 @@ class msg 2 send w 10 receive r 10 -class tun_socket 24 +class tun_socket 22 attach_queue w 5 append w 10 bind w 1 @@ -1086,8 +1022,6 @@ class tun_socket 24 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1101,7 +1035,7 @@ class tun_socket 24 listen r 1 map n 1 -class udp_socket 24 +class udp_socket 22 node_bind n 1 append w 10 bind w 1 @@ -1112,8 +1046,6 @@ class udp_socket 24 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1127,7 +1059,7 @@ class udp_socket 24 listen r 1 map n 1 -class appletalk_socket 23 +class appletalk_socket 21 append w 10 bind w 1 connect w 1 @@ -1137,8 +1069,6 @@ class appletalk_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 1 setattr w 1 accept r 1 @@ -1174,7 +1104,7 @@ class x_screen 8 saver_getattr r 7 saver_setattr w 7 -class rawip_socket 24 +class rawip_socket 22 node_bind n 1 append w 10 bind w 1 @@ -1185,8 +1115,6 @@ class rawip_socket 24 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 1 setattr w 1 accept r 1 @@ -1228,7 +1156,7 @@ class db_column 9 setattr w 7 relabelto w 1 -class netlink_socket 23 +class netlink_socket 21 append w 10 bind w 1 connect w 1 @@ -1238,8 +1166,6 @@ class netlink_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1364,7 +1290,7 @@ class binder 4 set_context_mgr w 1 impersonate n 1 -class netlink_connector_socket 23 +class netlink_connector_socket 21 append w 10 bind w 1 connect w 1 @@ -1374,8 +1300,6 @@ class netlink_connector_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1389,7 +1313,7 @@ class netlink_connector_socket 23 listen r 1 map n 1 -class netlink_netfilter_socket 23 +class netlink_netfilter_socket 21 append w 10 bind w 1 connect w 1 @@ -1399,8 +1323,6 @@ class netlink_netfilter_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1414,7 +1336,7 @@ class netlink_netfilter_socket 23 listen r 1 map n 1 -class netlink_iscsi_socket 23 +class netlink_iscsi_socket 21 append w 10 bind w 1 connect w 1 @@ -1424,8 +1346,6 @@ class netlink_iscsi_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1448,7 +1368,7 @@ class db_exception 7 relabelto w 1 use r 1 -class netlink_rdma_socket 23 +class netlink_rdma_socket 21 append w 10 bind w 1 connect w 1 @@ -1458,8 +1378,6 @@ class netlink_rdma_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1473,7 +1391,7 @@ class netlink_rdma_socket 23 listen r 1 map n 1 -class netlink_generic_socket 23 +class netlink_generic_socket 21 append w 10 bind w 1 connect w 1 @@ -1483,8 +1401,6 @@ class netlink_generic_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1498,7 +1414,7 @@ class netlink_generic_socket 23 listen r 1 map n 1 -class netlink_scsitransport_socket 23 +class netlink_scsitransport_socket 21 append w 10 bind w 1 connect w 1 @@ -1508,8 +1424,6 @@ class netlink_scsitransport_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1531,7 +1445,7 @@ class service 6 reload w 1 stop w 1 -class netlink_crypto_socket 23 +class netlink_crypto_socket 21 append w 10 bind w 1 connect w 1 @@ -1541,8 +1455,6 @@ class netlink_crypto_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1565,7 +1477,7 @@ class db_datatype 7 relabelto w 1 use r 1 -class netlink_fib_lookup_socket 23 +class netlink_fib_lookup_socket 21 append w 10 bind w 1 connect w 1 @@ -1575,8 +1487,6 @@ class netlink_fib_lookup_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1632,7 +1542,7 @@ class cap2_userns 6 wake_alarm n 1 audit_read n 1 -class ax25_socket 23 +class ax25_socket 21 append w 10 bind w 1 connect w 1 @@ -1642,8 +1552,6 @@ class ax25_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1657,7 +1565,7 @@ class ax25_socket 23 listen r 1 map n 1 -class ipx_socket 23 +class ipx_socket 21 append w 10 bind w 1 connect w 1 @@ -1667,8 +1575,6 @@ class ipx_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1682,7 +1588,7 @@ class ipx_socket 23 listen r 1 map n 1 -class netrom_socket 23 +class netrom_socket 21 append w 10 bind w 1 connect w 1 @@ -1692,8 +1598,6 @@ class netrom_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1707,7 +1611,7 @@ class netrom_socket 23 listen r 1 map n 1 -class x25_socket 23 +class x25_socket 21 append w 10 bind w 1 connect w 1 @@ -1717,8 +1621,6 @@ class x25_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1732,7 +1634,7 @@ class x25_socket 23 listen r 1 map n 1 -class rose_socket 23 +class rose_socket 21 append w 10 bind w 1 connect w 1 @@ -1742,8 +1644,6 @@ class rose_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1757,7 +1657,7 @@ class rose_socket 23 listen r 1 map n 1 -class decnet_socket 23 +class decnet_socket 21 append w 10 bind w 1 connect w 1 @@ -1767,8 +1667,6 @@ class decnet_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1782,7 +1680,7 @@ class decnet_socket 23 listen r 1 map n 1 -class atmsvc_socket 23 +class atmsvc_socket 21 append w 10 bind w 1 connect w 1 @@ -1792,8 +1690,6 @@ class atmsvc_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1807,7 +1703,7 @@ class atmsvc_socket 23 listen r 1 map n 1 -class rds_socket 23 +class rds_socket 21 append w 10 bind w 1 connect w 1 @@ -1817,8 +1713,6 @@ class rds_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1832,7 +1726,7 @@ class rds_socket 23 listen r 1 map n 1 -class irda_socket 23 +class irda_socket 21 append w 10 bind w 1 connect w 1 @@ -1842,8 +1736,6 @@ class irda_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1857,7 +1749,7 @@ class irda_socket 23 listen r 1 map n 1 -class pppox_socket 23 +class pppox_socket 21 append w 10 bind w 1 connect w 1 @@ -1867,8 +1759,6 @@ class pppox_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1882,7 +1772,7 @@ class pppox_socket 23 listen r 1 map n 1 -class llc_socket 23 +class llc_socket 21 append w 10 bind w 1 connect w 1 @@ -1892,8 +1782,6 @@ class llc_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1907,7 +1795,7 @@ class llc_socket 23 listen r 1 map n 1 -class can_socket 23 +class can_socket 21 append w 10 bind w 1 connect w 1 @@ -1917,8 +1805,6 @@ class can_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1932,7 +1818,7 @@ class can_socket 23 listen r 1 map n 1 -class tipc_socket 23 +class tipc_socket 21 append w 10 bind w 1 connect w 1 @@ -1942,8 +1828,6 @@ class tipc_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1957,7 +1841,7 @@ class tipc_socket 23 listen r 1 map n 1 -class bluetooth_socket 23 +class bluetooth_socket 21 append w 10 bind w 1 connect w 1 @@ -1967,8 +1851,6 @@ class bluetooth_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -1982,7 +1864,7 @@ class bluetooth_socket 23 listen r 1 map n 1 -class iucv_socket 23 +class iucv_socket 21 append w 10 bind w 1 connect w 1 @@ -1992,8 +1874,6 @@ class iucv_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -2007,7 +1887,7 @@ class iucv_socket 23 listen r 1 map n 1 -class rxrpc_socket 23 +class rxrpc_socket 21 append w 10 bind w 1 connect w 1 @@ -2017,8 +1897,6 @@ class rxrpc_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -2032,7 +1910,7 @@ class rxrpc_socket 23 listen r 1 map n 1 -class isdn_socket 23 +class isdn_socket 21 append w 10 bind w 1 connect w 1 @@ -2042,8 +1920,6 @@ class isdn_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -2057,7 +1933,7 @@ class isdn_socket 23 listen r 1 map n 1 -class phonet_socket 23 +class phonet_socket 21 append w 10 bind w 1 connect w 1 @@ -2067,8 +1943,6 @@ class phonet_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -2082,7 +1956,7 @@ class phonet_socket 23 listen r 1 map n 1 -class ieee802154_socket 23 +class ieee802154_socket 21 append w 10 bind w 1 connect w 1 @@ -2092,8 +1966,6 @@ class ieee802154_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -2107,7 +1979,7 @@ class ieee802154_socket 23 listen r 1 map n 1 -class caif_socket 23 +class caif_socket 21 append w 10 bind w 1 connect w 1 @@ -2117,8 +1989,6 @@ class caif_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -2132,7 +2002,7 @@ class caif_socket 23 listen r 1 map n 1 -class alg_socket 23 +class alg_socket 21 append w 10 bind w 1 connect n 1 @@ -2142,8 +2012,6 @@ class alg_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -2157,7 +2025,7 @@ class alg_socket 23 listen r 1 map n 1 -class nfc_socket 23 +class nfc_socket 21 append w 10 bind w 1 connect w 1 @@ -2167,8 +2035,6 @@ class nfc_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -2182,7 +2048,7 @@ class nfc_socket 23 listen r 1 map n 1 -class vsock_socket 23 +class vsock_socket 21 append w 10 bind w 1 connect w 1 @@ -2192,8 +2058,6 @@ class vsock_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -2207,7 +2071,7 @@ class vsock_socket 23 listen r 1 map n 1 -class kcm_socket 23 +class kcm_socket 21 append w 10 bind w 1 connect w 1 @@ -2217,8 +2081,6 @@ class kcm_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -2232,7 +2094,7 @@ class kcm_socket 23 listen r 1 map n 1 -class qipcrtr_socket 23 +class qipcrtr_socket 21 append w 10 bind w 1 connect w 1 @@ -2242,8 +2104,6 @@ class qipcrtr_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -2257,7 +2117,7 @@ class qipcrtr_socket 23 listen r 1 map n 1 -class smc_socket 23 +class smc_socket 21 append w 10 bind w 1 connect w 1 @@ -2267,8 +2127,6 @@ class smc_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -2282,7 +2140,7 @@ class smc_socket 23 listen r 1 map n 1 -class sctp_socket 26 +class sctp_socket 24 append w 10 bind w 1 connect w 1 @@ -2292,8 +2150,6 @@ class sctp_socket 26 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -2310,7 +2166,7 @@ class sctp_socket 26 association w 1 name_connect w 10 -class atmpvc_socket 23 +class atmpvc_socket 21 append w 10 bind w 1 connect w 1 @@ -2320,8 +2176,6 @@ class atmpvc_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -2335,7 +2189,7 @@ class atmpvc_socket 23 listen r 1 map n 1 -class icmp_socket 24 +class icmp_socket 22 append w 10 bind w 1 connect w 1 @@ -2345,8 +2199,6 @@ class icmp_socket 24 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 @@ -2378,7 +2230,7 @@ class infiniband_endport 1 class infiniband_pkey 1 access b 10 -class xdp_socket 23 +class xdp_socket 21 append w 10 bind w 1 connect w 1 @@ -2388,8 +2240,6 @@ class xdp_socket 23 ioctl n 1 name_bind n 1 sendto w 10 - recv_msg r 10 - send_msg w 10 getattr r 7 setattr w 7 accept r 1 From f1da6d19dc96d40b9cbb0abeb70968ddba84f230 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Wed, 28 Jul 2021 13:25:10 -0400 Subject: [PATCH 04/28] Remove pylint unsubscriptable-object exemptions. Several class annotations were subscripted but pylint had a bug that did not handle this. This is now fixed in pylint 2.8+. Signed-off-by: Chris PeBenito --- setools/diff/bounds.py | 3 +-- setools/diff/conditional.py | 3 +-- setools/diff/constraints.py | 3 +-- setools/diff/context.py | 3 +-- setools/diff/default.py | 3 +-- setools/diff/difference.py | 3 +-- setools/diff/fsuse.py | 3 +-- setools/diff/genfscon.py | 3 +-- setools/diff/ibendportcon.py | 3 +-- setools/diff/ibpkeycon.py | 3 +-- setools/diff/mls.py | 9 +++------ setools/diff/mlsrules.py | 3 +-- setools/diff/netifcon.py | 3 +-- setools/diff/nodecon.py | 3 +-- setools/diff/portcon.py | 3 +-- setools/diff/rbacrules.py | 6 ++---- setools/diff/terules.py | 6 ++---- tox.ini | 2 +- 18 files changed, 22 insertions(+), 43 deletions(-) diff --git a/setools/diff/bounds.py b/setools/diff/bounds.py index 1994a931..b083584a 100644 --- a/setools/diff/bounds.py +++ b/setools/diff/bounds.py @@ -99,8 +99,7 @@ def _reset_diff(self) -> None: self._right_typebounds = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class BoundsWrapper(Wrapper[Bounds]): # pylint: disable=unsubscriptable-object +class BoundsWrapper(Wrapper[Bounds]): """Wrap *bounds for diff purposes.""" diff --git a/setools/diff/conditional.py b/setools/diff/conditional.py index aaf20e65..6cc745ab 100644 --- a/setools/diff/conditional.py +++ b/setools/diff/conditional.py @@ -43,8 +43,7 @@ def conditional_wrapper_factory(cond: Conditional) -> "ConditionalWrapper": return a -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class ConditionalWrapper(Wrapper[Conditional]): # pylint: disable=unsubscriptable-object +class ConditionalWrapper(Wrapper[Conditional]): """Wrap conditional policy expressions to allow comparisons by truth table.""" diff --git a/setools/diff/constraints.py b/setools/diff/constraints.py index 29a825a2..6a15b2a5 100644 --- a/setools/diff/constraints.py +++ b/setools/diff/constraints.py @@ -174,8 +174,7 @@ def _reset_diff(self) -> None: self._right_constraints = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class ConstraintWrapper(Wrapper[AnyConstraint]): # pylint: disable=unsubscriptable-object +class ConstraintWrapper(Wrapper[AnyConstraint]): """Wrap constraints for diff purposes.""" diff --git a/setools/diff/context.py b/setools/diff/context.py index 679ffdab..da8011cc 100644 --- a/setools/diff/context.py +++ b/setools/diff/context.py @@ -30,8 +30,7 @@ from .users import user_wrapper_factory -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class ContextWrapper(Wrapper[Context]): # pylint: disable=unsubscriptable-object +class ContextWrapper(Wrapper[Context]): """Wrap contexts to allow comparisons.""" diff --git a/setools/diff/default.py b/setools/diff/default.py index 913132de..cab41508 100644 --- a/setools/diff/default.py +++ b/setools/diff/default.py @@ -98,8 +98,7 @@ def _reset_diff(self) -> None: self.modified_defaults = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class DefaultWrapper(Wrapper[Default]): # pylint: disable=unsubscriptable-object +class DefaultWrapper(Wrapper[Default]): """Wrap default_* to allow comparisons.""" diff --git a/setools/diff/difference.py b/setools/diff/difference.py index dc23e1a6..78ccb181 100644 --- a/setools/diff/difference.py +++ b/setools/diff/difference.py @@ -169,8 +169,7 @@ def __ne__(self, other): S = TypeVar("S", bound=PolicySymbol) -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class SymbolWrapper(Wrapper[S]): # pylint: disable=unsubscriptable-object +class SymbolWrapper(Wrapper[S]): """ General wrapper for policy symbols, e.g. types, roles diff --git a/setools/diff/fsuse.py b/setools/diff/fsuse.py index 25f2ad62..69cb0df2 100644 --- a/setools/diff/fsuse.py +++ b/setools/diff/fsuse.py @@ -74,8 +74,7 @@ def _reset_diff(self) -> None: self.modified_fs_uses = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class FSUseWrapper(Wrapper[FSUse]): # pylint: disable=unsubscriptable-object +class FSUseWrapper(Wrapper[FSUse]): """Wrap fs_use_* rules to allow set operations.""" diff --git a/setools/diff/genfscon.py b/setools/diff/genfscon.py index 92031336..80d41cb1 100644 --- a/setools/diff/genfscon.py +++ b/setools/diff/genfscon.py @@ -74,8 +74,7 @@ def _reset_diff(self) -> None: self.modified_genfscons = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class GenfsconWrapper(Wrapper[Genfscon]): # pylint: disable=unsubscriptable-object +class GenfsconWrapper(Wrapper[Genfscon]): """Wrap genfscon rules to allow set operations.""" diff --git a/setools/diff/ibendportcon.py b/setools/diff/ibendportcon.py index e70a0ca3..4ee4df87 100644 --- a/setools/diff/ibendportcon.py +++ b/setools/diff/ibendportcon.py @@ -73,8 +73,7 @@ def _reset_diff(self) -> None: self.modified_ibendportcons = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class IbendportconWrapper(Wrapper[Ibendportcon]): # pylint: disable=unsubscriptable-object +class IbendportconWrapper(Wrapper[Ibendportcon]): """Wrap ibendportcon statements for diff purposes.""" diff --git a/setools/diff/ibpkeycon.py b/setools/diff/ibpkeycon.py index 1974ef29..5c0a9e72 100644 --- a/setools/diff/ibpkeycon.py +++ b/setools/diff/ibpkeycon.py @@ -74,8 +74,7 @@ def _reset_diff(self) -> None: self.modified_ibpkeycons = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class IbpkeyconWrapper(Wrapper[Ibpkeycon]): # pylint: disable=unsubscriptable-object +class IbpkeyconWrapper(Wrapper[Ibpkeycon]): """Wrap ibpkeycon statements for diff purposes.""" diff --git a/setools/diff/mls.py b/setools/diff/mls.py index c8463200..f0226545 100644 --- a/setools/diff/mls.py +++ b/setools/diff/mls.py @@ -218,8 +218,7 @@ def _reset_diff(self) -> None: self.modified_levels = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class LevelDeclWrapper(Wrapper[LevelDecl]): # pylint: disable=unsubscriptable-object +class LevelDeclWrapper(Wrapper[LevelDecl]): """Wrap level declarations to allow comparisons.""" @@ -242,8 +241,7 @@ def __lt__(self, other): return self.sensitivity < other.sensitivity -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class LevelWrapper(Wrapper[Level]): # pylint: disable=unsubscriptable-object +class LevelWrapper(Wrapper[Level]): """Wrap levels to allow comparisons.""" @@ -276,8 +274,7 @@ def __lt__(self, other): return False -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class RangeWrapper(Wrapper[Range]): # pylint: disable=unsubscriptable-object +class RangeWrapper(Wrapper[Range]): """ Wrap ranges to allow comparisons. diff --git a/setools/diff/mlsrules.py b/setools/diff/mlsrules.py index a8e72dbe..3ae71657 100644 --- a/setools/diff/mlsrules.py +++ b/setools/diff/mlsrules.py @@ -115,8 +115,7 @@ def _reset_diff(self) -> None: self._right_mls_rules = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class MLSRuleWrapper(Wrapper[MLSRule]): # pylint: disable=unsubscriptable-object +class MLSRuleWrapper(Wrapper[MLSRule]): """Wrap MLS rules to allow set operations.""" diff --git a/setools/diff/netifcon.py b/setools/diff/netifcon.py index 29e813c7..ab77073e 100644 --- a/setools/diff/netifcon.py +++ b/setools/diff/netifcon.py @@ -89,8 +89,7 @@ def _reset_diff(self) -> None: self.modified_netifcons = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class NetifconWrapper(Wrapper[Netifcon]): # pylint: disable=unsubscriptable-object +class NetifconWrapper(Wrapper[Netifcon]): """Wrap netifcon statements for diff purposes.""" diff --git a/setools/diff/nodecon.py b/setools/diff/nodecon.py index 70d2c375..c1242ee1 100644 --- a/setools/diff/nodecon.py +++ b/setools/diff/nodecon.py @@ -74,8 +74,7 @@ def _reset_diff(self) -> None: self.modified_nodecons = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class NodeconWrapper(Wrapper[Nodecon]): # pylint: disable=unsubscriptable-object +class NodeconWrapper(Wrapper[Nodecon]): """Wrap nodecon statements for diff purposes.""" diff --git a/setools/diff/portcon.py b/setools/diff/portcon.py index 26a0fc03..548b658b 100644 --- a/setools/diff/portcon.py +++ b/setools/diff/portcon.py @@ -73,8 +73,7 @@ def _reset_diff(self) -> None: self.modified_portcons = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class PortconWrapper(Wrapper[Portcon]): # pylint: disable=unsubscriptable-object +class PortconWrapper(Wrapper[Portcon]): """Wrap portcon statements for diff purposes.""" diff --git a/setools/diff/rbacrules.py b/setools/diff/rbacrules.py index 849e8a07..8a7ea95a 100644 --- a/setools/diff/rbacrules.py +++ b/setools/diff/rbacrules.py @@ -137,8 +137,7 @@ def _reset_diff(self) -> None: self._right_rbac_rules = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class RoleAllowWrapper(Wrapper[RoleAllow]): # pylint: disable=unsubscriptable-object +class RoleAllowWrapper(Wrapper[RoleAllow]): """Wrap role allow rules to allow set operations.""" @@ -162,8 +161,7 @@ def __eq__(self, other): return self.source == other.source and self.target == other.target -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class RoleTransitionWrapper(Wrapper[RoleTransition]): # pylint: disable=unsubscriptable-object +class RoleTransitionWrapper(Wrapper[RoleTransition]): """Wrap role_transition rules to allow set operations.""" diff --git a/setools/diff/terules.py b/setools/diff/terules.py index 92994261..a46f99c9 100644 --- a/setools/diff/terules.py +++ b/setools/diff/terules.py @@ -550,8 +550,7 @@ def _reset_diff(self) -> None: self._right_te_rules = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class AVRuleXpermWrapper(Wrapper[AVRuleXperm]): # pylint: disable=unsubscriptable-object +class AVRuleXpermWrapper(Wrapper[AVRuleXperm]): """Wrap extended permission access vector rules to allow set operations.""" @@ -581,8 +580,7 @@ def __eq__(self, other): self.xperm_type == other.xperm_type -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class TERuleWrapper(Wrapper): # pylint: disable=unsubscriptable-object +class TERuleWrapper(Wrapper): """Wrap type_* rules to allow set operations.""" diff --git a/tox.ini b/tox.ini index 0e152a34..81c059e2 100644 --- a/tox.ini +++ b/tox.ini @@ -23,7 +23,7 @@ commands = coverage run setup.py test -q [testenv:lint] deps = {[testenv]deps} - pylint + pylint>=2.8.0 commands_pre = pylint --version {envpython} setup.py build_ext -i commands = pylint -E --rcfile .pylintrc setools tests seinfo seinfoflow sedta sesearch sediff sechecker From c4cc561777cc856a294ce2657070ccdadd41ff02 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Wed, 28 Jul 2021 13:35:33 -0400 Subject: [PATCH 05/28] .mypy.ini: Ignore missing pkg_resources annotations. Signed-off-by: Chris PeBenito --- .mypy.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.mypy.ini b/.mypy.ini index 124d0597..b45560b7 100644 --- a/.mypy.ini +++ b/.mypy.ini @@ -14,3 +14,6 @@ ignore_missing_imports = True [mypy-sip] ignore_missing_imports = True + +[mypy-pkg_resources] +ignore_missing_imports = True From 2c0c562d22c7ce8b949294a2d39617209e2fd79f Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Wed, 28 Jul 2021 13:55:51 -0400 Subject: [PATCH 06/28] tests.yml: Enable Python 3.9 testing. This requires NetworkX 2.6. Signed-off-by: Chris PeBenito --- .github/workflows/tests.yml | 3 ++- README.md | 6 +++--- setup.py | 2 +- tox.ini | 5 ++++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 51e05d1a..bef60c1b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,11 +17,12 @@ jobs: - {python: 3.6, tox: py36} - {python: 3.7, tox: py37} - {python: 3.8, tox: py38} + - {python: 3.9, tox: py39} - {python: 3.6, tox: pep8} - {python: 3.6, tox: lint} - {python: 3.6, tox: mypy} #- {python: 3.6, tox: coverage} - + steps: - uses: actions/checkout@v2 diff --git a/README.md b/README.md index b5fbdedd..8c89050c 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ As such it contains a setup.py script that will install the tools. To run SETools command line tools, the following packages are required: * Python 3.6+ -* NetworkX 2.0+ +* NetworkX 2.0+ (2.6+ for Python 3.9+) * setuptools * libselinux * libsepol 3.2+ @@ -27,7 +27,7 @@ To run SETools graphical tools, the following packages are also required: To build SETools, the following development packages are required, in addition to the development packages from the above list: * gcc -* cython 0.27+ (0.29.14+ for Python 3.8) +* cython 0.27+ (0.29.14+ for Python 3.8+) To run SETools unit tests, the following packages are required, in addition to the above dependencies: @@ -108,7 +108,7 @@ be compiled. ``` This feature assumes that the directory structure at $USERSPACE_SRC is the -same as the SELinux userspace code checked out from GitHub. +same as the SELinux userspace code checked out from GitHub. Since SETools is dynamically linked to libsepol and libselinux, you must specify the path to the libsepol/src and libselinux/src directories by diff --git a/setup.py b/setup.py index 1f9464a8..70e92ae6 100644 --- a/setup.py +++ b/setup.py @@ -159,7 +159,7 @@ def run(self): 'Topic :: Utilities', ], keywords='SELinux SETools policy analysis tools seinfo sesearch sediff sedta seinfoflow apol', - python_requires='>=3.4', + python_requires='>=3.6', # setup also requires libsepol and libselinux # C libraries and headers to compile. setup_requires=['setuptools', 'Cython>=0.27'], diff --git a/tox.ini b/tox.ini index 81c059e2..48d9ab38 100644 --- a/tox.ini +++ b/tox.ini @@ -46,7 +46,10 @@ commands = mypy -p setools [testenv] passenv = USERSPACE_SRC -deps = networkx==2.0 +deps = networkx>=2.0 cython>=0.27 + py38: cython>=0.29.14 + py39: networkx>=2.6 + py39: cython>=0.29.14 commands_pre = {envpython} setup.py build_ext -i commands = {envpython} setup.py test -q From ef2179a0c2cfdad729348c44a6d21b45e786fa30 Mon Sep 17 00:00:00 2001 From: Karl MacMillan Date: Fri, 13 Aug 2021 20:56:07 -0400 Subject: [PATCH 07/28] Correct the number of object classes in the perm_map file. Signed-off-by: Karl MacMillan --- setools/perm_map | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setools/perm_map b/setools/perm_map index 82913d08..5fd8852c 100644 --- a/setools/perm_map +++ b/setools/perm_map @@ -27,7 +27,7 @@ # Look to the examples below for further clarification. # # Number of object classes. -129 +132 class netlink_audit_socket 26 nlmsg_relay w 10 From 2a6dc60e11a538073da656166061f3bc4a10c7a9 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Thu, 18 Nov 2021 13:59:08 +0100 Subject: [PATCH 08/28] Make seinfo output predictable There are few places where frozenset is used. Given that frozenset is an unordered collection the output generated from this is unpredictable. The following command outputs are fixed using sorted() on frozensets: seinfo --constrain seinfo --common seinfo -c -x seinfo -r -x seinfo -u -x Fixes: https://github.com/SELinuxProject/setools/issues/65 Signed-off-by: Petr Lautrbach --- setools/policyrep/constraint.pxi | 2 +- setools/policyrep/objclass.pxi | 4 ++-- setools/policyrep/role.pxi | 2 +- setools/policyrep/user.pxi | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/setools/policyrep/constraint.pxi b/setools/policyrep/constraint.pxi index 01c63d87..0b4c5b9b 100644 --- a/setools/policyrep/constraint.pxi +++ b/setools/policyrep/constraint.pxi @@ -72,7 +72,7 @@ cdef class Constraint(BaseConstraint): def statement(self): if len(self.perms) > 1: - perms = "{{ {0} }}".format(' '.join(self.perms)) + perms = "{{ {0} }}".format(' '.join(sorted(self.perms))) else: # convert to list since sets cannot be indexed perms = list(self.perms)[0] diff --git a/setools/policyrep/objclass.pxi b/setools/policyrep/objclass.pxi index b7ec7b7d..8ed2be5a 100644 --- a/setools/policyrep/objclass.pxi +++ b/setools/policyrep/objclass.pxi @@ -75,7 +75,7 @@ cdef class Common(PolicySymbol): return other in self.perms def statement(self): - return "common {0}\n{{\n\t{1}\n}}".format(self, '\n\t'.join(self.perms)) + return "common {0}\n{{\n\t{1}\n}}".format(self, '\n\t'.join(sorted(self.perms))) cdef class ObjClass(PolicySymbol): @@ -204,7 +204,7 @@ cdef class ObjClass(PolicySymbol): # a class that inherits may not have additional permissions if len(self.perms) > 0: - stmt += "{{\n\t{0}\n}}".format('\n\t'.join(self.perms)) + stmt += "{{\n\t{0}\n}}".format('\n\t'.join(sorted(self.perms))) return stmt diff --git a/setools/policyrep/role.pxi b/setools/policyrep/role.pxi index 9a0dd39f..3af8a3f7 100644 --- a/setools/policyrep/role.pxi +++ b/setools/policyrep/role.pxi @@ -58,7 +58,7 @@ cdef class Role(PolicySymbol): if count == 1: stmt += " types {0}".format(types[0]) else: - stmt += " types {{ {0} }}".format(' '.join(types)) + stmt += " types {{ {0} }}".format(' '.join(sorted(types))) stmt += ";" return stmt diff --git a/setools/policyrep/user.pxi b/setools/policyrep/user.pxi index 9c82aa92..e37af293 100644 --- a/setools/policyrep/user.pxi +++ b/setools/policyrep/user.pxi @@ -81,7 +81,7 @@ cdef class User(PolicySymbol): if count == 1: stmt += roles[0] else: - stmt += "{{ {0} }}".format(' '.join(roles)) + stmt += "{{ {0} }}".format(' '.join(sorted(roles))) if self._level: stmt += " level {0.mls_level} range {0.mls_range};".format(self) From 93db3909f0e1cbdab8b5dba8a1c9821a5c8b7720 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Thu, 18 Nov 2021 11:26:18 -0500 Subject: [PATCH 09/28] sedta, seinfoflow: Make the default output brief. Change the sedta and seinfoflow so that they output a summary of the transitions and flows. Add a --full option to get the full rule outputs. Signed-off-by: Chris PeBenito --- sedta | 21 +++++++++++++++------ seinfoflow | 19 ++++++++++++------- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/sedta b/sedta index 57070098..0f13ef9d 100755 --- a/sedta +++ b/sedta @@ -26,6 +26,8 @@ import setools def print_transition(trans: setools.DomainTransition) -> None: + print() + if trans.transition: print("Domain transition rule(s):") for t in trans.transition: @@ -77,6 +79,7 @@ parser.add_argument("--version", action="version", version=setools.__version__) parser.add_argument("-p", "--policy", help="Path to SELinux policy to analyze.") parser.add_argument("-s", "--source", help="Source type of the analysis.", required=True) parser.add_argument("-t", "--target", help="Target type of the analysis.") +parser.add_argument("--full", help="Print rule lists for transitions.", action="store_true") parser.add_argument("--stats", action="store_true", help="Display statistics at the end of the analysis.") parser.add_argument("-v", "--verbose", action="store_true", @@ -128,26 +131,32 @@ try: for stepnum, step in enumerate(path, start=1): - print("Step {0}: {1} -> {2}\n".format(stepnum, step.source, step.target)) - print_transition(step) + print("Step {0}: {1} -> {2}".format(stepnum, step.source, step.target)) + + if args.full: + print_transition(step) if args.limit_trans and i >= args.limit_trans: break - print(i, "domain transition path(s) found.") + print() + + print("\n{} domain transition path(s) found.".format(i)) else: # single transition transitions = g.transitions(args.source) i = 0 for i, step in enumerate(transitions, start=1): - print("Transition {0}: {1} -> {2}\n".format(i, step.source, step.target)) - print_transition(step) + print("Transition {0}: {1} -> {2}".format(i, step.source, step.target)) + + if args.full: + print_transition(step) if args.limit_trans and i >= args.limit_trans: break - print(i, "domain transition(s) found.") + print("\n{} domain transition(s) found.".format(i)) if args.stats: print("\nGraph statistics:") diff --git a/seinfoflow b/seinfoflow index 0ddcfdc7..95e475e8 100755 --- a/seinfoflow +++ b/seinfoflow @@ -29,6 +29,8 @@ signal.signal(signal.SIGPIPE, signal.SIG_DFL) parser = argparse.ArgumentParser( description="SELinux policy information flow analysis tool.", epilog="If no analysis is selected, all information flow out of the source will be printed.") +parser.add_argument("--full", help="Print full rule lists for information flows.", + action="store_true") parser.add_argument("--version", action="version", version=setools.__version__) parser.add_argument("--stats", action="store_true", help="Display statistics at the end of the analysis.") @@ -117,10 +119,11 @@ try: for stepnum, step in enumerate(path, start=1): print(" Step {0}: {1} -> {2}".format(stepnum, step.source, step.target)) - for rule in sorted(step.rules): - print(" ", rule) + if args.full: + for rule in sorted(step.rules): + print(" ", rule) - print() + print() if args.limit_flows and flownum >= args.limit_flows: break @@ -131,15 +134,17 @@ try: flownum = 0 for flownum, flow in enumerate(g.infoflows(args.source), start=1): print("Flow {0}: {1} -> {2}".format(flownum, flow.source, flow.target)) - for rule in sorted(flow.rules): - print(" ", rule) - print() + if args.full: + for rule in sorted(flow.rules): + print(" ", rule) + + print() if args.limit_flows and flownum >= args.limit_flows: break - print(flownum, "information flow(s) found.") + print("\n{} information flow(s) found.".format(flownum)) if args.stats: print("\nGraph statistics:") From 59e3d1607e7f8e694f0583728de9ba81491d75c5 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Thu, 18 Nov 2021 12:39:53 -0500 Subject: [PATCH 10/28] seinfoflow: Make the permission map option (-m) optional. If not specified, the default permission map will be used. Signed-off-by: Chris PeBenito --- seinfoflow | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seinfoflow b/seinfoflow index 95e475e8..83a11425 100755 --- a/seinfoflow +++ b/seinfoflow @@ -41,8 +41,8 @@ parser.add_argument("--debug", action="store_true", dest="debug", help="Enable d settings = parser.add_argument_group("Analysis settings") settings.add_argument("-p", "--policy", help="Path to SELinux policy to analyze.") -settings.add_argument("-m", "--map", required=True, - help="Path to permission map file.") +settings.add_argument("-m", "--map", + help="Path to alternative permission map file.") settings.add_argument("-s", "--source", required=True, help="Source type of the analysis.") settings.add_argument("-t", "--target", default="", From 805525dfcea1c79b49450c92ef7446354e0e97d8 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Sat, 20 Nov 2021 14:03:26 -0500 Subject: [PATCH 11/28] Replace license text in sources with SPDX license indentifiers. Signed-off-by: Chris PeBenito --- apol | 15 +-------------- sechecker | 15 +-------------- sediff | 15 +-------------- sedta | 15 +-------------- seinfo | 15 +-------------- seinfoflow | 15 +-------------- sesearch | 15 +-------------- setools/__init__.py | 16 +--------------- setools/boolquery.py | 16 +--------------- setools/boundsquery.py | 16 +--------------- setools/categoryquery.py | 16 +--------------- setools/checker/__init__.py | 16 +--------------- setools/checker/assertrbac.py | 16 +--------------- setools/checker/assertte.py | 16 +--------------- setools/checker/checker.py | 16 +--------------- setools/checker/checkermodule.py | 16 +--------------- setools/checker/descriptors.py | 16 +--------------- setools/checker/emptyattr.py | 16 +--------------- setools/checker/globalkeys.py | 16 +--------------- setools/checker/roexec.py | 16 +--------------- setools/checker/util.py | 16 +--------------- setools/commonquery.py | 16 +--------------- setools/constraintquery.py | 16 +--------------- setools/defaultquery.py | 16 +--------------- setools/descriptors.py | 16 +--------------- setools/devicetreeconquery.py | 16 +--------------- setools/diff/__init__.py | 16 +--------------- setools/diff/bool.py | 16 +--------------- setools/diff/bounds.py | 16 +--------------- setools/diff/commons.py | 16 +--------------- setools/diff/conditional.py | 16 +--------------- setools/diff/constraints.py | 16 +--------------- setools/diff/context.py | 16 +--------------- setools/diff/default.py | 16 +--------------- setools/diff/descriptors.py | 16 +--------------- setools/diff/difference.py | 16 +--------------- setools/diff/fsuse.py | 16 +--------------- setools/diff/genfscon.py | 16 +--------------- setools/diff/ibendportcon.py | 16 +--------------- setools/diff/ibpkeycon.py | 16 +--------------- setools/diff/initsid.py | 16 +--------------- setools/diff/mls.py | 16 +--------------- setools/diff/mlsrules.py | 16 +--------------- setools/diff/netifcon.py | 16 +--------------- setools/diff/nodecon.py | 16 +--------------- setools/diff/objclass.py | 16 +--------------- setools/diff/polcap.py | 16 +--------------- setools/diff/portcon.py | 16 +--------------- setools/diff/properties.py | 16 +--------------- setools/diff/rbacrules.py | 16 +--------------- setools/diff/roles.py | 16 +--------------- setools/diff/terules.py | 16 +--------------- setools/diff/typeattr.py | 16 +--------------- setools/diff/types.py | 16 +--------------- setools/diff/typing.py | 16 +--------------- setools/diff/users.py | 16 +--------------- setools/dta.py | 16 +--------------- setools/exception.py | 16 +--------------- setools/fsusequery.py | 16 +--------------- setools/genfsconquery.py | 16 +--------------- setools/ibendportconquery.py | 16 +--------------- setools/ibpkeyconquery.py | 16 +--------------- setools/infoflow.py | 16 +--------------- setools/initsidquery.py | 16 +--------------- setools/iomemconquery.py | 16 +--------------- setools/ioportconquery.py | 16 +--------------- setools/mixins.py | 16 +--------------- setools/mlsrulequery.py | 16 +--------------- setools/netifconquery.py | 16 +--------------- setools/nodeconquery.py | 16 +--------------- setools/objclassquery.py | 16 +--------------- setools/pcideviceconquery.py | 16 +--------------- setools/permmap.py | 16 +--------------- setools/pirqconquery.py | 16 +--------------- setools/polcapquery.py | 16 +--------------- setools/policyrep.pyi | 16 +--------------- setools/policyrep.pyx | 16 +--------------- setools/policyrep/boolcond.pxi | 16 +--------------- setools/policyrep/bounds.pxi | 16 +--------------- setools/policyrep/constraint.pxi | 16 +--------------- setools/policyrep/context.pxi | 16 +--------------- setools/policyrep/default.pxi | 16 +--------------- setools/policyrep/fscontext.pxi | 16 +--------------- setools/policyrep/initsid.pxi | 16 +--------------- setools/policyrep/mls.pxi | 16 +--------------- setools/policyrep/mlsrule.pxi | 16 +--------------- setools/policyrep/netcontext.pxi | 16 +--------------- setools/policyrep/objclass.pxi | 16 +--------------- setools/policyrep/object.pxi | 16 +--------------- setools/policyrep/polcap.pxi | 16 +--------------- setools/policyrep/rbacrule.pxi | 16 +--------------- setools/policyrep/role.pxi | 16 +--------------- setools/policyrep/rule.pxi | 16 +--------------- setools/policyrep/selinux.pxd | 16 +--------------- setools/policyrep/selinuxpolicy.pxi | 16 +--------------- setools/policyrep/sepol.pxd | 16 +--------------- setools/policyrep/terule.pxi | 16 +--------------- setools/policyrep/typeattr.pxi | 16 +--------------- setools/policyrep/user.pxi | 16 +--------------- setools/policyrep/util.pxi | 16 +--------------- setools/policyrep/xencontext.pxi | 16 +--------------- setools/portconquery.py | 16 +--------------- setools/query.py | 16 +--------------- setools/rbacrulequery.py | 16 +--------------- setools/rolequery.py | 16 +--------------- setools/sensitivityquery.py | 16 +--------------- setools/terulequery.py | 16 +--------------- setools/typeattrquery.py | 16 +--------------- setools/typequery.py | 16 +--------------- setools/userquery.py | 16 +--------------- setools/util.py | 16 +--------------- setoolsgui/__init__.py | 15 +-------------- setoolsgui/apol/__init__.py | 15 +-------------- setoolsgui/apol/analysistab.py | 15 +-------------- setoolsgui/apol/boolquery.py | 15 +-------------- setoolsgui/apol/boundsquery.py | 15 +-------------- setoolsgui/apol/categoryquery.py | 15 +-------------- setoolsgui/apol/chooseanalysis.py | 15 +-------------- setoolsgui/apol/commonquery.py | 15 +-------------- setoolsgui/apol/config.py | 15 +-------------- setoolsgui/apol/constraintquery.py | 15 +-------------- setoolsgui/apol/defaultquery.py | 15 +-------------- setoolsgui/apol/dta.py | 15 +-------------- setoolsgui/apol/exception.py | 15 +-------------- setoolsgui/apol/excludetypes.py | 15 +-------------- setoolsgui/apol/fsusequery.py | 15 +-------------- setoolsgui/apol/genfsconquery.py | 15 +-------------- setoolsgui/apol/ibendportconquery.py | 15 +-------------- setoolsgui/apol/ibpkeyconquery.py | 15 +-------------- setoolsgui/apol/infoflow.py | 15 +-------------- setoolsgui/apol/initsidquery.py | 15 +-------------- setoolsgui/apol/mainwindow.py | 15 +-------------- setoolsgui/apol/mlsrulequery.py | 15 +-------------- setoolsgui/apol/netifconquery.py | 15 +-------------- setoolsgui/apol/nodeconquery.py | 15 +-------------- setoolsgui/apol/objclassquery.py | 15 +-------------- setoolsgui/apol/permmapedit.py | 15 +-------------- setoolsgui/apol/portconquery.py | 15 +-------------- setoolsgui/apol/queryupdater.py | 15 +-------------- setoolsgui/apol/rbacrulequery.py | 15 +-------------- setoolsgui/apol/rolequery.py | 15 +-------------- setoolsgui/apol/sensitivityquery.py | 15 +-------------- setoolsgui/apol/summary.py | 15 +-------------- setoolsgui/apol/terulequery.py | 15 +-------------- setoolsgui/apol/typeattrquery.py | 15 +-------------- setoolsgui/apol/typequery.py | 15 +-------------- setoolsgui/apol/userquery.py | 15 +-------------- setoolsgui/apol/workspace.py | 15 +-------------- setoolsgui/boolmodel.py | 15 +-------------- setoolsgui/boundsmodel.py | 15 +-------------- setoolsgui/commonmodel.py | 15 +-------------- setoolsgui/constraintmodel.py | 15 +-------------- setoolsgui/defaultmodel.py | 15 +-------------- setoolsgui/details.py | 15 +-------------- setoolsgui/fsusemodel.py | 15 +-------------- setoolsgui/genfsconmodel.py | 15 +-------------- setoolsgui/getdetailslist.py | 15 +-------------- setoolsgui/ibendportconmodel.py | 15 +-------------- setoolsgui/ibpkeyconmodel.py | 15 +-------------- setoolsgui/initsidmodel.py | 15 +-------------- setoolsgui/listview.py | 15 +-------------- setoolsgui/logtosignal.py | 15 +-------------- setoolsgui/mlsmodel.py | 15 +-------------- setoolsgui/mlsrulemodel.py | 15 +-------------- setoolsgui/models.py | 15 +-------------- setoolsgui/netifconmodel.py | 15 +-------------- setoolsgui/nodeconmodel.py | 15 +-------------- setoolsgui/objclassmodel.py | 15 +-------------- setoolsgui/portconmodel.py | 15 +-------------- setoolsgui/rbacrulemodel.py | 15 +-------------- setoolsgui/rolemodel.py | 15 +-------------- setoolsgui/tableview.py | 15 +-------------- setoolsgui/terulemodel.py | 15 +-------------- setoolsgui/treeview.py | 15 +-------------- setoolsgui/typeattrmodel.py | 15 +-------------- setoolsgui/typemodel.py | 15 +-------------- setoolsgui/usermodel.py | 15 +-------------- setoolsgui/widget.py | 15 +-------------- tests/__init__.py | 15 +-------------- tests/boolquery.py | 15 +-------------- tests/boundsquery.py | 15 +-------------- tests/categoryquery.py | 15 +-------------- tests/commonquery.py | 15 +-------------- tests/conditionalinfoflow.py | 15 +-------------- tests/constraintquery.py | 15 +-------------- tests/defaultquery.py | 15 +-------------- tests/devicetreeconquery.py | 15 +-------------- tests/diff.py | 15 +-------------- tests/dta.py | 15 +-------------- tests/fsusequery.py | 15 +-------------- tests/genfsconquery.py | 15 +-------------- tests/ibendportconquery.py | 15 +-------------- tests/ibpkeyconquery.py | 15 +-------------- tests/infoflow.py | 15 +-------------- tests/initsidquery.py | 15 +-------------- tests/iomemconquery.py | 15 +-------------- tests/ioportconquery.py | 15 +-------------- tests/mixins.py | 15 +-------------- tests/mlsrulequery.py | 15 +-------------- tests/netifconquery.py | 15 +-------------- tests/nodeconquery.py | 15 +-------------- tests/objclassquery.py | 15 +-------------- tests/pcideviceconquery.py | 15 +-------------- tests/permmap.py | 15 +-------------- tests/pirqconquery.py | 15 +-------------- tests/polcapquery.py | 15 +-------------- tests/policyrep/__init__.py | 15 +-------------- tests/policyrep/default.py | 15 +-------------- tests/policyrep/initsid.py | 15 +-------------- tests/policyrep/mls.py | 15 +-------------- tests/policyrep/mlsrule.py | 15 +-------------- tests/policyrep/objclass.py | 15 +-------------- tests/policyrep/polcap.py | 15 +-------------- tests/policyrep/rbacrule.py | 15 +-------------- tests/policyrep/role.py | 15 +-------------- tests/policyrep/selinuxpolicy.py | 15 +-------------- tests/policyrep/symbol.py | 15 +-------------- tests/policyrep/terule.py | 15 +-------------- tests/policyrep/typeattr.py | 15 +-------------- tests/policyrep/user.py | 15 +-------------- tests/policyrep/util.py | 15 +-------------- tests/portconquery.py | 15 +-------------- tests/rbacrulequery.py | 15 +-------------- tests/rolequery.py | 15 +-------------- tests/sensitivityquery.py | 15 +-------------- tests/terulequery.py | 15 +-------------- tests/typeattrquery.py | 15 +-------------- tests/typequery.py | 15 +-------------- tests/userquery.py | 15 +-------------- 229 files changed, 229 insertions(+), 3310 deletions(-) diff --git a/apol b/apol index 153fd890..40083219 100755 --- a/apol +++ b/apol @@ -1,20 +1,7 @@ #!/usr/bin/env python3 # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import sys diff --git a/sechecker b/sechecker index c410d331..f5da803d 100755 --- a/sechecker +++ b/sechecker @@ -1,20 +1,7 @@ #!/usr/bin/env python3 # Copyright 2020 Microsoft Corporation # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import setools diff --git a/sediff b/sediff index cdb5eeda..b2fef977 100755 --- a/sediff +++ b/sediff @@ -1,20 +1,7 @@ #!/usr/bin/env python3 # Copyright 2015-2016, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import setools diff --git a/sedta b/sedta index 0f13ef9d..ffd9ede0 100755 --- a/sedta +++ b/sedta @@ -1,20 +1,7 @@ #!/usr/bin/env python3 # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import sys diff --git a/seinfo b/seinfo index a05294c6..cecc9f07 100755 --- a/seinfo +++ b/seinfo @@ -2,20 +2,7 @@ # Copyright 2014-2015, Tresys Technology, LLC # Copyright 2018-2019, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import setools diff --git a/seinfoflow b/seinfoflow index 83a11425..5f4e7642 100755 --- a/seinfoflow +++ b/seinfoflow @@ -1,20 +1,7 @@ #!/usr/bin/env python3 # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import setools diff --git a/sesearch b/sesearch index 99e2940b..456a1cde 100755 --- a/sesearch +++ b/sesearch @@ -1,20 +1,7 @@ #!/usr/bin/env python3 # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import setools diff --git a/setools/__init__.py b/setools/__init__.py index d72d343e..ad9b36ad 100644 --- a/setools/__init__.py +++ b/setools/__init__.py @@ -2,21 +2,7 @@ # Copyright 2014-2015, Tresys Technology, LLC # Copyright 2016, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # try: import pkg_resources diff --git a/setools/boolquery.py b/setools/boolquery.py index 1d772160..3e8336ad 100644 --- a/setools/boolquery.py +++ b/setools/boolquery.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging from typing import Iterable, Optional diff --git a/setools/boundsquery.py b/setools/boundsquery.py index 794f7dff..96be3337 100644 --- a/setools/boundsquery.py +++ b/setools/boundsquery.py @@ -1,20 +1,6 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging import re diff --git a/setools/categoryquery.py b/setools/categoryquery.py index 31ccb51d..0b326a6a 100644 --- a/setools/categoryquery.py +++ b/setools/categoryquery.py @@ -1,20 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging from typing import Iterable diff --git a/setools/checker/__init__.py b/setools/checker/__init__.py index 0f4f5c71..80b227fb 100644 --- a/setools/checker/__init__.py +++ b/setools/checker/__init__.py @@ -1,20 +1,6 @@ # Copyright 2020, Microsoft Corporation # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from . import assertrbac diff --git a/setools/checker/assertrbac.py b/setools/checker/assertrbac.py index 8c496ff3..c642c2b7 100644 --- a/setools/checker/assertrbac.py +++ b/setools/checker/assertrbac.py @@ -1,21 +1,7 @@ # Copyright 2020, Microsoft Corporation # Copyright 2020, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging diff --git a/setools/checker/assertte.py b/setools/checker/assertte.py index a2996d07..acd073de 100644 --- a/setools/checker/assertte.py +++ b/setools/checker/assertte.py @@ -1,21 +1,7 @@ # Copyright 2020, Microsoft Corporation # Copyright 2020, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging diff --git a/setools/checker/checker.py b/setools/checker/checker.py index 82231c4d..fa1a02c5 100644 --- a/setools/checker/checker.py +++ b/setools/checker/checker.py @@ -1,20 +1,6 @@ # Copyright 2020, Microsoft Corporation # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import sys diff --git a/setools/checker/checkermodule.py b/setools/checker/checkermodule.py index 8182b483..f0d0ca04 100644 --- a/setools/checker/checkermodule.py +++ b/setools/checker/checkermodule.py @@ -1,20 +1,6 @@ # Copyright 2020, Microsoft Corporation # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import sys diff --git a/setools/checker/descriptors.py b/setools/checker/descriptors.py index 84568221..7afeee2f 100644 --- a/setools/checker/descriptors.py +++ b/setools/checker/descriptors.py @@ -1,20 +1,6 @@ # Copyright 2020, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import re from typing import Callable, Union diff --git a/setools/checker/emptyattr.py b/setools/checker/emptyattr.py index 6882856d..6c802a39 100644 --- a/setools/checker/emptyattr.py +++ b/setools/checker/emptyattr.py @@ -1,20 +1,6 @@ # Copyright 2020, Microsoft Corporation # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging diff --git a/setools/checker/globalkeys.py b/setools/checker/globalkeys.py index 16ca1dfd..5b5efe48 100644 --- a/setools/checker/globalkeys.py +++ b/setools/checker/globalkeys.py @@ -1,20 +1,6 @@ # Copyright 2020, Microsoft Corporation # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # # This is a separate file to break a circular import. diff --git a/setools/checker/roexec.py b/setools/checker/roexec.py index 13d5620c..7d4a09e1 100644 --- a/setools/checker/roexec.py +++ b/setools/checker/roexec.py @@ -1,20 +1,6 @@ # Copyright 2020, Microsoft Corporation # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging diff --git a/setools/checker/util.py b/setools/checker/util.py index 284d99f6..8dba820b 100644 --- a/setools/checker/util.py +++ b/setools/checker/util.py @@ -1,20 +1,6 @@ # Copyright 2020, Microsoft Corporation # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # diff --git a/setools/commonquery.py b/setools/commonquery.py index 55cd9306..bb514e45 100644 --- a/setools/commonquery.py +++ b/setools/commonquery.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging import re diff --git a/setools/constraintquery.py b/setools/constraintquery.py index 8abdca0e..e6d2434a 100644 --- a/setools/constraintquery.py +++ b/setools/constraintquery.py @@ -1,20 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging import re diff --git a/setools/defaultquery.py b/setools/defaultquery.py index cd4fedb2..d79533d0 100644 --- a/setools/defaultquery.py +++ b/setools/defaultquery.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging import re diff --git a/setools/descriptors.py b/setools/descriptors.py index 468de96e..2bf22564 100644 --- a/setools/descriptors.py +++ b/setools/descriptors.py @@ -1,21 +1,7 @@ # Copyright 2015, Tresys Technology, LLC # Copyright 2016, 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # """ SETools descriptors. diff --git a/setools/devicetreeconquery.py b/setools/devicetreeconquery.py index 76d84818..9213173c 100644 --- a/setools/devicetreeconquery.py +++ b/setools/devicetreeconquery.py @@ -1,20 +1,6 @@ # Derived from portconquery.py # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging from typing import Iterable, Optional diff --git a/setools/diff/__init__.py b/setools/diff/__init__.py index 3c9ff602..ad144c4e 100644 --- a/setools/diff/__init__.py +++ b/setools/diff/__init__.py @@ -1,20 +1,6 @@ # Copyright 2015-2016, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from .bool import BooleansDifference from .bounds import BoundsDifference diff --git a/setools/diff/bool.py b/setools/diff/bool.py index c4ef233b..29043e1d 100644 --- a/setools/diff/bool.py +++ b/setools/diff/bool.py @@ -1,21 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from collections import defaultdict from typing import NamedTuple diff --git a/setools/diff/bounds.py b/setools/diff/bounds.py index b083584a..4c0bcae0 100644 --- a/setools/diff/bounds.py +++ b/setools/diff/bounds.py @@ -1,21 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from typing import cast, List, NamedTuple, Optional diff --git a/setools/diff/commons.py b/setools/diff/commons.py index cf3596d0..378a3c8f 100644 --- a/setools/diff/commons.py +++ b/setools/diff/commons.py @@ -1,20 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from typing import NamedTuple, Set diff --git a/setools/diff/conditional.py b/setools/diff/conditional.py index 6cc745ab..c2afcb68 100644 --- a/setools/diff/conditional.py +++ b/setools/diff/conditional.py @@ -1,21 +1,7 @@ # Copyright 2015-2016, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from collections import defaultdict diff --git a/setools/diff/constraints.py b/setools/diff/constraints.py index 6a15b2a5..35dd0216 100644 --- a/setools/diff/constraints.py +++ b/setools/diff/constraints.py @@ -1,21 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from collections import defaultdict from typing import FrozenSet, List, Optional, Union diff --git a/setools/diff/context.py b/setools/diff/context.py index da8011cc..f1ef3583 100644 --- a/setools/diff/context.py +++ b/setools/diff/context.py @@ -1,21 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from typing import Optional diff --git a/setools/diff/default.py b/setools/diff/default.py index cab41508..49bbec43 100644 --- a/setools/diff/default.py +++ b/setools/diff/default.py @@ -1,20 +1,6 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from typing import NamedTuple, Optional diff --git a/setools/diff/descriptors.py b/setools/diff/descriptors.py index 5d6ec6c1..770be2c3 100644 --- a/setools/diff/descriptors.py +++ b/setools/diff/descriptors.py @@ -1,20 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from typing import MutableMapping from weakref import WeakKeyDictionary diff --git a/setools/diff/difference.py b/setools/diff/difference.py index 78ccb181..d23bffab 100644 --- a/setools/diff/difference.py +++ b/setools/diff/difference.py @@ -1,21 +1,7 @@ # Copyright 2015-2016, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging from abc import ABC, abstractmethod diff --git a/setools/diff/fsuse.py b/setools/diff/fsuse.py index 69cb0df2..39581fcf 100644 --- a/setools/diff/fsuse.py +++ b/setools/diff/fsuse.py @@ -1,20 +1,6 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from typing import NamedTuple diff --git a/setools/diff/genfscon.py b/setools/diff/genfscon.py index 80d41cb1..1beeedac 100644 --- a/setools/diff/genfscon.py +++ b/setools/diff/genfscon.py @@ -1,20 +1,6 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from typing import NamedTuple diff --git a/setools/diff/ibendportcon.py b/setools/diff/ibendportcon.py index 4ee4df87..c307accc 100644 --- a/setools/diff/ibendportcon.py +++ b/setools/diff/ibendportcon.py @@ -1,20 +1,6 @@ # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from typing import NamedTuple diff --git a/setools/diff/ibpkeycon.py b/setools/diff/ibpkeycon.py index 5c0a9e72..06fd7fdc 100644 --- a/setools/diff/ibpkeycon.py +++ b/setools/diff/ibpkeycon.py @@ -1,20 +1,6 @@ # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from typing import NamedTuple diff --git a/setools/diff/initsid.py b/setools/diff/initsid.py index 9040f9d9..c3bfbae4 100644 --- a/setools/diff/initsid.py +++ b/setools/diff/initsid.py @@ -1,20 +1,6 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from typing import NamedTuple diff --git a/setools/diff/mls.py b/setools/diff/mls.py index f0226545..829ddd3a 100644 --- a/setools/diff/mls.py +++ b/setools/diff/mls.py @@ -1,21 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from collections import defaultdict from typing import NamedTuple, Set diff --git a/setools/diff/mlsrules.py b/setools/diff/mlsrules.py index 3ae71657..628fac8e 100644 --- a/setools/diff/mlsrules.py +++ b/setools/diff/mlsrules.py @@ -1,21 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from collections import defaultdict from typing import NamedTuple diff --git a/setools/diff/netifcon.py b/setools/diff/netifcon.py index ab77073e..87cf02bb 100644 --- a/setools/diff/netifcon.py +++ b/setools/diff/netifcon.py @@ -1,20 +1,6 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from typing import NamedTuple, Optional diff --git a/setools/diff/nodecon.py b/setools/diff/nodecon.py index c1242ee1..fb5cd8bc 100644 --- a/setools/diff/nodecon.py +++ b/setools/diff/nodecon.py @@ -1,21 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # Copyright 2017, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from typing import NamedTuple diff --git a/setools/diff/objclass.py b/setools/diff/objclass.py index 64669fe2..16bd99ed 100644 --- a/setools/diff/objclass.py +++ b/setools/diff/objclass.py @@ -1,21 +1,7 @@ # Copyright 2015, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from collections import defaultdict from contextlib import suppress diff --git a/setools/diff/polcap.py b/setools/diff/polcap.py index e9210943..44bf7e62 100644 --- a/setools/diff/polcap.py +++ b/setools/diff/polcap.py @@ -1,20 +1,6 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from .descriptors import DiffResultDescriptor from .difference import Difference, SymbolWrapper diff --git a/setools/diff/portcon.py b/setools/diff/portcon.py index 548b658b..785469ba 100644 --- a/setools/diff/portcon.py +++ b/setools/diff/portcon.py @@ -1,20 +1,6 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from typing import NamedTuple diff --git a/setools/diff/properties.py b/setools/diff/properties.py index 292e222e..5a962f68 100644 --- a/setools/diff/properties.py +++ b/setools/diff/properties.py @@ -1,20 +1,6 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from typing import NamedTuple, Union diff --git a/setools/diff/rbacrules.py b/setools/diff/rbacrules.py index 8a7ea95a..fbbdb8c2 100644 --- a/setools/diff/rbacrules.py +++ b/setools/diff/rbacrules.py @@ -1,21 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from collections import defaultdict from typing import NamedTuple diff --git a/setools/diff/roles.py b/setools/diff/roles.py index e4598e9d..8e181371 100644 --- a/setools/diff/roles.py +++ b/setools/diff/roles.py @@ -1,21 +1,7 @@ # Copyright 2015, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from collections import defaultdict from typing import NamedTuple, Set diff --git a/setools/diff/terules.py b/setools/diff/terules.py index a46f99c9..4903c5f3 100644 --- a/setools/diff/terules.py +++ b/setools/diff/terules.py @@ -1,21 +1,7 @@ # Copyright 2015-2016, Tresys Technology, LLC # Copyright 2016, 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging from collections import defaultdict diff --git a/setools/diff/typeattr.py b/setools/diff/typeattr.py index eec96d81..b0127418 100644 --- a/setools/diff/typeattr.py +++ b/setools/diff/typeattr.py @@ -1,21 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from collections import defaultdict from typing import NamedTuple, Set diff --git a/setools/diff/types.py b/setools/diff/types.py index f1ed651e..04309ac5 100644 --- a/setools/diff/types.py +++ b/setools/diff/types.py @@ -1,21 +1,7 @@ # Copyright 2015, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from collections import defaultdict from typing import NamedTuple, Set, Union diff --git a/setools/diff/typing.py b/setools/diff/typing.py index e3b60888..c33fbcd6 100644 --- a/setools/diff/typing.py +++ b/setools/diff/typing.py @@ -1,18 +1,4 @@ -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from typing import DefaultDict, Dict, List, Optional, TypeVar diff --git a/setools/diff/users.py b/setools/diff/users.py index 9b8c01cd..e9c827cf 100644 --- a/setools/diff/users.py +++ b/setools/diff/users.py @@ -1,21 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from collections import defaultdict from typing import NamedTuple, Set, Optional, Union diff --git a/setools/dta.py b/setools/dta.py index 0fe752f5..ce5a3646 100644 --- a/setools/dta.py +++ b/setools/dta.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # # pylint: disable=unsubscriptable-object diff --git a/setools/exception.py b/setools/exception.py index d7e53c63..7e5bd4fb 100644 --- a/setools/exception.py +++ b/setools/exception.py @@ -1,20 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # # diff --git a/setools/fsusequery.py b/setools/fsusequery.py index 943bcb8e..ce064cb0 100644 --- a/setools/fsusequery.py +++ b/setools/fsusequery.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging import re diff --git a/setools/genfsconquery.py b/setools/genfsconquery.py index 11e36ec2..7b50a5cb 100644 --- a/setools/genfsconquery.py +++ b/setools/genfsconquery.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging import re diff --git a/setools/ibendportconquery.py b/setools/ibendportconquery.py index d5715032..23ef3a33 100644 --- a/setools/ibendportconquery.py +++ b/setools/ibendportconquery.py @@ -1,20 +1,6 @@ # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging from typing import Iterable, Optional diff --git a/setools/ibpkeyconquery.py b/setools/ibpkeyconquery.py index d37879ff..c5685c39 100644 --- a/setools/ibpkeyconquery.py +++ b/setools/ibpkeyconquery.py @@ -1,20 +1,6 @@ # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from ipaddress import IPv6Address import logging diff --git a/setools/infoflow.py b/setools/infoflow.py index 80041f10..0ef240a9 100644 --- a/setools/infoflow.py +++ b/setools/infoflow.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import itertools import logging diff --git a/setools/initsidquery.py b/setools/initsidquery.py index cfa41f45..183517fc 100644 --- a/setools/initsidquery.py +++ b/setools/initsidquery.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging from typing import Iterable diff --git a/setools/iomemconquery.py b/setools/iomemconquery.py index aacd47b2..6abc4f07 100644 --- a/setools/iomemconquery.py +++ b/setools/iomemconquery.py @@ -1,20 +1,6 @@ # Derived from portconquery.py # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging from typing import Iterable, Optional, Tuple diff --git a/setools/ioportconquery.py b/setools/ioportconquery.py index 179f8759..c627625a 100644 --- a/setools/ioportconquery.py +++ b/setools/ioportconquery.py @@ -1,20 +1,6 @@ # Derived from portconquery.py # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging from typing import Iterable, Optional, Tuple diff --git a/setools/mixins.py b/setools/mixins.py index 12b07a31..cbde443a 100644 --- a/setools/mixins.py +++ b/setools/mixins.py @@ -1,21 +1,7 @@ # Copyright 2015, Tresys Technology, LLC # Copyright 2019, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # # pylint: disable=attribute-defined-outside-init,no-member import re diff --git a/setools/mlsrulequery.py b/setools/mlsrulequery.py index 117f8440..1d398215 100644 --- a/setools/mlsrulequery.py +++ b/setools/mlsrulequery.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging from typing import Iterable diff --git a/setools/netifconquery.py b/setools/netifconquery.py index afdfa25f..1d5a2ed5 100644 --- a/setools/netifconquery.py +++ b/setools/netifconquery.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging from typing import Iterable diff --git a/setools/nodeconquery.py b/setools/nodeconquery.py index b7977444..86931ff2 100644 --- a/setools/nodeconquery.py +++ b/setools/nodeconquery.py @@ -1,21 +1,7 @@ # Copyright 2014-2015, Tresys Technology, LLC # Copyright 2017, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import ipaddress diff --git a/setools/objclassquery.py b/setools/objclassquery.py index 891f0d98..5dcdc9c4 100644 --- a/setools/objclassquery.py +++ b/setools/objclassquery.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging import re diff --git a/setools/pcideviceconquery.py b/setools/pcideviceconquery.py index 3de0dd84..51227d45 100644 --- a/setools/pcideviceconquery.py +++ b/setools/pcideviceconquery.py @@ -1,20 +1,6 @@ # Derived from portconquery.py # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging from typing import Iterable, Optional diff --git a/setools/permmap.py b/setools/permmap.py index 2ccc679c..4cadb025 100644 --- a/setools/permmap.py +++ b/setools/permmap.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging import copy diff --git a/setools/pirqconquery.py b/setools/pirqconquery.py index d44428c5..f431950a 100644 --- a/setools/pirqconquery.py +++ b/setools/pirqconquery.py @@ -1,20 +1,6 @@ # Derived from portconquery.py # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging from typing import Iterable, Optional diff --git a/setools/polcapquery.py b/setools/polcapquery.py index d874e152..0ba8add2 100644 --- a/setools/polcapquery.py +++ b/setools/polcapquery.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging from typing import Iterable diff --git a/setools/policyrep.pyi b/setools/policyrep.pyi index d94729cd..68a7ac57 100644 --- a/setools/policyrep.pyi +++ b/setools/policyrep.pyi @@ -1,18 +1,4 @@ -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from typing import Any, Callable, Dict, FrozenSet, Iterable, Iterator, List, NamedTuple, \ diff --git a/setools/policyrep.pyx b/setools/policyrep.pyx index 1ead1dad..9d2f9919 100644 --- a/setools/policyrep.pyx +++ b/setools/policyrep.pyx @@ -1,20 +1,6 @@ # Copyright 2017-2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from cpython.exc cimport PyErr_SetFromErrnoWithFilename diff --git a/setools/policyrep/boolcond.pxi b/setools/policyrep/boolcond.pxi index 6a098b7e..13e730be 100644 --- a/setools/policyrep/boolcond.pxi +++ b/setools/policyrep/boolcond.pxi @@ -1,21 +1,7 @@ # Copyright 2014-2015, Tresys Technology, LLC # Copyright 2017-2018 Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # TruthTableRow = collections.namedtuple("TruthTableRow", ["values", "result"]) diff --git a/setools/policyrep/bounds.pxi b/setools/policyrep/bounds.pxi index 6e901eff..ba0104ea 100644 --- a/setools/policyrep/bounds.pxi +++ b/setools/policyrep/bounds.pxi @@ -1,21 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # Copyright 2016-2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # diff --git a/setools/policyrep/constraint.pxi b/setools/policyrep/constraint.pxi index 0b4c5b9b..af304ca6 100644 --- a/setools/policyrep/constraint.pxi +++ b/setools/policyrep/constraint.pxi @@ -1,21 +1,7 @@ # Copyright 2014-2016, Tresys Technology, LLC # Copyright 2016-2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # # diff --git a/setools/policyrep/context.pxi b/setools/policyrep/context.pxi index 215f6db7..4f819824 100644 --- a/setools/policyrep/context.pxi +++ b/setools/policyrep/context.pxi @@ -1,21 +1,7 @@ # Copyright 2014-2015, Tresys Technology, LLC # Copyright 2016-2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # cdef class Context(PolicyObject): diff --git a/setools/policyrep/default.pxi b/setools/policyrep/default.pxi index dcba18b9..db551fb2 100644 --- a/setools/policyrep/default.pxi +++ b/setools/policyrep/default.pxi @@ -1,21 +1,7 @@ # Copyright 2014, 2016 Tresys Technology, LLC # Copyright 2016-2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # # diff --git a/setools/policyrep/fscontext.pxi b/setools/policyrep/fscontext.pxi index 0e502e58..7489dc69 100644 --- a/setools/policyrep/fscontext.pxi +++ b/setools/policyrep/fscontext.pxi @@ -1,21 +1,7 @@ # Copyright 2014, 2016, Tresys Technology, LLC # Copyright 2016-2018, 2020, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # # diff --git a/setools/policyrep/initsid.pxi b/setools/policyrep/initsid.pxi index e3e323fd..c235bf35 100644 --- a/setools/policyrep/initsid.pxi +++ b/setools/policyrep/initsid.pxi @@ -1,21 +1,7 @@ # Copyright 2014, Tresys Technology, LLC # Copyright 2017-2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # # diff --git a/setools/policyrep/mls.pxi b/setools/policyrep/mls.pxi index 30464b73..028499b0 100644 --- a/setools/policyrep/mls.pxi +++ b/setools/policyrep/mls.pxi @@ -1,21 +1,7 @@ # Copyright 2014-2016, Tresys Technology, LLC # Copyright 2017-2019, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # # pylint: disable=protected-access diff --git a/setools/policyrep/mlsrule.pxi b/setools/policyrep/mlsrule.pxi index 9093fe11..ec063047 100644 --- a/setools/policyrep/mlsrule.pxi +++ b/setools/policyrep/mlsrule.pxi @@ -1,21 +1,7 @@ # Copyright 2014, 2016, Tresys Technology, LLC # Copyright 2016-2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # diff --git a/setools/policyrep/netcontext.pxi b/setools/policyrep/netcontext.pxi index e230560f..49a024d3 100644 --- a/setools/policyrep/netcontext.pxi +++ b/setools/policyrep/netcontext.pxi @@ -1,21 +1,7 @@ # Copyright 2014, 2016, Tresys Technology, LLC # Copyright 2016-2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # IbpkeyconRange = collections.namedtuple("IbpkeyconRange", ["low", "high"]) diff --git a/setools/policyrep/objclass.pxi b/setools/policyrep/objclass.pxi index 8ed2be5a..66c22346 100644 --- a/setools/policyrep/objclass.pxi +++ b/setools/policyrep/objclass.pxi @@ -1,21 +1,7 @@ # Copyright 2014-2015, Tresys Technology, LLC # Copyright 2017-2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # cdef object _common_cache = WeakKeyDefaultDict(dict) diff --git a/setools/policyrep/object.pxi b/setools/policyrep/object.pxi index 6bff408f..30f1ffbe 100644 --- a/setools/policyrep/object.pxi +++ b/setools/policyrep/object.pxi @@ -1,21 +1,7 @@ # Copyright 2014, Tresys Technology, LLC # Copyright 2017-2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # # diff --git a/setools/policyrep/polcap.pxi b/setools/policyrep/polcap.pxi index d5731284..c5aa108a 100644 --- a/setools/policyrep/polcap.pxi +++ b/setools/policyrep/polcap.pxi @@ -1,21 +1,7 @@ # Copyright 2014-2015, Tresys Technology, LLC # Copyright 2017-2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # diff --git a/setools/policyrep/rbacrule.pxi b/setools/policyrep/rbacrule.pxi index 19d6a5f9..ba5e1896 100644 --- a/setools/policyrep/rbacrule.pxi +++ b/setools/policyrep/rbacrule.pxi @@ -1,21 +1,7 @@ # Copyright 2014, 2016, Tresys Technology, LLC # Copyright 2016-2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # # diff --git a/setools/policyrep/role.pxi b/setools/policyrep/role.pxi index 3af8a3f7..2ce44476 100644 --- a/setools/policyrep/role.pxi +++ b/setools/policyrep/role.pxi @@ -1,21 +1,7 @@ # Copyright 2014, Tresys Technology, LLC # Copyright 2017-2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # diff --git a/setools/policyrep/rule.pxi b/setools/policyrep/rule.pxi index a135e171..1d3edc0b 100644 --- a/setools/policyrep/rule.pxi +++ b/setools/policyrep/rule.pxi @@ -1,21 +1,7 @@ # Copyright 2014, 2016, Tresys Technology, LLC # Copyright 2017-2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # cdef class PolicyRule(PolicyObject): diff --git a/setools/policyrep/selinux.pxd b/setools/policyrep/selinux.pxd index 16868316..c22e6ecf 100644 --- a/setools/policyrep/selinux.pxd +++ b/setools/policyrep/selinux.pxd @@ -1,20 +1,6 @@ # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # # Directly use libselinux rather than the Python bindings, since diff --git a/setools/policyrep/selinuxpolicy.pxi b/setools/policyrep/selinuxpolicy.pxi index afbf9a4a..9267a0c4 100644 --- a/setools/policyrep/selinuxpolicy.pxi +++ b/setools/policyrep/selinuxpolicy.pxi @@ -1,21 +1,7 @@ # Copyright 2014-2016, Tresys Technology, LLC # Copyright 2016-2019, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # # pylint: disable=too-many-public-methods diff --git a/setools/policyrep/sepol.pxd b/setools/policyrep/sepol.pxd index b07ddb78..769498f2 100644 --- a/setools/policyrep/sepol.pxd +++ b/setools/policyrep/sepol.pxd @@ -1,20 +1,6 @@ # Copyright 2017-2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t diff --git a/setools/policyrep/terule.pxi b/setools/policyrep/terule.pxi index 760c366f..044978d9 100644 --- a/setools/policyrep/terule.pxi +++ b/setools/policyrep/terule.pxi @@ -1,21 +1,7 @@ # Copyright 2014-2016, Tresys Technology, LLC # Copyright 2016-2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # diff --git a/setools/policyrep/typeattr.pxi b/setools/policyrep/typeattr.pxi index befeecfa..5fe937bd 100644 --- a/setools/policyrep/typeattr.pxi +++ b/setools/policyrep/typeattr.pxi @@ -1,21 +1,7 @@ # Copyright 2014, Tresys Technology, LLC # Copyright 2017-2019, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # # diff --git a/setools/policyrep/user.pxi b/setools/policyrep/user.pxi index e37af293..bbd5e32b 100644 --- a/setools/policyrep/user.pxi +++ b/setools/policyrep/user.pxi @@ -1,21 +1,7 @@ # Copyright 2014, Tresys Technology, LLC # Copyright 2017-2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # cdef object _user_cache = WeakKeyDefaultDict(dict) diff --git a/setools/policyrep/util.pxi b/setools/policyrep/util.pxi index abc7be8e..e33a5c73 100644 --- a/setools/policyrep/util.pxi +++ b/setools/policyrep/util.pxi @@ -1,20 +1,6 @@ # Copyright 2016-2017, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # # diff --git a/setools/policyrep/xencontext.pxi b/setools/policyrep/xencontext.pxi index ec377aec..7e87694e 100644 --- a/setools/policyrep/xencontext.pxi +++ b/setools/policyrep/xencontext.pxi @@ -1,21 +1,7 @@ # Copyright 2017-2018, Chris PeBenito # Derived from netcontext.py # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # IomemconRange = collections.namedtuple("IomemconRange", ["low", "high"]) diff --git a/setools/portconquery.py b/setools/portconquery.py index f0a40cc8..61a34a47 100644 --- a/setools/portconquery.py +++ b/setools/portconquery.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging from socket import IPPROTO_TCP, IPPROTO_UDP diff --git a/setools/query.py b/setools/query.py index 93176f94..bed46539 100644 --- a/setools/query.py +++ b/setools/query.py @@ -1,21 +1,7 @@ # Copyright 2014-2015, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from abc import ABC, abstractmethod from logging import Logger diff --git a/setools/rbacrulequery.py b/setools/rbacrulequery.py index ca09fa52..1958f763 100644 --- a/setools/rbacrulequery.py +++ b/setools/rbacrulequery.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging import re diff --git a/setools/rolequery.py b/setools/rolequery.py index 89d5d290..17b60761 100644 --- a/setools/rolequery.py +++ b/setools/rolequery.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging import re diff --git a/setools/sensitivityquery.py b/setools/sensitivityquery.py index 111e1598..822a9093 100644 --- a/setools/sensitivityquery.py +++ b/setools/sensitivityquery.py @@ -1,20 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging from typing import Iterable diff --git a/setools/terulequery.py b/setools/terulequery.py index 806f885f..2ba775ee 100644 --- a/setools/terulequery.py +++ b/setools/terulequery.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging from typing import cast, Iterable, Optional, Set, Tuple diff --git a/setools/typeattrquery.py b/setools/typeattrquery.py index 55632019..00752355 100644 --- a/setools/typeattrquery.py +++ b/setools/typeattrquery.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging import re diff --git a/setools/typequery.py b/setools/typequery.py index 671c3f7e..d1449c49 100644 --- a/setools/typequery.py +++ b/setools/typequery.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging import re diff --git a/setools/userquery.py b/setools/userquery.py index 7d146e6f..2f869f6d 100644 --- a/setools/userquery.py +++ b/setools/userquery.py @@ -1,20 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # import logging import re diff --git a/setools/util.py b/setools/util.py index d64f4284..f27de199 100644 --- a/setools/util.py +++ b/setools/util.py @@ -1,20 +1,6 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . +# SPDX-License-Identifier: LGPL-2.1-only # from contextlib import suppress diff --git a/setoolsgui/__init__.py b/setoolsgui/__init__.py index 1e8bd3b5..1090fa8f 100644 --- a/setoolsgui/__init__.py +++ b/setoolsgui/__init__.py @@ -1,20 +1,7 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from .apol import ApolMainWindow diff --git a/setoolsgui/apol/__init__.py b/setoolsgui/apol/__init__.py index 295fac19..d0836410 100644 --- a/setoolsgui/apol/__init__.py +++ b/setoolsgui/apol/__init__.py @@ -1,20 +1,7 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from .mainwindow import ApolMainWindow diff --git a/setoolsgui/apol/analysistab.py b/setoolsgui/apol/analysistab.py index 3874fa01..a85529b4 100644 --- a/setoolsgui/apol/analysistab.py +++ b/setoolsgui/apol/analysistab.py @@ -1,20 +1,7 @@ # Copyright 2016, Chris PeBenito # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from typing import Dict, NamedTuple from enum import Enum diff --git a/setoolsgui/apol/boolquery.py b/setoolsgui/apol/boolquery.py index 9d53e0c3..5b0cdd8b 100644 --- a/setoolsgui/apol/boolquery.py +++ b/setoolsgui/apol/boolquery.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/boundsquery.py b/setoolsgui/apol/boundsquery.py index 321d828c..8944d1b7 100644 --- a/setoolsgui/apol/boundsquery.py +++ b/setoolsgui/apol/boundsquery.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/categoryquery.py b/setoolsgui/apol/categoryquery.py index 4d582f38..884b4156 100644 --- a/setoolsgui/apol/categoryquery.py +++ b/setoolsgui/apol/categoryquery.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/chooseanalysis.py b/setoolsgui/apol/chooseanalysis.py index ee20a0c6..892abdaa 100644 --- a/setoolsgui/apol/chooseanalysis.py +++ b/setoolsgui/apol/chooseanalysis.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from collections import defaultdict diff --git a/setoolsgui/apol/commonquery.py b/setoolsgui/apol/commonquery.py index 57438fd0..e90ec543 100644 --- a/setoolsgui/apol/commonquery.py +++ b/setoolsgui/apol/commonquery.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/config.py b/setoolsgui/apol/config.py index 29d9d537..7c272372 100644 --- a/setoolsgui/apol/config.py +++ b/setoolsgui/apol/config.py @@ -1,20 +1,7 @@ # Copyright 2019, Chris PeBenito # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import os diff --git a/setoolsgui/apol/constraintquery.py b/setoolsgui/apol/constraintquery.py index 0bf5c25a..cfa841b2 100644 --- a/setoolsgui/apol/constraintquery.py +++ b/setoolsgui/apol/constraintquery.py @@ -1,20 +1,7 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/defaultquery.py b/setoolsgui/apol/defaultquery.py index 8760b044..1efa3c46 100644 --- a/setoolsgui/apol/defaultquery.py +++ b/setoolsgui/apol/defaultquery.py @@ -1,21 +1,8 @@ # Copyright 2016, Tresys Technology, LLC # Copyright 2016, Chris PeBenito # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/dta.py b/setoolsgui/apol/dta.py index 62dbf04d..a78d9609 100644 --- a/setoolsgui/apol/dta.py +++ b/setoolsgui/apol/dta.py @@ -1,20 +1,7 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/exception.py b/setoolsgui/apol/exception.py index 9c299336..eefcf00d 100644 --- a/setoolsgui/apol/exception.py +++ b/setoolsgui/apol/exception.py @@ -1,20 +1,7 @@ # Copyright 2016, Chris PeBenito # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # diff --git a/setoolsgui/apol/excludetypes.py b/setoolsgui/apol/excludetypes.py index d51de6e8..bee73c58 100644 --- a/setoolsgui/apol/excludetypes.py +++ b/setoolsgui/apol/excludetypes.py @@ -1,20 +1,7 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/fsusequery.py b/setoolsgui/apol/fsusequery.py index 0f95f143..9bb192b3 100644 --- a/setoolsgui/apol/fsusequery.py +++ b/setoolsgui/apol/fsusequery.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/genfsconquery.py b/setoolsgui/apol/genfsconquery.py index 30ab1cdb..22112a8f 100644 --- a/setoolsgui/apol/genfsconquery.py +++ b/setoolsgui/apol/genfsconquery.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/ibendportconquery.py b/setoolsgui/apol/ibendportconquery.py index 9928d4a1..6db99c2b 100644 --- a/setoolsgui/apol/ibendportconquery.py +++ b/setoolsgui/apol/ibendportconquery.py @@ -1,20 +1,7 @@ # Copyright 2019, Chris PeBenito # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/ibpkeyconquery.py b/setoolsgui/apol/ibpkeyconquery.py index f6942ecf..3efd3421 100644 --- a/setoolsgui/apol/ibpkeyconquery.py +++ b/setoolsgui/apol/ibpkeyconquery.py @@ -1,20 +1,7 @@ # Copyright 2019, Chris PeBenito # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/infoflow.py b/setoolsgui/apol/infoflow.py index 28009aa2..fb9b4099 100644 --- a/setoolsgui/apol/infoflow.py +++ b/setoolsgui/apol/infoflow.py @@ -1,20 +1,7 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/initsidquery.py b/setoolsgui/apol/initsidquery.py index ab8be756..b31c9986 100644 --- a/setoolsgui/apol/initsidquery.py +++ b/setoolsgui/apol/initsidquery.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/mainwindow.py b/setoolsgui/apol/mainwindow.py index a107a143..3cdb11d3 100644 --- a/setoolsgui/apol/mainwindow.py +++ b/setoolsgui/apol/mainwindow.py @@ -1,21 +1,8 @@ # Copyright 2015-2016, Tresys Technology, LLC # Copyright 2016, 2019, Chris PeBenito # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import os import shutil diff --git a/setoolsgui/apol/mlsrulequery.py b/setoolsgui/apol/mlsrulequery.py index d88d3e70..ba2be459 100644 --- a/setoolsgui/apol/mlsrulequery.py +++ b/setoolsgui/apol/mlsrulequery.py @@ -1,20 +1,7 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/netifconquery.py b/setoolsgui/apol/netifconquery.py index c861f46d..ca2405f7 100644 --- a/setoolsgui/apol/netifconquery.py +++ b/setoolsgui/apol/netifconquery.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/nodeconquery.py b/setoolsgui/apol/nodeconquery.py index 05435f9d..320b0d61 100644 --- a/setoolsgui/apol/nodeconquery.py +++ b/setoolsgui/apol/nodeconquery.py @@ -1,21 +1,8 @@ # Copyright 2016, Tresys Technology, LLC # Copyright 2016, Chris PeBenito # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import sys import logging diff --git a/setoolsgui/apol/objclassquery.py b/setoolsgui/apol/objclassquery.py index 021b4fa8..9744a187 100644 --- a/setoolsgui/apol/objclassquery.py +++ b/setoolsgui/apol/objclassquery.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/permmapedit.py b/setoolsgui/apol/permmapedit.py index 2215feae..97482b30 100644 --- a/setoolsgui/apol/permmapedit.py +++ b/setoolsgui/apol/permmapedit.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging import copy diff --git a/setoolsgui/apol/portconquery.py b/setoolsgui/apol/portconquery.py index 0097b08a..50d054f8 100644 --- a/setoolsgui/apol/portconquery.py +++ b/setoolsgui/apol/portconquery.py @@ -1,21 +1,8 @@ # Copyright 2016, Tresys Technology, LLC # Copyright 2016, Chris PeBenito # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/queryupdater.py b/setoolsgui/apol/queryupdater.py index 6416aaef..9b6c155c 100644 --- a/setoolsgui/apol/queryupdater.py +++ b/setoolsgui/apol/queryupdater.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import pyqtSignal, QObject, QThread diff --git a/setoolsgui/apol/rbacrulequery.py b/setoolsgui/apol/rbacrulequery.py index bcb70952..0ce4bb9a 100644 --- a/setoolsgui/apol/rbacrulequery.py +++ b/setoolsgui/apol/rbacrulequery.py @@ -1,20 +1,7 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/rolequery.py b/setoolsgui/apol/rolequery.py index 974abeb9..29983a59 100644 --- a/setoolsgui/apol/rolequery.py +++ b/setoolsgui/apol/rolequery.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/sensitivityquery.py b/setoolsgui/apol/sensitivityquery.py index 01614311..d5bcbec5 100644 --- a/setoolsgui/apol/sensitivityquery.py +++ b/setoolsgui/apol/sensitivityquery.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/summary.py b/setoolsgui/apol/summary.py index f60c069c..1aeb2b30 100644 --- a/setoolsgui/apol/summary.py +++ b/setoolsgui/apol/summary.py @@ -1,21 +1,8 @@ # Copyright 2016, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/terulequery.py b/setoolsgui/apol/terulequery.py index 613e866e..30647105 100644 --- a/setoolsgui/apol/terulequery.py +++ b/setoolsgui/apol/terulequery.py @@ -1,20 +1,7 @@ # Copyright 2015-2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/typeattrquery.py b/setoolsgui/apol/typeattrquery.py index 3eefdc44..14a4141d 100644 --- a/setoolsgui/apol/typeattrquery.py +++ b/setoolsgui/apol/typeattrquery.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/typequery.py b/setoolsgui/apol/typequery.py index b1446f8e..2e261ccd 100644 --- a/setoolsgui/apol/typequery.py +++ b/setoolsgui/apol/typequery.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/userquery.py b/setoolsgui/apol/userquery.py index f479d5ea..c325888d 100644 --- a/setoolsgui/apol/userquery.py +++ b/setoolsgui/apol/userquery.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/apol/workspace.py b/setoolsgui/apol/workspace.py index 1d34e4b0..0f8ec82c 100644 --- a/setoolsgui/apol/workspace.py +++ b/setoolsgui/apol/workspace.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import re import logging diff --git a/setoolsgui/boolmodel.py b/setoolsgui/boolmodel.py index e605b7e4..0d698c92 100644 --- a/setoolsgui/boolmodel.py +++ b/setoolsgui/boolmodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt from PyQt5.QtGui import QPalette, QTextCursor diff --git a/setoolsgui/boundsmodel.py b/setoolsgui/boundsmodel.py index 8a02013f..c84f612a 100644 --- a/setoolsgui/boundsmodel.py +++ b/setoolsgui/boundsmodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt diff --git a/setoolsgui/commonmodel.py b/setoolsgui/commonmodel.py index 7c6bff8d..a6f6fed5 100644 --- a/setoolsgui/commonmodel.py +++ b/setoolsgui/commonmodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt from PyQt5.QtGui import QPalette, QTextCursor diff --git a/setoolsgui/constraintmodel.py b/setoolsgui/constraintmodel.py index 75bd578d..122dff0b 100644 --- a/setoolsgui/constraintmodel.py +++ b/setoolsgui/constraintmodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt from setools.exception import ConstraintUseError diff --git a/setoolsgui/defaultmodel.py b/setoolsgui/defaultmodel.py index 379395f0..b9a6a58e 100644 --- a/setoolsgui/defaultmodel.py +++ b/setoolsgui/defaultmodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from contextlib import suppress diff --git a/setoolsgui/details.py b/setoolsgui/details.py index 40f3e2d0..4eb70066 100644 --- a/setoolsgui/details.py +++ b/setoolsgui/details.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging diff --git a/setoolsgui/fsusemodel.py b/setoolsgui/fsusemodel.py index 1c5001b1..2b3a3f40 100644 --- a/setoolsgui/fsusemodel.py +++ b/setoolsgui/fsusemodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt diff --git a/setoolsgui/genfsconmodel.py b/setoolsgui/genfsconmodel.py index e533fb5c..6fc46408 100644 --- a/setoolsgui/genfsconmodel.py +++ b/setoolsgui/genfsconmodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import stat diff --git a/setoolsgui/getdetailslist.py b/setoolsgui/getdetailslist.py index 18c41856..df7149dd 100644 --- a/setoolsgui/getdetailslist.py +++ b/setoolsgui/getdetailslist.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtGui import QCursor from PyQt5.QtWidgets import QAction, QListView, QMenu diff --git a/setoolsgui/ibendportconmodel.py b/setoolsgui/ibendportconmodel.py index 0f63181d..199932d3 100644 --- a/setoolsgui/ibendportconmodel.py +++ b/setoolsgui/ibendportconmodel.py @@ -1,20 +1,7 @@ # Copyright 2019, Chris PeBenito # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt diff --git a/setoolsgui/ibpkeyconmodel.py b/setoolsgui/ibpkeyconmodel.py index 248bcff2..f3cd9520 100644 --- a/setoolsgui/ibpkeyconmodel.py +++ b/setoolsgui/ibpkeyconmodel.py @@ -1,20 +1,7 @@ # Copyright 2019, Chris PeBenito # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt diff --git a/setoolsgui/initsidmodel.py b/setoolsgui/initsidmodel.py index 1885e811..1155a50f 100644 --- a/setoolsgui/initsidmodel.py +++ b/setoolsgui/initsidmodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt diff --git a/setoolsgui/listview.py b/setoolsgui/listview.py index 9572fa40..a4beda50 100644 --- a/setoolsgui/listview.py +++ b/setoolsgui/listview.py @@ -1,20 +1,7 @@ # Copyright 2016, Chris PeBenito # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging from collections import defaultdict diff --git a/setoolsgui/logtosignal.py b/setoolsgui/logtosignal.py index 34630ea5..7678f099 100644 --- a/setoolsgui/logtosignal.py +++ b/setoolsgui/logtosignal.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from logging import Formatter, Handler, INFO diff --git a/setoolsgui/mlsmodel.py b/setoolsgui/mlsmodel.py index 7852a972..8dfb2806 100644 --- a/setoolsgui/mlsmodel.py +++ b/setoolsgui/mlsmodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt from PyQt5.QtGui import QPalette, QTextCursor diff --git a/setoolsgui/mlsrulemodel.py b/setoolsgui/mlsrulemodel.py index 439923f3..4fa4f186 100644 --- a/setoolsgui/mlsrulemodel.py +++ b/setoolsgui/mlsrulemodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt diff --git a/setoolsgui/models.py b/setoolsgui/models.py index 29dbb15c..fc7bf3df 100644 --- a/setoolsgui/models.py +++ b/setoolsgui/models.py @@ -1,20 +1,7 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import logging from contextlib import suppress diff --git a/setoolsgui/netifconmodel.py b/setoolsgui/netifconmodel.py index e3ed20bd..3d2e4b8b 100644 --- a/setoolsgui/netifconmodel.py +++ b/setoolsgui/netifconmodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt diff --git a/setoolsgui/nodeconmodel.py b/setoolsgui/nodeconmodel.py index 01ec5dbf..ec4d66e9 100644 --- a/setoolsgui/nodeconmodel.py +++ b/setoolsgui/nodeconmodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt diff --git a/setoolsgui/objclassmodel.py b/setoolsgui/objclassmodel.py index cb29589c..9823b73b 100644 --- a/setoolsgui/objclassmodel.py +++ b/setoolsgui/objclassmodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from itertools import chain diff --git a/setoolsgui/portconmodel.py b/setoolsgui/portconmodel.py index 288b4a00..39d2c72e 100644 --- a/setoolsgui/portconmodel.py +++ b/setoolsgui/portconmodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt diff --git a/setoolsgui/rbacrulemodel.py b/setoolsgui/rbacrulemodel.py index b0f0c85f..d8df9409 100644 --- a/setoolsgui/rbacrulemodel.py +++ b/setoolsgui/rbacrulemodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt from setools.exception import RuleUseError diff --git a/setoolsgui/rolemodel.py b/setoolsgui/rolemodel.py index c843fef6..004f4e76 100644 --- a/setoolsgui/rolemodel.py +++ b/setoolsgui/rolemodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt from PyQt5.QtGui import QPalette, QTextCursor diff --git a/setoolsgui/tableview.py b/setoolsgui/tableview.py index d45b1b45..0b84d7f7 100644 --- a/setoolsgui/tableview.py +++ b/setoolsgui/tableview.py @@ -1,20 +1,7 @@ # Copyright 2016, Chris PeBenito # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import csv diff --git a/setoolsgui/terulemodel.py b/setoolsgui/terulemodel.py index cc6fe360..4d51ac8e 100644 --- a/setoolsgui/terulemodel.py +++ b/setoolsgui/terulemodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt from setools.exception import RuleNotConditional, RuleUseError diff --git a/setoolsgui/treeview.py b/setoolsgui/treeview.py index 023aabca..8a821ff5 100644 --- a/setoolsgui/treeview.py +++ b/setoolsgui/treeview.py @@ -1,20 +1,7 @@ # Copyright 2016, Chris PeBenito # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt, QModelIndex from PyQt5.QtGui import QKeySequence, QCursor diff --git a/setoolsgui/typeattrmodel.py b/setoolsgui/typeattrmodel.py index 39ed04ff..1a752fcd 100644 --- a/setoolsgui/typeattrmodel.py +++ b/setoolsgui/typeattrmodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt from PyQt5.QtGui import QPalette, QTextCursor diff --git a/setoolsgui/typemodel.py b/setoolsgui/typemodel.py index 2ba601cc..841cc42a 100644 --- a/setoolsgui/typemodel.py +++ b/setoolsgui/typemodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt from PyQt5.QtGui import QPalette, QTextCursor diff --git a/setoolsgui/usermodel.py b/setoolsgui/usermodel.py index 52be76b7..d0a4b0ed 100644 --- a/setoolsgui/usermodel.py +++ b/setoolsgui/usermodel.py @@ -1,20 +1,7 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # from PyQt5.QtCore import Qt, QModelIndex from setools.exception import MLSDisabled diff --git a/setoolsgui/widget.py b/setoolsgui/widget.py index b24c3336..e236623c 100644 --- a/setoolsgui/widget.py +++ b/setoolsgui/widget.py @@ -1,20 +1,7 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. +# SPDX-License-Identifier: LGPL-2.1-only # -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of -# the License, or (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with SETools. If not, see -# . # import sys from errno import ENOENT diff --git a/tests/__init__.py b/tests/__init__.py index 7762dfe7..a436e516 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,19 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # from . import boolquery from . import boundsquery diff --git a/tests/boolquery.py b/tests/boolquery.py index 403705c3..5d083b90 100644 --- a/tests/boolquery.py +++ b/tests/boolquery.py @@ -1,19 +1,6 @@ # Copyright 2014, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/boundsquery.py b/tests/boundsquery.py index 849864c1..f1be083a 100644 --- a/tests/boundsquery.py +++ b/tests/boundsquery.py @@ -1,19 +1,6 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/categoryquery.py b/tests/categoryquery.py index a5e4e80c..ba9a7004 100644 --- a/tests/categoryquery.py +++ b/tests/categoryquery.py @@ -1,19 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/commonquery.py b/tests/commonquery.py index 09593dd8..ae031850 100644 --- a/tests/commonquery.py +++ b/tests/commonquery.py @@ -1,19 +1,6 @@ # Copyright 2014, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/conditionalinfoflow.py b/tests/conditionalinfoflow.py index 636bdda5..71bdf8f2 100644 --- a/tests/conditionalinfoflow.py +++ b/tests/conditionalinfoflow.py @@ -1,19 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/constraintquery.py b/tests/constraintquery.py index 964df680..97055317 100644 --- a/tests/constraintquery.py +++ b/tests/constraintquery.py @@ -1,19 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/defaultquery.py b/tests/defaultquery.py index 508816cb..9e673ebb 100644 --- a/tests/defaultquery.py +++ b/tests/defaultquery.py @@ -1,19 +1,6 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/devicetreeconquery.py b/tests/devicetreeconquery.py index 1a2444a1..470356cf 100644 --- a/tests/devicetreeconquery.py +++ b/tests/devicetreeconquery.py @@ -1,19 +1,6 @@ # Derived from tests/portconquery.py # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/diff.py b/tests/diff.py index ce06dc19..d09838cc 100644 --- a/tests/diff.py +++ b/tests/diff.py @@ -1,20 +1,7 @@ # Copyright 2015-2016, Tresys Technology, LLC # Copyright 2016, 2017, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/dta.py b/tests/dta.py index a0cc9381..7f9bbc99 100644 --- a/tests/dta.py +++ b/tests/dta.py @@ -1,19 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/fsusequery.py b/tests/fsusequery.py index 047a8163..4b5be832 100644 --- a/tests/fsusequery.py +++ b/tests/fsusequery.py @@ -1,19 +1,6 @@ # Copyright 2014, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/genfsconquery.py b/tests/genfsconquery.py index c71da489..472fcde0 100644 --- a/tests/genfsconquery.py +++ b/tests/genfsconquery.py @@ -1,19 +1,6 @@ # Copyright 2014, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/ibendportconquery.py b/tests/ibendportconquery.py index 47f024d8..14fd2480 100644 --- a/tests/ibendportconquery.py +++ b/tests/ibendportconquery.py @@ -1,19 +1,6 @@ # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/ibpkeyconquery.py b/tests/ibpkeyconquery.py index 6dc79247..53a531ba 100644 --- a/tests/ibpkeyconquery.py +++ b/tests/ibpkeyconquery.py @@ -1,19 +1,6 @@ # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/infoflow.py b/tests/infoflow.py index aa0e44a7..5a8f745b 100644 --- a/tests/infoflow.py +++ b/tests/infoflow.py @@ -1,19 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/initsidquery.py b/tests/initsidquery.py index d93beae2..cf79555d 100644 --- a/tests/initsidquery.py +++ b/tests/initsidquery.py @@ -1,19 +1,6 @@ # Copyright 2014, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/iomemconquery.py b/tests/iomemconquery.py index c2536ec9..b9a0d461 100644 --- a/tests/iomemconquery.py +++ b/tests/iomemconquery.py @@ -1,19 +1,6 @@ # Derived from tests/portconquery.py # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/ioportconquery.py b/tests/ioportconquery.py index 420fc9fb..0f54d66a 100644 --- a/tests/ioportconquery.py +++ b/tests/ioportconquery.py @@ -1,19 +1,6 @@ # Derived from tests/portconquery.py # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/mixins.py b/tests/mixins.py index c5e99947..4b2a690d 100644 --- a/tests/mixins.py +++ b/tests/mixins.py @@ -1,20 +1,7 @@ """Unit test mixin classes.""" # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # # pylint: disable=too-few-public-methods import unittest diff --git a/tests/mlsrulequery.py b/tests/mlsrulequery.py index 7315b2f5..4d9fb2ae 100644 --- a/tests/mlsrulequery.py +++ b/tests/mlsrulequery.py @@ -1,19 +1,6 @@ # Copyright 2014, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/netifconquery.py b/tests/netifconquery.py index 2d791748..4cdb9390 100644 --- a/tests/netifconquery.py +++ b/tests/netifconquery.py @@ -1,19 +1,6 @@ # Copyright 2014, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/nodeconquery.py b/tests/nodeconquery.py index 98a4b5b8..7c0f40d6 100644 --- a/tests/nodeconquery.py +++ b/tests/nodeconquery.py @@ -1,20 +1,7 @@ # Copyright 2014, Tresys Technology, LLC # Copyright 2017, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/objclassquery.py b/tests/objclassquery.py index f5964e33..a0f7284b 100644 --- a/tests/objclassquery.py +++ b/tests/objclassquery.py @@ -1,19 +1,6 @@ # Copyright 2014, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/pcideviceconquery.py b/tests/pcideviceconquery.py index 9846ee9a..a8d4d7e0 100644 --- a/tests/pcideviceconquery.py +++ b/tests/pcideviceconquery.py @@ -1,19 +1,6 @@ # Derived from tests/portconquery.py # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/permmap.py b/tests/permmap.py index 317f23c3..bded41e4 100644 --- a/tests/permmap.py +++ b/tests/permmap.py @@ -1,19 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import unittest import os diff --git a/tests/pirqconquery.py b/tests/pirqconquery.py index 94616110..21dce3db 100644 --- a/tests/pirqconquery.py +++ b/tests/pirqconquery.py @@ -1,19 +1,6 @@ # Derived from tests/portconquery.py # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/polcapquery.py b/tests/polcapquery.py index 40403a8d..577a8a68 100644 --- a/tests/polcapquery.py +++ b/tests/polcapquery.py @@ -1,19 +1,6 @@ # Copyright 2014, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/policyrep/__init__.py b/tests/policyrep/__init__.py index 55723604..c8fab040 100644 --- a/tests/policyrep/__init__.py +++ b/tests/policyrep/__init__.py @@ -1,19 +1,6 @@ # Copyright 2015-2016, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # from . import default from . import initsid diff --git a/tests/policyrep/default.py b/tests/policyrep/default.py index b1c810b2..cc67e870 100644 --- a/tests/policyrep/default.py +++ b/tests/policyrep/default.py @@ -1,19 +1,6 @@ # Copyright 2016, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # # Until this is fixed for cython: # pylint: disable=undefined-variable diff --git a/tests/policyrep/initsid.py b/tests/policyrep/initsid.py index 4af0dae5..14067528 100644 --- a/tests/policyrep/initsid.py +++ b/tests/policyrep/initsid.py @@ -1,19 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # # Until this is fixed for cython: # pylint: disable=undefined-variable,no-member diff --git a/tests/policyrep/mls.py b/tests/policyrep/mls.py index c833a39d..d22377bf 100644 --- a/tests/policyrep/mls.py +++ b/tests/policyrep/mls.py @@ -1,19 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # # Until this is fixed for cython: # pylint: disable=undefined-variable,no-member diff --git a/tests/policyrep/mlsrule.py b/tests/policyrep/mlsrule.py index e00fe644..7c8b1d3a 100644 --- a/tests/policyrep/mlsrule.py +++ b/tests/policyrep/mlsrule.py @@ -1,19 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # # Until this is fixed for cython: # pylint: disable=undefined-variable diff --git a/tests/policyrep/objclass.py b/tests/policyrep/objclass.py index 7be20cf1..b8a7b54d 100644 --- a/tests/policyrep/objclass.py +++ b/tests/policyrep/objclass.py @@ -1,19 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # # Until this is fixed for cython: # pylint: disable=undefined-variable,no-member diff --git a/tests/policyrep/polcap.py b/tests/policyrep/polcap.py index 5c80af5c..c5ccc604 100644 --- a/tests/policyrep/polcap.py +++ b/tests/policyrep/polcap.py @@ -1,19 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # # Until this is fixed for cython: # pylint: disable=undefined-variable diff --git a/tests/policyrep/rbacrule.py b/tests/policyrep/rbacrule.py index ef370967..cf2b01cc 100644 --- a/tests/policyrep/rbacrule.py +++ b/tests/policyrep/rbacrule.py @@ -1,19 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # # Until this is fixed for cython: # pylint: disable=undefined-variable diff --git a/tests/policyrep/role.py b/tests/policyrep/role.py index 4197172a..75863a44 100644 --- a/tests/policyrep/role.py +++ b/tests/policyrep/role.py @@ -1,19 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # # Until this is fixed for cython: # pylint: disable=undefined-variable,no-member diff --git a/tests/policyrep/selinuxpolicy.py b/tests/policyrep/selinuxpolicy.py index cdfd8ae9..ddca49b9 100644 --- a/tests/policyrep/selinuxpolicy.py +++ b/tests/policyrep/selinuxpolicy.py @@ -1,19 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import copy diff --git a/tests/policyrep/symbol.py b/tests/policyrep/symbol.py index 361ac41e..86c765b0 100644 --- a/tests/policyrep/symbol.py +++ b/tests/policyrep/symbol.py @@ -1,19 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # # Until this is fixed for cython: # pylint: disable=undefined-variable diff --git a/tests/policyrep/terule.py b/tests/policyrep/terule.py index f988c954..335317da 100644 --- a/tests/policyrep/terule.py +++ b/tests/policyrep/terule.py @@ -1,19 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # # Until this is fixed for cython: # pylint: disable=undefined-variable diff --git a/tests/policyrep/typeattr.py b/tests/policyrep/typeattr.py index f952aca3..b16bc979 100644 --- a/tests/policyrep/typeattr.py +++ b/tests/policyrep/typeattr.py @@ -1,19 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # # Until this is fixed for cython: # pylint: disable=undefined-variable,no-member diff --git a/tests/policyrep/user.py b/tests/policyrep/user.py index f0660fe2..1ed7983b 100644 --- a/tests/policyrep/user.py +++ b/tests/policyrep/user.py @@ -1,19 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # # Until this is fixed for cython: # pylint: disable=undefined-variable,no-member diff --git a/tests/policyrep/util.py b/tests/policyrep/util.py index ba8c1110..3124cda6 100644 --- a/tests/policyrep/util.py +++ b/tests/policyrep/util.py @@ -1,20 +1,7 @@ # Copyright 2015, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import subprocess diff --git a/tests/portconquery.py b/tests/portconquery.py index 16f78e87..f87f5218 100644 --- a/tests/portconquery.py +++ b/tests/portconquery.py @@ -1,19 +1,6 @@ # Copyright 2014, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/rbacrulequery.py b/tests/rbacrulequery.py index ed04d434..a0d0fcd4 100644 --- a/tests/rbacrulequery.py +++ b/tests/rbacrulequery.py @@ -1,20 +1,7 @@ """RBAC rule query unit tests.""" # Copyright 2014, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # # pylint: disable=invalid-name,too-many-public-methods import os diff --git a/tests/rolequery.py b/tests/rolequery.py index bd855b82..ba315112 100644 --- a/tests/rolequery.py +++ b/tests/rolequery.py @@ -1,19 +1,6 @@ # Copyright 2014, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/sensitivityquery.py b/tests/sensitivityquery.py index 8a8b8fc4..4796539d 100644 --- a/tests/sensitivityquery.py +++ b/tests/sensitivityquery.py @@ -1,19 +1,6 @@ # Copyright 2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/terulequery.py b/tests/terulequery.py index d5972ee7..61b619b3 100644 --- a/tests/terulequery.py +++ b/tests/terulequery.py @@ -1,20 +1,7 @@ """Type enforcement rule query unit tests.""" # Copyright 2014, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # # pylint: disable=invalid-name,too-many-public-methods import os diff --git a/tests/typeattrquery.py b/tests/typeattrquery.py index 9c66c3f0..68f51f16 100644 --- a/tests/typeattrquery.py +++ b/tests/typeattrquery.py @@ -1,19 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/typequery.py b/tests/typequery.py index aa37dfa8..d78dd61f 100644 --- a/tests/typequery.py +++ b/tests/typequery.py @@ -1,20 +1,7 @@ # Copyright 2014-2015, Tresys Technology, LLC # Copyright 2019, Chris PeBenito # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest diff --git a/tests/userquery.py b/tests/userquery.py index c5f7b18b..ed51e94c 100644 --- a/tests/userquery.py +++ b/tests/userquery.py @@ -1,19 +1,6 @@ # Copyright 2014-2015, Tresys Technology, LLC # -# This file is part of SETools. -# -# SETools is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# SETools is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SETools. If not, see . +# SPDX-License-Identifier: GPL-2.0-only # import os import unittest From 3d751e062d5c7ad49a335e04dbb28cc158dea06b Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Sat, 20 Nov 2021 14:32:33 -0500 Subject: [PATCH 12/28] Refine COPYING text. No license changes. Signed-off-by: Chris PeBenito --- COPYING | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/COPYING b/COPYING index 512fba2f..78710504 100644 --- a/COPYING +++ b/COPYING @@ -1,7 +1,21 @@ -The intent is to allow free use of this source code. All programs' -source files are copyright protected and freely distributed under the -GNU General Public License (see COPYING.GPL). All library source -files are copyright under the GNU Lesser General Public License (see -COPYING.LGPL). All files distributed with this package indicate the -appropriate license to use with that file. Absolutely no warranty is -provided or implied. +SETools libraries are provided under: + + SPDX-License-Identifier: LGPL-2.1-only + +Being under the terms of the GNU Lesser General Public License version 2.1 +only, according with: + + COPYING.LGPL + + +SETools applications and unit tests are provided under: + + SPDX-License-Identifier: GPL-2.0-only + +Being under the terms of the GNU General Public License version 2 only, +according with: + + COPYING.GPL + + +All contributions to the SETools are subject to this COPYING file. From c94720a3be7e0e30b5ebf4161cfe79c9e3b927e9 Mon Sep 17 00:00:00 2001 From: Daniel Burgener Date: Fri, 18 Mar 2022 15:11:46 -0400 Subject: [PATCH 13/28] Update text of man page for -ep flag The old text does not match the behavior observed in practice or the description in the --help flag Signed-off-by: Daniel Burgener --- man/sesearch.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/sesearch.1 b/man/sesearch.1 index 65eebf97..2bfb47f0 100644 --- a/man/sesearch.1 +++ b/man/sesearch.1 @@ -83,7 +83,7 @@ A matching rule must have the specified target attribute/type/role explicitly, i .IP "-eb" A matching rule must have all specified Booleans, instead of matching any of the specified Boolean. .IP "-ep" -A matching rule must have all specified permissions, instead of matching any of the specified permission. +A matching rule must have exactly the specified permissions, instead of matching any of the specified permission. .IP "-rs" Use regular expression for matching the source type/role. .IP "-rt" From 79095c58c4472e9879f203145fb27d5249dced82 Mon Sep 17 00:00:00 2001 From: Daniel Burgener Date: Fri, 18 Mar 2022 15:43:46 -0400 Subject: [PATCH 14/28] Add -Sp argument to sesearch to serve as front end for perms_subset The perms_subset rule search flag matches rules where the searched perms are a subset of the rule perms. This flag is currently only exposed via apol, and this commit exposes it via sesearch Signed-off-by: Daniel Burgener --- man/sesearch.1 | 2 ++ sesearch | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/man/sesearch.1 b/man/sesearch.1 index 2bfb47f0..174644d8 100644 --- a/man/sesearch.1 +++ b/man/sesearch.1 @@ -84,6 +84,8 @@ A matching rule must have the specified target attribute/type/role explicitly, i A matching rule must have all specified Booleans, instead of matching any of the specified Boolean. .IP "-ep" A matching rule must have exactly the specified permissions, instead of matching any of the specified permission. +.IP "-Sp" +A matching rule must have permissions where are a superset of the specified permissions, instead of matching any of the permissions. .IP "-rs" Use regular expression for matching the source type/role. .IP "-rt" diff --git a/sesearch b/sesearch index 456a1cde..f2df6296 100755 --- a/sesearch +++ b/sesearch @@ -93,6 +93,9 @@ opts.add_argument("-ep", action="store_true", dest="perms_equal", opts.add_argument("-ex", action="store_true", dest="xperms_equal", help="Match extended permission set exactly instead of matching any listed " "permission.") +opts.add_argument("-Sp", action="store_true", dest="perms_subset", + help="Match rules where the listed permissions are a subset of the rule " + "permissions.") opts.add_argument("-ds", action="store_false", dest="source_indirect", help="Match source attributes directly instead of matching member types/roles.") opts.add_argument("-dt", action="store_false", dest="target_indirect", @@ -141,6 +144,7 @@ try: target_regex=args.target_regex, tclass_regex=args.tclass_regex, perms_equal=args.perms_equal, + perms_subset=args.perms_subset, xperms_equal=args.xperms_equal, default=args.default, default_regex=args.default_regex, From 3ef0bd7f65405fc45e134ecf8413709ef1be54f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 29 Mar 2022 21:28:10 +0200 Subject: [PATCH 15/28] perm_map: add kernel security class io_uring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Göttsche --- setools/perm_map | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setools/perm_map b/setools/perm_map index 5fd8852c..dbb84478 100644 --- a/setools/perm_map +++ b/setools/perm_map @@ -15,7 +15,7 @@ # This is followed by each permission and its individual mapping to one # of the following: # -# r = Read +# r = Read # w = Write # n = None # b = Both @@ -27,7 +27,7 @@ # Look to the examples below for further clarification. # # Number of object classes. -132 +133 class netlink_audit_socket 26 nlmsg_relay w 10 @@ -2291,3 +2291,7 @@ class anon_inode 25 watch_sb r 3 watch_with_perm r 3 watch_reads r 3 + +class io_uring 2 + override_creds w 10 + sqpoll w 10 From afd358f149b90843ee67f7a67e5297e9786e87d0 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Tue, 30 Aug 2022 13:58:54 -0400 Subject: [PATCH 16/28] AVRuleXperm: Fix permission set creation for AVTAB_XPERMS_IOCTLDRIVER. Closes #74 Signed-off-by: Chris PeBenito --- setools/policyrep/terule.pxi | 8 +- tests/policyrep/terule.py | 26 +++++ tests/policyrep/terule_issue74.conf | 159 ++++++++++++++++++++++++++++ 3 files changed, 189 insertions(+), 4 deletions(-) create mode 100644 tests/policyrep/terule_issue74.conf diff --git a/setools/policyrep/terule.pxi b/setools/policyrep/terule.pxi index 044978d9..6c869ed0 100644 --- a/setools/policyrep/terule.pxi +++ b/setools/policyrep/terule.pxi @@ -274,22 +274,22 @@ cdef class AVRuleXperm(BaseTERule): set perms = set() size_t curr = 0 size_t len = sizeof(xperms.perms) * sepol.EXTENDED_PERMS_LEN + size_t base_value = 0 # # Build permission set # - while curr < len: + for curr in range(len): if sepol.xperm_test(curr, xperms.perms): if xperms.specified & sepol.AVTAB_XPERMS_IOCTLFUNCTION: perms.add(xperms.driver << 8 | curr) elif xperms.specified & sepol.AVTAB_XPERMS_IOCTLDRIVER: - perms.add(curr << 8) + base_value = curr << 8 + perms.update(range(base_value, base_value + 0x100)) else: raise LowLevelPolicyError("Unknown extended permission: {}".format( xperms.specified)) - curr += 1 - # # Determine xperm type # diff --git a/tests/policyrep/terule.py b/tests/policyrep/terule.py index 335317da..1bd8e620 100644 --- a/tests/policyrep/terule.py +++ b/tests/policyrep/terule.py @@ -11,6 +11,8 @@ from setools.exception import InvalidTERuleType, RuleNotConditional, RuleUseError, \ TERuleNoFilename +from .util import compile_policy + @unittest.skip("Needs to be reworked for cython") @patch('setools.policyrep.boolcond.condexpr_factory', lambda x, y: y) @@ -249,6 +251,30 @@ def test_104_statement_two_range_perms(self): self.assertEqual(rule.statement(), "allowxperm a b:c d { 0x0003-0x0005 0x0007-0x0009 };") +class AVRuleXpermTestIssue74(unittest.TestCase): + + """ + Regression test for xperm ranges starting with 0x00 not being loaded. + https://github.com/SELinuxProject/setools/issues/74 + """ + + @classmethod + def setUpClass(cls): + cls.p = compile_policy("tests/policyrep/terule_issue74.conf") + + def test_issue74_regression(self): + """Regression test for GitHub issue 74.""" + rules = sorted(self.p.terules()) + print(rules) + self.assertEqual(2, len(rules)) + + # expect 2 rules: + # allowxperm init_type_t init_type_t : unix_dgram_socket ioctl { 0x8910 }; + # allowxperm init_type_t init_type_t : unix_dgram_socket ioctl { 0x0-0xff }; + self.assertSetEqual(set(range(0x100)), rules[0].perms) + self.assertSetEqual(set([0x8910]), rules[1].perms) + + @unittest.skip("Needs to be reworked for cython") @patch('setools.policyrep.boolcond.condexpr_factory', lambda x, y: y) @patch('setools.policyrep.typeattr.type_factory', lambda x, y: y) diff --git a/tests/policyrep/terule_issue74.conf b/tests/policyrep/terule_issue74.conf new file mode 100644 index 00000000..158a38ee --- /dev/null +++ b/tests/policyrep/terule_issue74.conf @@ -0,0 +1,159 @@ +class infoflow +class infoflow2 +class infoflow3 +class infoflow4 +class infoflow5 +class infoflow6 +class infoflow7 +class infoflow8 +class infoflow9 +class infoflow10 +class unix_dgram_socket + +sid kernel +sid security + +common infoflow +{ + low_w + med_w + hi_w + low_r + med_r + hi_r +} + +common com_a +{ + hi_w + hi_r + super_r + super_w +} + +common com_b +{ + send + recv +} + +common com_c +{ + getattr + setattr + read + write +} + +class infoflow +inherits infoflow + +class infoflow2 +inherits infoflow +{ + super_w + super_r +} + +class infoflow3 +{ + null +} + +class infoflow4 +inherits infoflow +{ + super_w + super_r + super_none + super_both + super_unmapped +} + +class infoflow5 +inherits com_a + +class infoflow6 +inherits com_b + +class infoflow7 +inherits infoflow +{ + unmapped +} + +class infoflow8 +{ + super_w + super_r +} + +class infoflow9 +inherits com_c + +class infoflow10 +{ + read + write +} + +class unix_dgram_socket +{ + ioctl +} + +sensitivity low_s; +sensitivity medium_s alias med; +sensitivity high_s; + +dominance { low_s med high_s } + +category here; +category there; +category elsewhere alias lost; + +#level decl +level low_s:here.there; +level med:here, elsewhere; +level high_s:here.lost; + +#some constraints +mlsconstrain infoflow hi_r ((l1 dom l2) or (t1 == mls_exempt)); + +attribute mls_exempt; + +type system; +role system; +role system types system; + +type init_type_t; +allowxperm init_type_t self:unix_dgram_socket ioctl 0x8910; +allowxperm init_type_t self:unix_dgram_socket ioctl { 0x0000 - 0x00ff }; + +#users +user system roles system level med range low_s - high_s:here.lost; + +#normal constraints +constrain infoflow hi_w (u1 == u2); + +#isids +sid kernel system:system:system:medium_s:here +sid security system:system:system:high_s:lost + +#fs_use +fs_use_trans devpts system:object_r:system:low_s; +fs_use_xattr ext3 system:object_r:system:low_s; +fs_use_task pipefs system:object_r:system:low_s; + +#genfscon +genfscon proc / system:object_r:system:med +genfscon proc /sys system:object_r:system:low_s +genfscon selinuxfs / system:object_r:system:high_s:here.there + +portcon tcp 80 system:object_r:system:low_s + +netifcon eth0 system:object_r:system:low_s system:object_r:system:low_s + +nodecon 127.0.0.1 255.255.255.255 system:object_r:system:low_s:here +nodecon ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff system:object_r:system:low_s:here + From d912523f2510cbeffabc02e5fea636e58e241172 Mon Sep 17 00:00:00 2001 From: Dylan Ross Date: Thu, 22 Sep 2022 10:36:27 -0400 Subject: [PATCH 17/28] Add pyproject.toml to fix Cython dependency issue Signed-off-by: Dylan Ross --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..e5ac58c2 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools", "Cython>=0.27"] +build-backend = "setuptools.build_meta" From 3b69864d58e855113c2dbe8c2b170025831b85d2 Mon Sep 17 00:00:00 2001 From: Steve Lawrence Date: Tue, 29 Nov 2022 13:19:05 -0500 Subject: [PATCH 18/28] Override copy() and cut() functions for custom tree/table widgets The Ctrl-C and Ctrl-X shortcuts are handled by the copy() and cut() functions in the ApolMainWindow, which just get the currently focused widget and call its function of the same name. However, the custom SEToolsTableView and SEToolsTreeView widgets do not use these functions to implement Ctrl-C/X, but instead override the event() function and check if each received event is a copy/cut key sequence. Functionally this is the same as copy() and cut(), but this leads to an abort in newer versions for Fedora and/or PyQT5 (the reason is not obvious). To avoid the abort, and arguably make things a little more clear, this overrides the copy() and cut() functions in these widgets, moves the specialize copy logic into them, and removes the event() function. Closes #77 Signed-off-by: Steve Lawrence --- setoolsgui/tableview.py | 54 ++++++++++++++++++++--------------------- setoolsgui/treeview.py | 12 +++------ 2 files changed, 30 insertions(+), 36 deletions(-) diff --git a/setoolsgui/tableview.py b/setoolsgui/tableview.py index 0b84d7f7..9726cb05 100644 --- a/setoolsgui/tableview.py +++ b/setoolsgui/tableview.py @@ -28,34 +28,32 @@ def __init__(self, parent): def contextMenuEvent(self, event): self.menu.popup(QCursor.pos()) - def event(self, e): - if e == QKeySequence.Copy or e == QKeySequence.Cut: - datamodel = self.model() - - selected_text = [] - current_row = None - current_col = None - prev_row = None - prev_col = None - for index in sorted(self.selectionModel().selectedIndexes()): - current_row = index.row() - current_col = index.column() - - if prev_row is not None and current_row != prev_row: - selected_text.append('\n') - elif prev_col is not None and current_col != prev_col: - selected_text.append('\t') - - selected_text.append(datamodel.data(index, Qt.DisplayRole)) - - prev_row = current_row - prev_col = current_col - - QApplication.clipboard().setText("".join(selected_text)) - return True - - else: - return super(SEToolsTableView, self).event(e) + def copy(self): + datamodel = self.model() + + selected_text = [] + current_row = None + current_col = None + prev_row = None + prev_col = None + for index in sorted(self.selectionModel().selectedIndexes()): + current_row = index.row() + current_col = index.column() + + if prev_row is not None and current_row != prev_row: + selected_text.append('\n') + elif prev_col is not None and current_col != prev_col: + selected_text.append('\t') + + selected_text.append(datamodel.data(index, Qt.DisplayRole)) + + prev_row = current_row + prev_col = current_col + + QApplication.clipboard().setText("".join(selected_text)) + + def cut(self): + self.copy() def choose_csv_save_location(self): filename = QFileDialog.getSaveFileName(self, "Save to CSV", "table.csv", diff --git a/setoolsgui/treeview.py b/setoolsgui/treeview.py index 8a821ff5..a8f6fb4c 100644 --- a/setoolsgui/treeview.py +++ b/setoolsgui/treeview.py @@ -22,12 +22,12 @@ def __init__(self, parent): self.menu.addAction(self.copy_tree_action) # connect signals - self.copy_tree_action.triggered.connect(self.copy_tree) + self.copy_tree_action.triggered.connect(self.copy) def contextMenuEvent(self, event): self.menu.popup(QCursor.pos()) - def copy_tree(self): + def copy(self): """Copy the tree to the clipboard.""" items = [] @@ -55,9 +55,5 @@ def copy_tree(self): QApplication.clipboard().setText("".join(items)) - def event(self, e): - if e == QKeySequence.Copy or e == QKeySequence.Cut: - self.copy_tree() - return True - else: - return super(SEToolsTreeWidget, self).event(e) + def cut(self): + self.copy() From e24d30da4b8e00438a4f73a8f79220a77b2d966c Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Wed, 30 Nov 2022 13:46:17 -0500 Subject: [PATCH 19/28] TabRegistry: Switch __new__() use to *args, **kwargs. This fixes a pylint issue. Signed-off-by: Chris PeBenito --- setoolsgui/apol/analysistab.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setoolsgui/apol/analysistab.py b/setoolsgui/apol/analysistab.py index a85529b4..1ed80341 100644 --- a/setoolsgui/apol/analysistab.py +++ b/setoolsgui/apol/analysistab.py @@ -35,9 +35,11 @@ class TabRegistry(sip.wrappertype): saving tab/workspace info. """ - def __new__(cls, clsname, superclasses, attributedict): - classdef = super().__new__(cls, clsname, superclasses, attributedict) + def __new__(cls, *args, **kwargs): + classdef = super().__new__(cls, *args, **kwargs) + clsname = args[0] + attributedict = args[2] if clsname != "AnalysisTab": assert "section" in attributedict, "Class {} is missing the section value, " \ "this is an setools bug".format(clsname) From 9cf0b13e039c97e696795b84297b706935d4704a Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Wed, 30 Nov 2022 13:48:00 -0500 Subject: [PATCH 20/28] PermissionMap: Fix error in __deepcopy__(). Signed-off-by: Chris PeBenito --- setools/permmap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setools/permmap.py b/setools/permmap.py index 4cadb025..728ea874 100644 --- a/setools/permmap.py +++ b/setools/permmap.py @@ -115,8 +115,8 @@ def __str__(self) -> str: def __deepcopy__(self, memo) -> 'PermissionMap': newobj = PermissionMap.__new__(PermissionMap) newobj.log = self.log - newobj.permmap = copy.deepcopy(self._permmap) - newobj.permmapfile = self._permmapfile + newobj._permmap = copy.deepcopy(self._permmap) + newobj._permmapfile = self._permmapfile memo[id(self)] = newobj return newobj From 0c80041c38dc20e8728805a621b56c2fc3ada9ed Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Wed, 30 Nov 2022 14:26:06 -0500 Subject: [PATCH 21/28] policyrep.pyi: Remove incorrect attribute overrides. This fixes mypy issues. Signed-off-by: Chris PeBenito --- setools/policyrep.pyi | 84 ------------------------------------------- 1 file changed, 84 deletions(-) diff --git a/setools/policyrep.pyi b/setools/policyrep.pyi index 68a7ac57..7b31be85 100644 --- a/setools/policyrep.pyi +++ b/setools/policyrep.pyi @@ -139,12 +139,6 @@ class Bounds(PolicyObject): def __setstate__(self, state) -> Any: ... class BoundsRuletype(PolicyEnum): - __new__: Any = ... - _generate_next_value_: Any = ... - _member_map_: Any = ... - _member_names_: Any = ... - _member_type_: Any = ... - _value2member_map_: Any = ... typebounds: int = ... class Category(PolicySymbol): @@ -337,12 +331,6 @@ class ConstraintIterator(PolicyIterator): def __setstate__(self, state) -> Any: ... class ConstraintRuletype(PolicyEnum): - __new__: Any = ... - _generate_next_value_: Any = ... - _member_map_: Any = ... - _member_names_: Any = ... - _member_type_: Any = ... - _value2member_map_: Any = ... constrain: int = ... mlsconstrain: int = ... mlsvalidatetrans: int = ... @@ -397,12 +385,6 @@ class DefaultRange(Default): def __setstate__(self, state) -> Any: ... class DefaultRangeValue(PolicyEnum): - __new__: Any = ... - _generate_next_value_: Any = ... - _member_map_: Any = ... - _member_names_: Any = ... - _member_type_: Any = ... - _value2member_map_: Any = ... high: int = ... low: int = ... low_high: int = ... @@ -410,24 +392,12 @@ class DefaultRangeValue(PolicyEnum): def from_default_range(self, range: Optional[int]) -> Optional[DefaultRangeValue]: ... class DefaultRuletype(PolicyEnum): - __new__: Any = ... - _generate_next_value_: Any = ... - _member_map_: Any = ... - _member_names_: Any = ... - _member_type_: Any = ... - _value2member_map_: Any = ... default_range: int = ... default_role: int = ... default_type: int = ... default_user: int = ... class DefaultValue(PolicyEnum): - __new__: Any = ... - _generate_next_value_: Any = ... - _member_map_: Any = ... - _member_names_: Any = ... - _member_type_: Any = ... - _value2member_map_: Any = ... glblub: int = ... source: int = ... target: int = ... @@ -486,12 +456,6 @@ class FSUseIterator(OcontextIterator): def __setstate__(self, state) -> Any: ... class FSUseRuletype(PolicyEnum): - __new__: Any = ... - _generate_next_value_: Any = ... - _member_map_: Any = ... - _member_names_: Any = ... - _member_type_: Any = ... - _value2member_map_: Any = ... fs_use_task: int = ... fs_use_trans: int = ... fs_use_xattr: int = ... @@ -573,12 +537,6 @@ class GenfsconOcontextIterator(OcontextIterator): def __setstate__(self, state) -> Any: ... class HandleUnknown(PolicyEnum): - __new__: Any = ... - _generate_next_value_: Any = ... - _member_map_: Any = ... - _member_names_: Any = ... - _member_type_: Any = ... - _value2member_map_: Any = ... allow: int = ... deny: int = ... reject: int = ... @@ -867,12 +825,6 @@ class MLSRuleIterator(HashtabIterator): def __setstate__(self, state) -> Any: ... class MLSRuletype(PolicyEnum): - __new__: Any = ... - _generate_next_value_: Any = ... - _member_map_: Any = ... - _member_names_: Any = ... - _member_type_: Any = ... - _value2member_map_: Any = ... range_transition: int = ... class Netifcon(Ocontext): @@ -924,12 +876,6 @@ class Nodecon(Ocontext): def __setstate__(self, state) -> Any: ... class NodeconIPVersion(PolicyEnum): - __new__: Any = ... - _generate_next_value_: Any = ... - _member_map_: Any = ... - _member_names_: Any = ... - _member_type_: Any = ... - _value2member_map_: Any = ... ipv4: int = ... ipv6: int = ... @@ -1047,12 +993,6 @@ class PolicyCapabilityIterator(EbitmapIterator): def __setstate__(self, state) -> Any: ... class PolicyEnum(enum.Enum): - __new__: Any = ... - _generate_next_value_: Any = ... - _member_map_: Any = ... - _member_names_: Any = ... - _member_type_: Any = ... - _value2member_map_: Any = ... @classmethod def lookup(self, value) -> Any: ... def __eq__(self, other) -> bool: ... @@ -1112,12 +1052,6 @@ class PolicySymbol(PolicyObject): def __setstate__(self, state) -> Any: ... class PolicyTarget(PolicyEnum): - __new__: Any = ... - _generate_next_value_: Any = ... - _member_map_: Any = ... - _member_names_: Any = ... - _member_type_: Any = ... - _value2member_map_: Any = ... selinux: int = ... xen: int = ... @@ -1147,12 +1081,6 @@ class PortconIterator(OcontextIterator): def __setstate__(self, state) -> Any: ... class PortconProtocol(PolicyEnum): - __new__: Any = ... - _generate_next_value_: Any = ... - _member_map_: Any = ... - _member_names_: Any = ... - _member_type_: Any = ... - _value2member_map_: Any = ... dccp: int = ... sctp: int = ... tcp: int = ... @@ -1173,12 +1101,6 @@ class PortconRange(Tuple[int, int]): def _make(self, *args, **kwargs) -> Any: ... class RBACRuletype(PolicyEnum): - __new__: Any = ... - _generate_next_value_: Any = ... - _member_map_: Any = ... - _member_names_: Any = ... - _member_type_: Any = ... - _value2member_map_: Any = ... allow: int = ... role_transition: int = ... @@ -1460,12 +1382,6 @@ class TERuleIterator(PolicyIterator): class TERuleNoFilename(AttributeError, setools.exception.PolicyrepException): ... class TERuletype(PolicyEnum): - __new__: Any = ... - _generate_next_value_: Any = ... - _member_map_: Any = ... - _member_names_: Any = ... - _member_type_: Any = ... - _value2member_map_: Any = ... allow: int = ... allowxperm: int = ... auditallow: int = ... From 8fa74b294fdbd6baaa5899c55599866dc6af69f6 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Wed, 30 Nov 2022 14:43:41 -0500 Subject: [PATCH 22/28] CriteriaDescriptor: Fix typing for enum_class keyword parameter. Signed-off-by: Chris PeBenito --- setools/descriptors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setools/descriptors.py b/setools/descriptors.py index 2bf22564..40936fd4 100644 --- a/setools/descriptors.py +++ b/setools/descriptors.py @@ -18,7 +18,7 @@ from collections import defaultdict from collections.abc import Collection from enum import Enum -from typing import Any, Callable, MutableMapping, Optional, Union +from typing import Any, Callable, MutableMapping, Optional, Type, Union from weakref import WeakKeyDictionary from .util import validate_perms_any @@ -57,7 +57,7 @@ class CriteriaDescriptor: def __init__(self, name_regex: Optional[str] = None, lookup_function: Optional[Union[Callable, str]] = None, - default_value=None, enum_class: Optional[Enum] = None) -> None: + default_value=None, enum_class: Optional[Type[Enum]] = None) -> None: assert name_regex or lookup_function or enum_class, \ "A simple attribute should be used if there is no regex, lookup function, or enum." From f1145086f1886a377011fff4a73eea58801ea670 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Wed, 30 Nov 2022 14:56:00 -0500 Subject: [PATCH 23/28] tests.yml: Add Python 3.10 and 3.11 CI tests. Signed-off-by: Chris PeBenito --- .github/workflows/tests.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bef60c1b..7d5e6b75 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,14 +14,16 @@ jobs: matrix: build-opts: - - {python: 3.6, tox: py36} - - {python: 3.7, tox: py37} - - {python: 3.8, tox: py38} - - {python: 3.9, tox: py39} - - {python: 3.6, tox: pep8} - - {python: 3.6, tox: lint} - - {python: 3.6, tox: mypy} - #- {python: 3.6, tox: coverage} + - {python: '3.6', tox: py36} + - {python: '3.7', tox: py37} + - {python: '3.8', tox: py38} + - {python: '3.9', tox: py39} + - {python: '3.10', tox: py310} + - {python: '3.11', tox: py311} + - {python: '3.6', tox: pep8} + - {python: '3.6', tox: lint} + - {python: '3.6', tox: mypy} + #- {python: '3.6', tox: coverage} steps: - uses: actions/checkout@v2 From aad59911ece8d70e5f5f2aa713d391f4d236f68a Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Thu, 2 Feb 2023 16:31:22 -0500 Subject: [PATCH 24/28] tests.yml: Pin ubuntu-20.04 to keep appropriate Python versions. Signed-off-by: Chris PeBenito --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7d5e6b75..664596af 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ env: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: fail-fast: false From 311a49e205ba012dbf777497af04517e59bc8be7 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Thu, 2 Feb 2023 16:49:39 -0500 Subject: [PATCH 25/28] dta, infoflow: Replace nx.info() function. This is a deprecated function and was removed in NetworkX 3.0. Signed-off-by: Chris PeBenito --- setools/dta.py | 3 ++- setools/infoflow.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/setools/dta.py b/setools/dta.py index ce5a3646..01d89946 100644 --- a/setools/dta.py +++ b/setools/dta.py @@ -247,7 +247,8 @@ def get_stats(self) -> str: # pragma: no cover if self.rebuildgraph: self._build_graph() - return nx.info(self.G) + return f"Graph nodes: {nx.number_of_nodes(self.G)}\n" \ + f"Graph edges: {nx.number_of_edges(self.G)}" # # Internal functions follow diff --git a/setools/infoflow.py b/setools/infoflow.py index 0ef240a9..57f9ebcd 100644 --- a/setools/infoflow.py +++ b/setools/infoflow.py @@ -251,7 +251,8 @@ def get_stats(self) -> str: # pragma: no cover if self.rebuildgraph: self._build_graph() - return nx.info(self.G) + return f"Graph nodes: {nx.number_of_nodes(self.G)}\n" \ + f"Graph edges: {nx.number_of_edges(self.G)}" # # Internal functions follow From 97d9c0dade26f7c06829518c5001d4b0398de3af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Fri, 3 Feb 2023 20:37:14 +0100 Subject: [PATCH 26/28] Update permission map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add permission cmd to class io_uring (added in Linux 6.0 and 5.19.9) * Add class user_namespace (added in Linux 6.1) Signed-off-by: Christian Göttsche --- setools/perm_map | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setools/perm_map b/setools/perm_map index dbb84478..6fdf3051 100644 --- a/setools/perm_map +++ b/setools/perm_map @@ -27,7 +27,7 @@ # Look to the examples below for further clarification. # # Number of object classes. -133 +134 class netlink_audit_socket 26 nlmsg_relay w 10 @@ -2292,6 +2292,10 @@ class anon_inode 25 watch_with_perm r 3 watch_reads r 3 -class io_uring 2 +class io_uring 3 override_creds w 10 sqpoll w 10 + cmd w 10 + +class user_namespace 1 + create w 10 From 806dad14f6d5848e62434c64d55929527566ce59 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Mon, 6 Feb 2023 08:44:56 -0500 Subject: [PATCH 27/28] Changelog: Update for 4.4.1 release. Signed-off-by: Chris PeBenito --- ChangeLog | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4e1ca480..2f881004 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,17 @@ +*setools-4.4.1 (6 Feb 2023) + + * Replace deprecated NetworkX function use in information flow and domain + transition analysis. This function was removed in NetworkX 3.0. + * Fix bug in apol copy and cut functions when copying from a tree view. + * Fix bug with extended permission set construction when a range includes + 0x0. + * Add sesearch -Sp option for permission subset match. + * Fix error in man page description for sesearch -ep option. + * Improve output stability in constraint, common, class, role, and user + queries. + * Updated permission map. * Fix bug in sechecker parsing of multiline values. + * Other code cleanups not visible to users. *setools-4.4.0 (5 Mar 2021) From fe3185500837f175847a1ddf6b78f58cf8c5f7c7 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Mon, 6 Feb 2023 08:46:09 -0500 Subject: [PATCH 28/28] setup.py: Update for 4.4.1 release. Signed-off-by: Chris PeBenito --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 70e92ae6..80123bb3 100644 --- a/setup.py +++ b/setup.py @@ -133,7 +133,7 @@ def run(self): installed_data.append((join('share/man', lang, 'man1'), glob.glob(join("man", lang, "*.1")))) setup(name='setools', - version='4.4.0', + version='4.4.1', description='SELinux policy analysis tools.', author='Chris PeBenito', author_email='pebenito@ieee.org',