On Thu, Nov 03, 2005 at 08:35:56AM -0500, Stephen Smalley wrote:
On Thu, 2005-11-03 at 09:52 +0000, Joe Orton wrote:
> Is there is a simple libselinux call I can make in httpd to determine
> whether or not the SELinux policy is enabled and applied?
>
> I'd like to add a one-line notice to the default error_log when it is,
> to give an obvious tip-off to confused new users.
is_selinux_enabled() will return > 0 if SELinux is enabled.
getcon(&con) will set con to the context in which the process is
running.
Great, thanks. Is it OK to presume that security_context_t is always a
char * and just print that string?
joe