platform_external_selinux/python
James Carter 7238ad32a3 python: Do not query the local database if the fcontext is non-local
Vit Mojzis reports that an error message is produced when modifying
a non-local fcontext.

He gives the following example:
  # semanage fcontext -f f -m -t passwd_file_t /etc/security/opasswd
  libsemanage.dbase_llist_query: could not query record value (No such file or directory).

When modifying an fcontext, the non-local database is checked for the
key and then, if it is not found there, the local database is checked.
If the key doesn't exist, then an error is raised. If the key exists
then the local database is queried first and, if that fails, the non-
local database is queried.

The error is from querying the local database when the fcontext is in
the non-local database.

Instead, if the fcontext is in the non-local database, just query
the non-local database. Only query the local database if the
fcontext was found in it.

Reported-by: Vit Mojzis <vmojzis@redhat.com>
Signed-off-by: James Carter <jwcart2@gmail.com>
2022-10-24 08:26:28 -04:00
..
audit2allow python/audit2allow: close file stream on error 2022-06-15 08:58:54 -04:00
chcat gettext: handle unsupported languages properly 2022-06-29 15:51:07 +02:00
po Update translations 2022-10-05 08:13:26 -04:00
semanage python: Do not query the local database if the fcontext is non-local 2022-10-24 08:26:28 -04:00
sepolgen docs: provide a top level LICENSE file 2022-10-05 08:20:38 -04:00
sepolicy gui: Fix export file chooser dialog 2022-10-24 08:26:18 -04:00
LICENSE docs: provide a top level LICENSE file 2022-10-05 08:20:38 -04:00
Makefile Split po/ translation files into the relevant sub-directories 2022-04-06 10:52:41 +02:00
VERSION Update VERSIONs to 3.4 for release. 2022-05-18 16:51:03 +02:00