libselinux question for httpd
Daniel J Walsh
dwalsh at redhat.com
Thu Nov 3 14:06:51 UTC 2005
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.
>
>
I am not sure what you want. You can ask whether SELinux is enabled.
is_selinux_enabled(), or you can getcon to get the current context.
So you could show that the context is system_u:system_r:httpd_t in the
log file if getcon is called.
> joe
>
> --
> fedora-selinux-list mailing list
> fedora-selinux-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-selinux-list
>
--
More information about the fedora-selinux-list
mailing list