diff options
author | Nick Kralevich <nnk@google.com> | 2014-06-25 18:46:59 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-06-25 18:46:59 +0000 |
commit | 61be43907f2ad3430deeb0223ffe8ac5c165b986 (patch) | |
tree | 1ad2a394720c261effb87e022d809fea38456b07 /init | |
parent | 91c73f6c51bd279e494730012a8e7d5eff5cdf4f (diff) | |
parent | 471a7034b2fca93f174c88e275d3968032730aa7 (diff) | |
download | system_core-61be43907f2ad3430deeb0223ffe8ac5c165b986.zip system_core-61be43907f2ad3430deeb0223ffe8ac5c165b986.tar.gz system_core-61be43907f2ad3430deeb0223ffe8ac5c165b986.tar.bz2 |
am 471a7034: am aadf9f11: am 4ad20e55: Merge "Redirect libselinux logging to dmesg for ueventd."
* commit '471a7034b2fca93f174c88e275d3968032730aa7':
Redirect libselinux logging to dmesg for ueventd.
Diffstat (limited to 'init')
-rw-r--r-- | init/init.c | 2 | ||||
-rw-r--r-- | init/log.h | 2 | ||||
-rw-r--r-- | init/ueventd.c | 5 |
3 files changed, 8 insertions, 1 deletions
diff --git a/init/init.c b/init/init.c index 97c33e4..f001071 100644 --- a/init/init.c +++ b/init/init.c @@ -938,7 +938,7 @@ static int audit_callback(void *data, security_class_t cls __attribute__((unused return 0; } -static int log_callback(int type, const char *fmt, ...) +int log_callback(int type, const char *fmt, ...) { int level; va_list ap; @@ -23,4 +23,6 @@ #define NOTICE(x...) KLOG_NOTICE("init", x) #define INFO(x...) KLOG_INFO("init", x) +extern int log_callback(int type, const char *fmt, ...); + #endif diff --git a/init/ueventd.c b/init/ueventd.c index 4ad0cb9..833e4fd 100644 --- a/init/ueventd.c +++ b/init/ueventd.c @@ -21,6 +21,7 @@ #include <stdio.h> #include <ctype.h> #include <signal.h> +#include <selinux/selinux.h> #include <private/android_filesystem_config.h> @@ -76,6 +77,10 @@ int ueventd_main(int argc, char **argv) } #endif + union selinux_callback cb; + cb.func_log = log_callback; + selinux_set_callback(SELINUX_CB_LOG, cb); + INFO("starting ueventd\n"); /* Respect hardware passed in through the kernel cmd line. Here we will look |