]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: don't ifdef seccomp-util.h, drop seccomp.h inclusion everywhere 28907/head
authorLennart Poettering <lennart@poettering.net>
Mon, 21 Aug 2023 16:48:19 +0000 (18:48 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 21 Aug 2023 16:50:29 +0000 (18:50 +0200)
seccomp-util.h doesn't need ifdeffing, hence don't. It has worked since
quite a while with HAVE_SECCOMP is off, hence use it everywhere.

Also drop explicit seccomp.h inclusion everywhere (which needs
HAVE_SECCOMP ifdeffery everywhere). seccomp-util.h includes it anyway,
automatically, which we can just rely on, and it deals with HAVE_SECCOMP
at one central place.

src/analyze/analyze-security.c
src/core/dbus-execute.c
src/core/execute.c
src/core/load-fragment.c
src/core/main.c
src/nspawn/nspawn-oci.c
src/nspawn/nspawn-seccomp.c
src/nspawn/nspawn-settings.h
src/nspawn/nspawn.c
src/shared/bus-unit-util.c
src/test/test-execute.c

index 5408cfdeaabf099eaf4ec71932fef096e858e167..fb743a895f381d84c277609ca6332396d768bb3a 100644 (file)
@@ -27,9 +27,7 @@
 #include "parse-util.h"
 #include "path-util.h"
 #include "pretty-print.h"
-#if HAVE_SECCOMP
-#  include "seccomp-util.h"
-#endif
+#include "seccomp-util.h"
 #include "service.h"
 #include "set.h"
 #include "stdio-util.h"
index 52964390ae85fa4069694cd3eba7bb1db415db98..395051e57f791350a65ee1096dbcd0729358d6d6 100644 (file)
@@ -2,11 +2,6 @@
 
 #include <sys/mount.h>
 #include <sys/prctl.h>
-
-#if HAVE_SECCOMP
-#include <seccomp.h>
-#endif
-
 #include "af-list.h"
 #include "alloc-util.h"
 #include "bus-get-properties.h"
@@ -37,9 +32,7 @@
 #include "pcre2-util.h"
 #include "process-util.h"
 #include "rlimit-util.h"
-#if HAVE_SECCOMP
 #include "seccomp-util.h"
-#endif
 #include "securebits-util.h"
 #include "specifier.h"
 #include "stat-util.h"
index f9761b7239e5814208cecac9737437aa8e7821ee..5ffb088aee1efd98d6bbb6940de5eecbcd61bd8c 100644 (file)
 #include <selinux/selinux.h>
 #endif
 
-#if HAVE_SECCOMP
-#include <seccomp.h>
-#endif
-
 #if HAVE_APPARMOR
 #include <sys/apparmor.h>
 #endif
@@ -93,9 +89,7 @@
 #include "recurse-dir.h"
 #include "rlimit-util.h"
 #include "rm-rf.h"
-#if HAVE_SECCOMP
 #include "seccomp-util.h"
-#endif
 #include "securebits-util.h"
 #include "selinux-util.h"
 #include "signal-util.h"
index ceca070e797fb008bad4978529137395592fd1ed..9d1fd0f7a71224391e216473fc060d27d84ca65c 100644 (file)
@@ -7,9 +7,6 @@
 #include <fcntl.h>
 #include <linux/fs.h>
 #include <linux/oom.h>
-#if HAVE_SECCOMP
-#include <seccomp.h>
-#endif
 #include <sched.h>
 #include <sys/resource.h>
 
@@ -56,9 +53,7 @@
 #include "pcre2-util.h"
 #include "percent-util.h"
 #include "process-util.h"
-#if HAVE_SECCOMP
 #include "seccomp-util.h"
-#endif
 #include "securebits-util.h"
 #include "selinux-util.h"
 #include "signal-util.h"
index c09f922700e84ad3d5266c68eeafcc055d1c7c7e..df9cfa21aad95fb4e3c61d7cea5351abf81990c9 100644 (file)
@@ -8,9 +8,6 @@
 #include <sys/prctl.h>
 #include <sys/utsname.h>
 #include <unistd.h>
-#if HAVE_SECCOMP
-#include <seccomp.h>
-#endif
 #if HAVE_VALGRIND_VALGRIND_H
 #  include <valgrind/valgrind.h>
 #endif
@@ -82,9 +79,7 @@
 #include "psi-util.h"
 #include "random-util.h"
 #include "rlimit-util.h"
-#if HAVE_SECCOMP
 #include "seccomp-util.h"
-#endif
 #include "selinux-setup.h"
 #include "selinux-util.h"
 #include "signal-util.h"
index a4eda80ea0b191fec570e1aaefbb1b1e90f2c143..5bdfebde7824c7e534afab34262f3b7460d42adb 100644 (file)
@@ -1,9 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/oom.h>
-#if HAVE_SECCOMP
-#include <seccomp.h>
-#endif
 
 #include "bus-util.h"
 #include "cap-list.h"
@@ -19,9 +16,7 @@
 #include "nspawn-oci.h"
 #include "path-util.h"
 #include "rlimit-util.h"
-#if HAVE_SECCOMP
 #include "seccomp-util.h"
-#endif
 #include "stdio-util.h"
 #include "string-util.h"
 #include "strv.h"
index 5f45f367d0a52c728c1d1bebd8025098994f7c5d..34a8627848259986c349865aaa35a4a6d4df91a4 100644 (file)
@@ -6,16 +6,10 @@
 #include <sys/socket.h>
 #include <sys/types.h>
 
-#if HAVE_SECCOMP
-#include <seccomp.h>
-#endif
-
 #include "alloc-util.h"
 #include "log.h"
 #include "nspawn-seccomp.h"
-#if HAVE_SECCOMP
 #include "seccomp-util.h"
-#endif
 #include "string-util.h"
 #include "strv.h"
 
index 0a3d975364954113fffc936f94346cc143f51eb1..8edf8a3552279a246401186b38b00d0a7f7f7137 100644 (file)
@@ -4,10 +4,6 @@
 #include <sched.h>
 #include <stdio.h>
 
-#if HAVE_SECCOMP
-#include <seccomp.h>
-#endif
-
 #include "sd-bus.h"
 #include "sd-id128.h"
 
@@ -18,6 +14,7 @@
 #include "missing_resource.h"
 #include "nspawn-expose-ports.h"
 #include "nspawn-mount.h"
+#include "seccomp-util.h"
 #include "time-util.h"
 
 typedef enum StartMode {
index e614b05c83d73f62774a799b51162d92ffb9d8b7..d3ae547746a060be6a1300083e4574d8eda9673f 100644 (file)
@@ -96,9 +96,7 @@
 #include "resolve-util.h"
 #include "rlimit-util.h"
 #include "rm-rf.h"
-#if HAVE_SECCOMP
 #include "seccomp-util.h"
-#endif
 #include "selinux-util.h"
 #include "signal-util.h"
 #include "socket-util.h"
index 6ea5e138e0754f096e5c35fcccbd16ad754d853e..ad1957d9d741fbce74a88da405db436c3abdd324 100644 (file)
@@ -37,9 +37,7 @@
 #include "percent-util.h"
 #include "process-util.h"
 #include "rlimit-util.h"
-#if HAVE_SECCOMP
 #include "seccomp-util.h"
-#endif
 #include "securebits-util.h"
 #include "signal-util.h"
 #include "socket-util.h"
index 2316d2b61519e2a4647e5a20278ecfb89f9ddd81..0be66c2c7bf0f5649800c288d1e715977c47647e 100644 (file)
@@ -23,9 +23,7 @@
 #include "path-util.h"
 #include "process-util.h"
 #include "rm-rf.h"
-#if HAVE_SECCOMP
 #include "seccomp-util.h"
-#endif
 #include "service.h"
 #include "signal-util.h"
 #include "static-destruct.h"