platform_external_selinux/python
Kyle Walker 468a0dbac8 seobject: Handle python error returns correctly
After 9406ace8 ("libsemanage: throw exceptions in python rather than
return NULL"), calls to libsemanage functions return Python exceptions
instead of returning negative error return codes. For systems that did not
have the applicable headers installed prior to build, the difference was
not seen. Following commit 9792099f ("Properly build the swig exception
file even if the headers are missing"), that issue has been resolved and
the underlying semanage_fcontext_query_local and semanage_fcontext_query
calls now result in an OSError return. This results in the following error
when attempting to modify a fcontext defined in the systems base policy.

    libsemanage.dbase_llist_query: could not query record value (No such file or directory).
    OSError: No such file or directory

To resolve the error, handle the OSError exception, but retain the
previous query operation.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1398427

Signed-off-by: Kyle Walker <kwalker@redhat.com>
2016-11-30 11:00:51 -05:00
..
audit2allow libsepol,libselinux,audit2allow: teach audit2why about type bounds failures 2016-11-29 15:53:59 -05:00
chcat Move policycoreutils/{sepolicy,audit2allow,semanage,scripts/chcat*} and sepolgen to python. 2016-11-16 11:19:50 -05:00
semanage seobject: Handle python error returns correctly 2016-11-30 11:00:51 -05:00
sepolgen Drop ChangeLog files 2016-11-16 12:10:58 -05:00
sepolicy python/sepolicy/sepolicy/gui: Fix getting python lib path 2016-11-30 08:49:26 -05:00
COPYING Add COPYING files for new subdirs. 2016-11-16 11:19:51 -05:00
Makefile Move policycoreutils/{sepolicy,audit2allow,semanage,scripts/chcat*} and sepolgen to python. 2016-11-16 11:19:50 -05:00
VERSION Add VERSION files for new components 2016-11-16 11:19:51 -05:00