Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package setools for openSUSE:Factory checked in at 2023-08-04 15:02:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/setools (Old) and /work/SRC/openSUSE:Factory/.setools.new.22712 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "setools" Fri Aug 4 15:02:58 2023 rev:45 rq:1102155 version:4.4.3 Changes: -------- --- /work/SRC/openSUSE:Factory/setools/setools.changes 2023-07-19 19:09:46.792266391 +0200 +++ /work/SRC/openSUSE:Factory/.setools.new.22712/setools.changes 2023-08-04 15:03:03.948146811 +0200 @@ -1,0 +2,10 @@ +Tue Aug 1 10:27:36 UTC 2023 - Filippo Bonazzi <filippo.bona...@suse.com> + +- Update to version 4.4.3: + * Fix compilation with Cython 3.0.0. + * Improve man pages. + * Remove neverallow options in sediff. + * Add -r option to seinfoflow to get flows into the source type. + * Reject a rule with no permissions as invalid policy. + +------------------------------------------------------------------- Old: ---- setools-4.4.2.tar.bz2 New: ---- setools-4.4.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ setools.spec ++++++ --- /var/tmp/diff_new_pack.nsmyFH/_old 2023-08-04 15:03:04.692151448 +0200 +++ /var/tmp/diff_new_pack.nsmyFH/_new 2023-08-04 15:03:04.696151473 +0200 @@ -26,7 +26,7 @@ %define pythons %python3_primary_provider Name: setools -Version: 4.4.2 +Version: 4.4.3 Release: 0 URL: https://github.com/SELinuxProject/setools Summary: Policy analysis tools for SELinux ++++++ setools-4.4.2.tar.bz2 -> setools-4.4.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setools/.github/workflows/tests.yml new/setools/.github/workflows/tests.yml --- old/setools/.github/workflows/tests.yml 2023-04-19 15:06:47.000000000 +0200 +++ new/setools/.github/workflows/tests.yml 2023-07-27 20:59:07.000000000 +0200 @@ -27,12 +27,12 @@ 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.10', tox: py310} - - {python: '3.11', tox: py311} + - {python: '3.6', tox: python3.6} + - {python: '3.7', tox: python3.7} + - {python: '3.8', tox: python3.8} + - {python: '3.9', tox: python3.9} + - {python: '3.10', tox: python3.10} + - {python: '3.11', tox: python3.11} - {python: '3.6', tox: pep8} - {python: '3.6', tox: lint} - {python: '3.6', tox: mypy} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setools/ChangeLog new/setools/ChangeLog --- old/setools/ChangeLog 2023-04-19 15:06:47.000000000 +0200 +++ new/setools/ChangeLog 2023-07-27 20:59:07.000000000 +0200 @@ -1,3 +1,10 @@ +*setools-4-4.3 (27 Jul 2023) + * Fix compilation with Cython 3.0.0. + * Improve man pages. + * Remove neverallow options in sediff. + * Add -r option to seinfoflow to get flows into the source type. + * Reject a rule with no permissions as invalid policy. + *setools-4-4.2 (19 Apr 2023) * Make NetworkX optional. sedta and seinfoflow tools, along with the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setools/man/ru/sediff.1 new/setools/man/ru/sediff.1 --- old/setools/man/ru/sediff.1 2023-04-19 15:06:47.000000000 +0200 +++ new/setools/man/ru/sediff.1 2023-07-27 20:59:07.000000000 +0200 @@ -57,16 +57,12 @@ ÐайÑи ÑазлиÑÐ¸Ñ Ð¿Ñавил вклÑÑÐµÐ½Ð¸Ñ Ð¶ÑÑналиÑÐ¾Ð²Ð°Ð½Ð¸Ñ ÑобÑÑий. .IP "--dontaudit" ÐайÑи ÑазлиÑÐ¸Ñ Ð¿Ñавил запÑеÑа жÑÑналиÑÐ¾Ð²Ð°Ð½Ð¸Ñ ÑобÑÑий. -.IP "--neverallow" -ÐайÑи ÑазлиÑÐ¸Ñ Ð·Ð°Ð¿ÑеÑаÑÑÐ¸Ñ Ð¿Ñавил. .IP "--allowxperm" ÐайÑи ÑазлиÑÐ¸Ñ ÑаÑÑиÑеннÑÑ ÑазÑеÑиÑелÑнÑÑ Ð¿Ñавил. .IP "--auditallowxperm" ÐайÑи ÑазлиÑÐ¸Ñ ÑаÑÑиÑеннÑÑ Ð¿Ñавил вклÑÑÐµÐ½Ð¸Ñ Ð¶ÑÑналиÑÐ¾Ð²Ð°Ð½Ð¸Ñ ÑобÑÑий. .IP "--dontauditxperm" ÐайÑи ÑазлиÑÐ¸Ñ ÑаÑÑиÑеннÑÑ Ð¿Ñавил запÑеÑа жÑÑналиÑÐ¾Ð²Ð°Ð½Ð¸Ñ ÑобÑÑий. -.IP "--neverallowxperm" -ÐайÑи ÑазлиÑÐ¸Ñ ÑаÑÑиÑеннÑÑ Ð·Ð°Ð¿ÑеÑаÑÑÐ¸Ñ Ð¿Ñавил. .IP "-T, --type_trans" ÐайÑи ÑазлиÑÐ¸Ñ Ð¿Ñавил пеÑÐµÑ Ð¾Ð´Ð° Ñипов. .IP "--type_member" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setools/man/sechecker.1 new/setools/man/sechecker.1 --- old/setools/man/sechecker.1 2023-04-19 15:06:47.000000000 +0200 +++ new/setools/man/sechecker.1 2023-07-27 20:59:07.000000000 +0200 @@ -81,7 +81,7 @@ A space-separated list of permissions for the query. .PP -\fBA least one of the above options must be set in this check.\fR +\fBAt least one of the above options must be set in this check.\fR .PP Additional Options: @@ -123,7 +123,7 @@ The target role criteria for the query. .PP -\fBA least one of the above options must be set in this check.\fR +\fBAt least one of the above options must be set in this check.\fR .PP Additional Options: @@ -205,7 +205,7 @@ .\} .nf [ro_execs] -check_type = empty_typeattr +check_type = ro_execs desc = Verify that the all executables and libraries are read-only. .fi .if n \{\ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setools/man/sediff.1 new/setools/man/sediff.1 --- old/setools/man/sediff.1 2023-04-19 15:06:47.000000000 +0200 +++ new/setools/man/sediff.1 2023-07-27 20:59:07.000000000 +0200 @@ -50,16 +50,12 @@ Find differences in auditallow rules. .IP "--dontaudit" Find differences in dontaudit rules. -.IP "--neverallow" -Find differences in neverallow rules. .IP "--allowxperm" Find differences in allowxperm rules. .IP "--auditallowxperm" Find differences in auditallowxperm rules. .IP "--dontauditxperm" Find differences in dontauditxperm rules. -.IP "--neverallowxperm" -Find differences in neverallowxperm rules. .IP "-T, --type_trans" Find differences in type_transition rules. .IP "--type_member" @@ -88,6 +84,10 @@ Find differences in mlsvalidatetrans rules. .SS Labeling Statement Differences +.IP "--ibendportcon" +Find differences in ibendportcon (InfiniBand endport context) statements. +.IP "--ibpkeycon" +Find differences in ibpkeycon (InfiniBand parition key context) statements. .IP "--initialsid" Find differences in initial SID statements. .IP "--fs_use" @@ -140,6 +140,14 @@ .RE .PP +.SH EXAMPLE +.nf +Show differences in boolean settings +# sediff -b /backup/policy.33 /etc/selinux/targeted/policy/policy.33 +Show statistics for allow and allowxperm rule changes (how many rules where added, removed, or modified) +#sediff -A --stats /backup/policy.33 /etc/selinux/targeted/policy/policy.33 + + .SH AUTHOR Chris PeBenito <peben...@ieee.org> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setools/man/sedta.1 new/setools/man/sedta.1 --- old/setools/man/sedta.1 2023-04-19 15:06:47.000000000 +0200 +++ new/setools/man/sedta.1 2023-07-27 20:59:07.000000000 +0200 @@ -49,6 +49,8 @@ A space-separated list of types to exclude from the analysis. .SS General Options +.IP "--full" +Print rule lists for transitions. .IP "--stats" Print domain transition graph statistics at the end of the analysis. .IP "-h, --help" @@ -60,6 +62,13 @@ .IP "--debug" Enable debugging output. +.SH EXAMPLE +.nf +Show the shortest transition paths from httpd_t to unconfined_t, while not using container_runtime_t +# sedta -s httpd_t -t unconfined_t -S container_runtime_t +List all domain transition paths shorter than 3 steps from init_t to smbd_t +# sedta -s init_t -t smbd_t -A 3 + .SH AUTHOR Chris PeBenito <peben...@ieee.org> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setools/man/seinfo.1 new/setools/man/seinfo.1 --- old/setools/man/seinfo.1 2023-04-19 15:06:47.000000000 +0200 +++ new/setools/man/seinfo.1 2023-07-27 20:59:07.000000000 +0200 @@ -56,6 +56,10 @@ .IP "--genfscon [FS_TYPE]" Print a list of genfscon statements or, if FS_TYPE is provided, print the statement for the named filesystem type. There is no expanded information for this component. +.IP "--ibpkeycon [PKEY[-PKEY]]" +Print a list of InfiniBand parition key contexts. +.IP "--ibendportcon [NAME]" +Print a list of InfiniBand endport contexts. .IP "--initialsid [NAME]" Print a list of initial SIDs or, if NAME is provided, print the named initial SID. With \fI-x\fR, print the context assigned to each displayed SID. @@ -86,6 +90,18 @@ .IP "--all" Print all components. +.IP "\fB Xen Component Queries: \fR" +.IP "--ioportcon" +Print all ioportcon statements. +.IP "--iomemcon" +Print all iomemcon statements. +.IP "--pcidevicecon" +Print all pcidevicecon statements. +.IP "--pirqcon" +Print all pirqcon statements. +.IP "--devicetreecon" +Print all devicetreecon statements. + .SH OPTIONS .IP "-x, --expand" Print additional details for each component matching the expression. @@ -101,6 +117,15 @@ .IP "--debug" Enable debugging output. +.SH EXAMPLE +.nf +List aliases of and attributes assigned to type httpd_t +# seinfo -t httpd_t -x +List all executable types (all types assigned to "exec_type" attribute) +# seinfo -a exec_type -x +List all constrains and mlsconstrains for class "file" +# seinfo --constrain file + .SH AUTHOR Chris PeBenito <peben...@ieee.org> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setools/man/seinfoflow.1 new/setools/man/seinfoflow.1 --- old/setools/man/seinfoflow.1 2023-04-19 15:06:47.000000000 +0200 +++ new/setools/man/seinfoflow.1 2023-07-27 20:59:07.000000000 +0200 @@ -50,10 +50,14 @@ A space-separated list of types to exclude from the analysis. .SS General Options +.IP "-r, --reverse" +Display information flows into the source type. No effect if a target type is specified. .IP "--stats" Print information flow graph statistics at the end of the analysis. .IP "-h, --help" Print help information and exit. +.IP "--full" +Print full rule lists for information flows. .IP "--version" Print version information and exit. .IP "-v, --verbose" @@ -61,6 +65,13 @@ .IP "--debug" Enable debugging output. +.SH EXAMPLE +.nf +Show the shortest paths for process running as httpd_t to access user home files, using the default permission map: +# seinfoflow -s httpd_t -t user_home_t -S +List all data paths shorter than 3 steps from smbd_t to httpd_log_t, when samba_enable_home_dirs and samba_create_home_dirs booleans are enabled +# seinfoflow -s smbd_t -t user_home_t -A 3 -b "samba_enable_home_dirs:true,samba_create_home_dirs:true" + .SH AUTHOR Chris PeBenito <peben...@ieee.org> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setools/man/sesearch.1 new/setools/man/sesearch.1 --- old/setools/man/sesearch.1 2023-04-19 15:06:47.000000000 +0200 +++ new/setools/man/sesearch.1 2023-07-27 20:59:07.000000000 +0200 @@ -48,6 +48,7 @@ Find role allow rules. .IP "--role_trans" Find role_transition rules. +.IP "Note: TE/MLS rule searches cannot be mixed with RBAC rule searches" .SS MLS Rule Types .IP "--range_trans" @@ -80,6 +81,8 @@ 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 "-ex" +A matching rule must have exactly the specified extended permissions, instead of matching any listed extended 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" @@ -103,6 +106,15 @@ .IP "--debug" Enable debugging output. +.SH EXAMPLE +.nf +List allow (and allowxperm) rules for accessing files labeled container_file_t from domains with attribute container_domain +# sesearch -A -s container_domain -t container_file_t -c file +List allow and dontaudit rules for accessing chr_files labeled container_file_t, that are controlled by boolean container_use_devices +# sesearch -A --dontaudit -t container_file_t -c chr_file -b container_use_devices +List dontaudit rules assigned via application_domain_type attribute (rules concerning specific types with that attribute are excluded) +# sesearch --dontaudit -s application_domain_type -ds + .SH AUTHOR Chris PeBenito <peben...@ieee.org> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setools/sediff new/setools/sediff --- old/setools/sediff 2023-04-19 15:06:47.000000000 +0200 +++ new/setools/sediff 2023-07-27 20:59:07.000000000 +0200 @@ -45,12 +45,12 @@ terule = parser.add_argument_group("type enforcement rule differences") terule.add_argument("-A", action="store_true", help="Print allow and allowxperm rule differences") terule.add_argument("--allow", action="store_true", help="Print allow rule differences") -terule.add_argument("--neverallow", action="store_true", help="Print neverallow rule differences") +# terule.add_argument("--neverallow", action="store_true", help="Print neverallow rule differences") terule.add_argument("--auditallow", action="store_true", help="Print auditallow rule differences") terule.add_argument("--dontaudit", action="store_true", help="Print dontaudit rule differences") terule.add_argument("--allowxperm", action="store_true", help="Print allowxperm rule differences") -terule.add_argument("--neverallowxperm", action="store_true", - help="Print neverallowxperm rule differences") +# terule.add_argument("--neverallowxperm", action="store_true", +# help="Print neverallowxperm rule differences") terule.add_argument("--auditallowxperm", action="store_true", help="Print auditallowxperm rule differences") terule.add_argument("--dontauditxperm", action="store_true", @@ -97,6 +97,10 @@ args = parser.parse_args() +# neverallow and neverallowxperm options are disabled +args.neverallow = False +args.neverallowxperm = False + if args.A: args.allow = True args.allowxperm = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setools/seinfoflow new/setools/seinfoflow --- old/setools/seinfoflow 2023-04-19 15:06:47.000000000 +0200 +++ new/setools/seinfoflow 2023-07-27 20:59:07.000000000 +0200 @@ -42,6 +42,9 @@ help="Calculate all paths, with the specified maximum path length. (Expensive)") opts = parser.add_argument_group("Analysis options") +opts.add_argument("-r", "--reverse", action="store_false", + help="Display information flows into the source type. " + "No effect if a target type is specified.") opts.add_argument("-w", "--min_weight", default=3, type=int, help="Minimum permission weight. Default is 3.") opts.add_argument("-l", "--limit_flows", default=0, type=int, @@ -119,7 +122,7 @@ else: # single direct info flow flownum = 0 - for flownum, flow in enumerate(g.infoflows(args.source), start=1): + for flownum, flow in enumerate(g.infoflows(args.source, out=args.reverse), start=1): print("Flow {0}: {1} -> {2}".format(flownum, flow.source, flow.target)) if args.full: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setools/setools/policyrep/selinuxpolicy.pxi new/setools/setools/policyrep/selinuxpolicy.pxi --- old/setools/setools/policyrep/selinuxpolicy.pxi 2023-04-19 15:06:47.000000000 +0200 +++ new/setools/setools/policyrep/selinuxpolicy.pxi 2023-07-27 20:59:07.000000000 +0200 @@ -668,7 +668,7 @@ if self.sh == NULL: raise MemoryError - sepol.sepol_msg_set_callback(self.sh, sepol_logging_callback, self.handle) + sepol.sepol_msg_set_callback(self.sh, <sepol.msg_callback>sepol_logging_callback, self.handle) if sepol.sepol_policydb_create(&self.handle) < 0: raise MemoryError diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setools/setools/policyrep/sepol.pxd new/setools/setools/policyrep/sepol.pxd --- old/setools/setools/policyrep/sepol.pxd 2023-04-19 15:06:47.000000000 +0200 +++ new/setools/setools/policyrep/sepol.pxd 2023-07-27 20:59:07.000000000 +0200 @@ -16,8 +16,10 @@ void sepol_handle_destroy(sepol_handle_t *sh) +ctypedef void (*msg_callback)(void *varg, sepol_handle_t *handle, const char *fmt, ...) + + cdef extern from "<sepol/debug.h>": - ctypedef void (*msg_callback)(void *varg, sepol_handle_t *handle, const char *fmt, ...) void sepol_msg_set_callback(sepol_handle * handle, msg_callback cb, void *cb_arg) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setools/setools/policyrep/terule.pxi new/setools/setools/policyrep/terule.pxi --- old/setools/setools/policyrep/terule.pxi 2023-04-19 15:06:47.000000000 +0200 +++ new/setools/setools/policyrep/terule.pxi 2023-07-27 20:59:07.000000000 +0200 @@ -120,6 +120,17 @@ r._conditional = conditional r._conditional_block = conditional_block r.origin = None + + if not r.perms: + rule_string = f"{r.ruletype} {r.source} {r.target}:{r.tclass} {{ }};" + try: + rule_string += f" [ {r.conditional} ]:{r.conditional_block}" + except RuleNotConditional: + pass + + raise LowLevelPolicyError("Invalid policy: Found a rule with no permissions: " + f"{rule_string}") + return r def __hash__(self): @@ -319,6 +330,17 @@ r._conditional = conditional r._conditional_block = conditional_block r.origin = None + + if not perms: + rule_string = f"{r.ruletype} {r.source} {r.target}:{r.tclass} {r.xperm_type} {{ }};" + try: + rule_string += f" [ {r.conditional} ]:{r.conditional_block}" + except RuleNotConditional: + pass + + raise LowLevelPolicyError( + f"Invalid policy: Found a rule with no extended permissions: {rule_string}.") + return r def __hash__(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setools/setup.py new/setools/setup.py --- old/setools/setup.py 2023-04-19 15:06:47.000000000 +0200 +++ new/setools/setup.py 2023-07-27 20:59:07.000000000 +0200 @@ -133,7 +133,7 @@ installed_data.append((join('share/man', lang, 'man1'), glob.glob(join("man", lang, "*.1")))) setup(name='setools', - version='4.4.2', + version='4.4.3', description='SELinux policy analysis tools.', author='Chris PeBenito', author_email='peben...@ieee.org', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setools/tox.ini new/setools/tox.ini --- old/setools/tox.ini 2023-04-19 15:06:47.000000000 +0200 +++ new/setools/tox.ini 2023-07-27 20:59:07.000000000 +0200 @@ -1,6 +1,6 @@ [tox] minversion = 1.4 -envlist = py3, pep8, lint, mypy +envlist = python3, pep8, lint, mypy [pycodestyle] max-line-length = 100 @@ -53,8 +53,8 @@ deps = networkx>=2.0 cython>=0.27 pytest - py38: cython>=0.29.14 - py39: networkx>=2.6 - py39: cython>=0.29.14 + python38: cython>=0.29.14 + python39: networkx>=2.6 + python39: cython>=0.29.14 commands_pre = {envpython} setup.py build_ext -i commands = pytest tests