selinux/libselinux
Petr Lautrbach 1f89c4e787 libselinux: Eliminate use of security_compute_user()
get_ordered_context_list() code used to ask the kernel to compute the complete
set of reachable contexts using /sys/fs/selinux/user aka
security_compute_user(). This set can be so huge so that it doesn't fit into a
kernel page and security_compute_user() fails. Even if it doesn't fail,
get_ordered_context_list() throws away the vast majority of the returned
contexts because they don't match anything in
/etc/selinux/targeted/contexts/default_contexts or
/etc/selinux/targeted/contexts/users/

get_ordered_context_list() is rewritten to compute set of contexts based on
/etc/selinux/targeted/contexts/users/ and
/etc/selinux/targeted/contexts/default_contexts files and to return only valid
contexts, using security_check_context(), from this set.

Fixes: https://github.com/SELinuxProject/selinux/issues/28

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
2020-02-20 09:47:23 -05:00
..
include libselinux: drop error return from is_selinux_enabled documentation 2020-02-18 10:38:19 -05:00
man libselinux: drop error return from is_selinux_enabled documentation 2020-02-18 10:38:19 -05:00
src libselinux: Eliminate use of security_compute_user() 2020-02-20 09:47:23 -05:00
utils Fix many misspellings 2019-09-18 22:47:35 +02:00
LICENSE initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
Makefile libselinux: Add support for pcre2 to pkgconfig definition 2017-10-13 15:24:23 -04:00
VERSION Update VERSIONs to 3.0 for release. 2019-11-28 13:46:48 +01:00