]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
missing: move prctl related entries to missing_prctl.h
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 4 Dec 2018 06:57:41 +0000 (07:57 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 4 Dec 2018 07:34:46 +0000 (08:34 +0100)
src/basic/meson.build
src/basic/missing.h
src/basic/missing_prctl.h [new file with mode: 0644]

index 5d03c68a07c992e45048f38ff6b869f83208fd16..43ce25cb64081b0433e5e537abe8b738ccb07e81 100644 (file)
@@ -103,6 +103,7 @@ basic_sources = files('''
         missing_keyctl.h
         missing_magic.h
         missing_network.h
+        missing_prctl.h
         missing_securebits.h
         missing_stat.h
         missing_syscall.h
index c35621cf2babcb1bfad924253b6a8e04c5174a56..fdf8d4105c1ffd7888704b8a89b1bc5dc9691764 100644 (file)
@@ -186,30 +186,6 @@ struct sockaddr_vm {
 #define SCM_SECURITY 0x03
 #endif
 
-#ifndef PR_SET_NO_NEW_PRIVS
-#define PR_SET_NO_NEW_PRIVS 38
-#endif
-
-#ifndef PR_SET_CHILD_SUBREAPER
-#define PR_SET_CHILD_SUBREAPER 36
-#endif
-
-#ifndef PR_SET_MM_ARG_START
-#define PR_SET_MM_ARG_START 8
-#endif
-
-#ifndef PR_SET_MM_ARG_END
-#define PR_SET_MM_ARG_END 9
-#endif
-
-#ifndef PR_SET_MM_ENV_START
-#define PR_SET_MM_ENV_START 10
-#endif
-
-#ifndef PR_SET_MM_ENV_END
-#define PR_SET_MM_ENV_END 11
-#endif
-
 #ifndef DM_DEFERRED_REMOVE
 #define DM_DEFERRED_REMOVE (1 << 17)
 #endif
@@ -327,22 +303,6 @@ struct sockaddr_vm {
 #define KCMP_FILE 0
 #endif
 
-#ifndef PR_CAP_AMBIENT
-#define PR_CAP_AMBIENT 47
-#endif
-
-#ifndef PR_CAP_AMBIENT_IS_SET
-#define PR_CAP_AMBIENT_IS_SET 1
-#endif
-
-#ifndef PR_CAP_AMBIENT_RAISE
-#define PR_CAP_AMBIENT_RAISE 2
-#endif
-
-#ifndef PR_CAP_AMBIENT_CLEAR_ALL
-#define PR_CAP_AMBIENT_CLEAR_ALL 4
-#endif
-
 #if !HAVE_CHAR32_T
 #define char32_t uint32_t
 #endif
@@ -394,5 +354,6 @@ struct sockaddr_vm {
 #include "missing_input.h"
 #include "missing_magic.h"
 #include "missing_network.h"
+#include "missing_prctl.h"
 
 #include "missing_syscall.h"
diff --git a/src/basic/missing_prctl.h b/src/basic/missing_prctl.h
new file mode 100644 (file)
index 0000000..f80cd17
--- /dev/null
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
+#pragma once
+
+#include <linux/prctl.h>
+
+/* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */
+#ifndef PR_CAP_AMBIENT
+#define PR_CAP_AMBIENT 47
+
+#define PR_CAP_AMBIENT_IS_SET    1
+#define PR_CAP_AMBIENT_RAISE     2
+#define PR_CAP_AMBIENT_LOWER     3
+#define PR_CAP_AMBIENT_CLEAR_ALL 4
+#endif