diff --git a/src/lxc/caps.c b/src/lxc/caps.c index 1c8c03bd6..c56fe732e 100644 --- a/src/lxc/caps.c +++ b/src/lxc/caps.c @@ -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; diff --git a/src/lxc/macro.h b/src/lxc/macro.h index e19b31632..8bad2d89d 100644 --- a/src/lxc/macro.h +++ b/src/lxc/macro.h @@ -65,10 +65,35 @@ #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