From the is_selinux_enabled() manpage:
is_selinux_enabled() returns 1 if SELinux is running or 0 if it is not.
This makes the is_selinux_enabled() stub functions works exactly like
the SELinux function it is supposed to replace.
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
/* Stubs for SELinux functions */
static int is_selinux_enabled(void)
{
- return -1;
+ return 0;
}
static int getpidcon(pid_t pid, char **context)
show_sock_ctx++;
/* fall through */
case 'Z':
- if (is_selinux_enabled() <= 0) {
+ if (!is_selinux_enabled()) {
fprintf(stderr, "ss: SELinux is not enabled.\n");
exit(1);
}