From 0e7117d00161a96166e1e2e920c0f358ed19930f Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 6 Dec 2018 06:34:04 +0100 Subject: [PATCH] missing: move audit related definitions to missing_audit.h --- src/basic/meson.build | 1 + src/basic/missing.h | 22 +--------------------- src/basic/missing_audit.h | 24 ++++++++++++++++++++++++ 3 files changed, 26 insertions(+), 21 deletions(-) create mode 100644 src/basic/missing_audit.h diff --git a/src/basic/meson.build b/src/basic/meson.build index 153a38f..4713c1d 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build @@ -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 diff --git a/src/basic/missing.h b/src/basic/missing.h index 6519131..da10b10 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h @@ -6,17 +6,12 @@ #include #include #include -#include #include #include #include #include #include -#if HAVE_AUDIT -#include -#endif - #if HAVE_LINUX_VM_SOCKETS_H #include #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 index 0000000..b00d537 --- /dev/null +++ b/src/basic/missing_audit.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + +#include + +#if HAVE_AUDIT +#include +#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 -- 2.7.4