1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-27 18:55:09 +03:00

selinux: turn of libselinux' internal logging

This commit is contained in:
Lennart Poettering 2012-07-10 19:28:26 +02:00
parent 3131f6c362
commit dbc655d58d

View File

@ -36,6 +36,10 @@
#include "log.h"
#include "label.h"
static int null_log(int type, const char *fmt, ...) {
return 0;
}
int selinux_setup(bool *loaded_policy) {
#ifdef HAVE_SELINUX
@ -43,9 +47,14 @@ int selinux_setup(bool *loaded_policy) {
usec_t before_load, after_load;
security_context_t con;
int r;
union selinux_callback cb;
assert(loaded_policy);
/* Turn off all of SELinux' own logging, we want to do that */
cb.func_log = null_log;
selinux_set_callback(SELINUX_CB_LOG, cb);
/* Make sure getcon() works, which needs /proc and /sys */
mount_setup_early();