selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fix semanage in envinronment without default policy or when -S <store> is used
@ 2018-12-20 15:14 Petr Lautrbach
  2018-12-20 15:14 ` [PATCH 1/4] python/semanage: move valid_types initialisations to class constructors Petr Lautrbach
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Petr Lautrbach @ 2018-12-20 15:14 UTC (permalink / raw)
  To: selinux

The following set of patches tries to fix semanage in non-standard environments.

A backtrace when semanage was run on a system without installed policy, see
https://github.com/SELinuxProject/selinux/issues/81
https://bugzilla.redhat.com/show_bug.cgi?id=1558861 

The fix is based on
https://github.com/fishilico/selinux/commit/00eb0cc86185d2145ea3ec61df08c587faba1375
by Nicolas Iooss <nicolas.iooss@m4x.org>

And when semanage was run -S <store>, sepolicy module was initialized with the
default policy file (targeted) and also selinux module used the same default. It
meant that semanage either backtraced when the default policy was not installed
or used wrong store and therefore didn't behave correctly.

E.g. # semanage login -S minimum -d -s unconfined_u -r s0-s0:c0.c1023 __default__
libsemanage.dbase_llist_query: could not query record value
OSError: [Errno 0] Error





^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-01-05 14:43 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-20 15:14 Fix semanage in envinronment without default policy or when -S <store> is used Petr Lautrbach
2018-12-20 15:14 ` [PATCH 1/4] python/semanage: move valid_types initialisations to class constructors Petr Lautrbach
2018-12-20 22:34   ` Nicolas Iooss
2019-01-02 13:14     ` Petr Lautrbach
2018-12-20 15:14 ` [PATCH 2/4] python/semanage: import sepolicy only when it's needed Petr Lautrbach
2018-12-20 15:14 ` [PATCH 3/4] python/sepolicy: Add sepolicy.load_store_policy(store) Petr Lautrbach
2018-12-20 21:55   ` Nicolas Iooss
2019-01-02 14:13     ` Petr Lautrbach
2018-12-20 15:14 ` [PATCH 4/4] python/semanage: Load a store policy and set the store SELinux policy root Petr Lautrbach
2019-01-03 12:03 ` [PATCH v2 1/5] python/semanage: move valid_types initialisations to class constructors Petr Lautrbach
2019-01-03 12:03   ` [PATCH v2 2/5] python/semanage: import sepolicy only when it's needed Petr Lautrbach
2019-01-03 12:03   ` [PATCH v2 3/5] python/sepolicy: Add sepolicy.load_store_policy(store) Petr Lautrbach
2019-01-03 12:03   ` [PATCH v2 4/5] python/semanage: Load a store policy and set the store SELinux policy root Petr Lautrbach
2019-01-03 12:03   ` [PATCH v2 5/5] python/sepolicy: Make policy files sorting more robust Petr Lautrbach
2019-01-05 14:43     ` Nicolas Iooss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).