]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
caps: move macros to macro header
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 26 Aug 2018 23:01:47 +0000 (01:01 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 28 Aug 2018 18:22:24 +0000 (20:22 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/caps.c
src/lxc/macro.h

index 1c8c03bd6b6e7a8f6b14663da6ff3c4c117caf95..c56fe732eb7b6912f3dc2605daa97fb1bc88b2c4 100644 (file)
@@ -39,31 +39,6 @@ lxc_log_define(caps, lxc);
 
 #if HAVE_LIBCAP
 
-#ifndef PR_CAPBSET_READ
-#define PR_CAPBSET_READ 23
-#endif
-
-/* Control the ambient capability set */
-#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_LOWER
-#define PR_CAP_AMBIENT_LOWER 3
-#endif
-
-#ifndef PR_CAP_AMBIENT_CLEAR_ALL
-#define PR_CAP_AMBIENT_CLEAR_ALL 4
-#endif
-
 int lxc_caps_down(void)
 {
        cap_t caps;
index e19b31632a662dc393e480c2009db928a23b71c6..8bad2d89dd1f402080389748d81b9c8bc09bf162 100644 (file)
 #endif
 
 /* prctl */
+#ifndef PR_CAPBSET_READ
+#define PR_CAPBSET_READ 23
+#endif
+
 #ifndef PR_CAPBSET_DROP
 #define PR_CAPBSET_DROP 24
 #endif
 
+/* Control the ambient capability set */
+#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_LOWER
+#define PR_CAP_AMBIENT_LOWER 3
+#endif
+
+#ifndef PR_CAP_AMBIENT_CLEAR_ALL
+#define PR_CAP_AMBIENT_CLEAR_ALL 4
+#endif
+
 #ifndef PR_SET_NO_NEW_PRIVS
 #define PR_SET_NO_NEW_PRIVS 38
 #endif