selinux: always use *_raw API from libselinux
authorMichal Sekletar <msekleta@redhat.com>
Tue, 1 Sep 2015 14:02:58 +0000 (16:02 +0200)
committerMichal Sekletar <msekleta@redhat.com>
Tue, 1 Sep 2015 15:09:56 +0000 (17:09 +0200)
commit24154879845c6aa68a82d3a606f037e9df7527e0
tree0812a444a258cbc63adbf6e83452918611987358
parent3f010fe095a8070299d35f0f9d386672e0cb2af0
selinux: always use *_raw API from libselinux

When mcstransd* is running non-raw functions will return translated SELinux
context. Problem is that libselinux will cache this information and in the
future it will return same context even though mcstransd maybe not running at
that time. If you then check with such context against SELinux policy then
selinux_check_access may fail depending on whether mcstransd is running or not.

To workaround this problem/bug in libselinux, we should always get raw context
instead. Most users will not notice because result of access check is logged
only in debug mode.

* SELinux context translation service, which will translates labels to human
  readable form
src/basic/selinux-util.c
src/core/selinux-access.c