mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-26 22:11:46 +00:00
caps: move macros to macro header
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
3ef9b3d30f
commit
1f207a5cd9
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user