]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
missing: move audit related definitions to missing_audit.h
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 6 Dec 2018 05:34:04 +0000 (06:34 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 6 Dec 2018 12:25:24 +0000 (13:25 +0100)
src/basic/meson.build
src/basic/missing.h
src/basic/missing_audit.h [new file with mode: 0644]

index 153a38f9d050074726c194aa15b528594b496856..4713c1d364b07e986c2d055683cd5e536aeb816a 100644 (file)
@@ -91,6 +91,7 @@ basic_sources = files('''
         memfd-util.h
         mempool.c
         mempool.h
+        missing_audit.h
         missing_btrfs.h
         missing_btrfs_tree.h
         missing_capability.h
index 651913102566a06ea0a5dcbae2957fa2d509f083..da10b10a2e880465036ccb7bd16e46dc011a1f19 100644 (file)
@@ -6,17 +6,12 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <inttypes.h>
-#include <linux/audit.h>
 #include <linux/falloc.h>
 #include <stdlib.h>
 #include <sys/resource.h>
 #include <sys/socket.h>
 #include <sys/syscall.h>
 
-#if HAVE_AUDIT
-#include <libaudit.h>
-#endif
-
 #if HAVE_LINUX_VM_SOCKETS_H
 #include <linux/vm_sockets.h>
 #else
@@ -81,14 +76,6 @@ struct sockaddr_vm {
 #define IP_FREEBIND 15
 #endif
 
-#ifndef AUDIT_SERVICE_START
-#define AUDIT_SERVICE_START 1130 /* Service (daemon) start */
-#endif
-
-#ifndef AUDIT_SERVICE_STOP
-#define AUDIT_SERVICE_STOP 1131 /* Service (daemon) stop */
-#endif
-
 #ifndef TIOCVHANGUP
 #define TIOCVHANGUP 0x5437
 #endif
@@ -233,14 +220,6 @@ struct sockaddr_vm {
 #define BPF_XOR 0xa0
 #endif
 
-#ifndef MAX_AUDIT_MESSAGE_LENGTH
-#define MAX_AUDIT_MESSAGE_LENGTH 8970
-#endif
-
-#ifndef AUDIT_NLGRP_MAX
-#define AUDIT_NLGRP_READLOG 1
-#endif
-
 #ifndef RENAME_NOREPLACE
 #define RENAME_NOREPLACE (1 << 0)
 #endif
@@ -280,6 +259,7 @@ struct sockaddr_vm {
 #define TASK_COMM_LEN 16
 #endif
 
+#include "missing_audit.h"
 #include "missing_btrfs_tree.h"
 #include "missing_capability.h"
 #include "missing_input.h"
diff --git a/src/basic/missing_audit.h b/src/basic/missing_audit.h
new file mode 100644 (file)
index 0000000..b00d537
--- /dev/null
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
+#pragma once
+
+#include <linux/audit.h>
+
+#if HAVE_AUDIT
+#include <libaudit.h>
+#endif
+
+#ifndef AUDIT_SERVICE_START
+#define AUDIT_SERVICE_START 1130 /* Service (daemon) start */
+#endif
+
+#ifndef AUDIT_SERVICE_STOP
+#define AUDIT_SERVICE_STOP 1131 /* Service (daemon) stop */
+#endif
+
+#ifndef MAX_AUDIT_MESSAGE_LENGTH
+#define MAX_AUDIT_MESSAGE_LENGTH 8970
+#endif
+
+#ifndef AUDIT_NLGRP_MAX
+#define AUDIT_NLGRP_READLOG 1
+#endif