Revert "Send property_service AVC messages to the kernel audit system"

This reverts commit 8adb4d9d12d077ee87d1ce97742c6a5ba9aaaf9f.

Change-Id: I0db29617f323ef31ca5a270d02b7668092e9c9e1
diff --git a/init/log.cpp b/init/log.cpp
index ee6489b..0615730 100644
--- a/init/log.cpp
+++ b/init/log.cpp
@@ -21,7 +21,6 @@
 #include <string.h>
 
 #include <android-base/logging.h>
-#include <netlink/netlink.h>
 #include <selinux/selinux.h>
 
 void InitKernelLogging(char* argv[]) {
@@ -41,24 +40,6 @@
     android::base::InitLogging(argv, &android::base::KernelLogger);
 }
 
-static void selinux_avc_log(char* buf, size_t buf_len) {
-    size_t str_len = strnlen(buf, buf_len);
-
-    // trim newline at end of string
-    buf[str_len - 1] = '\0';
-
-    struct nl_sock* sk = nl_socket_alloc();
-    if (sk == NULL) {
-        return;
-    }
-    nl_connect(sk, NETLINK_AUDIT);
-    int result;
-    do {
-        result = nl_send_simple(sk, AUDIT_USER_AVC, 0, buf, str_len);
-    } while (result == -NLE_INTR);
-    nl_socket_free(sk);
-}
-
 int selinux_klog_callback(int type, const char *fmt, ...) {
     android::base::LogSeverity severity = android::base::ERROR;
     if (type == SELINUX_WARNING) {
@@ -69,15 +50,8 @@
     char buf[1024];
     va_list ap;
     va_start(ap, fmt);
-    int res = vsnprintf(buf, sizeof(buf), fmt, ap);
+    vsnprintf(buf, sizeof(buf), fmt, ap);
     va_end(ap);
-    if (res <= 0) {
-        return 0;
-    }
-    if (type == SELINUX_AVC) {
-        selinux_avc_log(buf, sizeof(buf));
-    } else {
-        android::base::KernelLogger(android::base::MAIN, severity, "selinux", nullptr, 0, buf);
-    }
+    android::base::KernelLogger(android::base::MAIN, severity, "selinux", nullptr, 0, buf);
     return 0;
 }