Skip to content

Commit

Permalink
macro: define all capabilities
Browse files Browse the repository at this point in the history
Fixes: #3612
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Jan 4, 2021
1 parent 7b4cd46 commit fa934e3
Showing 1 changed file with 119 additions and 15 deletions.
134 changes: 119 additions & 15 deletions src/lxc/macro.h
Expand Up @@ -37,64 +37,168 @@
#endif

/* capabilities */
#ifndef CAP_CHOWN
#define CAP_CHOWN 0
#endif

#ifndef CAP_DAC_OVERRIDE
#define CAP_DAC_OVERRIDE 1
#endif

#ifndef CAP_DAC_READ_SEARCH
#define CAP_DAC_READ_SEARCH 2
#endif

#ifndef CAP_FOWNER
#define CAP_FOWNER 3
#endif

#ifndef CAP_FSETID
#define CAP_FSETID 4
#endif

#ifndef CAP_KILL
#define CAP_KILL 5
#endif

#ifndef CAP_SETGID
#define CAP_SETGID 6
#define CAP_SETGID 6
#endif

#ifndef CAP_SETUID
#define CAP_SETUID 7
#define CAP_SETUID 7
#endif

#ifndef CAP_SETPCAP
#define CAP_SETPCAP 8
#endif

#ifndef CAP_LINUX_IMMUTABLE
#define CAP_LINUX_IMMUTABLE 9
#endif

#ifndef CAP_NET_BIND_SERVICE
#define CAP_NET_BIND_SERVICE 10
#endif

#ifndef CAP_NET_BROADCAST
#define CAP_NET_BROADCAST 11
#endif

#ifndef CAP_NET_ADMIN
#define CAP_NET_ADMIN 12
#endif

#ifndef CAP_NET_RAW
#define CAP_NET_RAW 13
#endif

#ifndef CAP_IPC_LOCK
#define CAP_IPC_LOCK 14
#endif

#ifndef CAP_IPC_OWNER
#define CAP_IPC_OWNER 15
#endif

#ifndef CAP_SYS_MODULE
#define CAP_SYS_MODULE 16
#endif

#ifndef CAP_SYS_RAWIO
#define CAP_SYS_RAWIO 17
#endif

#ifndef CAP_SYS_CHROOT
#define CAP_SYS_CHROOT 18
#endif

#ifndef CAP_SYS_PTRACE
#define CAP_SYS_PTRACE 19
#endif

#ifndef CAP_SYS_PACCT
#define CAP_SYS_PACCT 20
#endif

#ifndef CAP_SYS_ADMIN
#define CAP_SYS_ADMIN 21
#define CAP_SYS_ADMIN 21
#endif

#ifndef CAP_SYS_BOOT
#define CAP_SYS_BOOT 22
#endif

#ifndef CAP_SYS_NICE
#define CAP_SYS_NICE 23
#endif

#ifndef CAP_SYS_RESOURCE
#define CAP_SYS_RESOURCE 24
#endif

#ifndef CAP_SYS_TIME
#define CAP_SYS_TIME 25
#endif

#ifndef CAP_SYS_TTY_CONFIG
#define CAP_SYS_TTY_CONFIG 26
#endif

#ifndef CAP_MKNOD
#define CAP_MKNOD 27
#endif

#ifndef CAP_LEASE
#define CAP_LEASE 28
#endif

#ifndef CAP_AUDIT_WRITE
#define CAP_AUDIT_WRITE 29
#define CAP_AUDIT_WRITE 29
#endif

#ifndef CAP_AUDIT_CONTROL
#define CAP_AUDIT_CONTROL 30
#define CAP_AUDIT_CONTROL 30
#endif

#ifndef CAP_SETFCAP
#define CAP_SETFCAP 31
#define CAP_SETFCAP 31
#endif

#ifndef CAP_MAC_OVERRIDE
#define CAP_MAC_OVERRIDE 32
#define CAP_MAC_OVERRIDE 32
#endif

#ifndef CAP_MAC_ADMIN
#define CAP_MAC_ADMIN 33
#define CAP_MAC_ADMIN 33
#endif

#ifndef CAP_SYSLOG
#define CAP_SYSLOG 34
#define CAP_SYSLOG 34
#endif

#ifndef CAP_WAKE_ALARM
#define CAP_WAKE_ALARM 35
#define CAP_WAKE_ALARM 35
#endif

#ifndef CAP_BLOCK_SUSPEND
#define CAP_BLOCK_SUSPEND 36
#define CAP_BLOCK_SUSPEND 36
#endif

#ifndef CAP_AUDIT_READ
#define CAP_AUDIT_READ 37
#define CAP_AUDIT_READ 37
#endif

#ifndef CAP_PERFMON
#define CAP_PERFMON 38
#define CAP_PERFMON 38
#endif

#ifndef CAP_BPF
#define CAP_BPF 39
#define CAP_BPF 39
#endif

#ifndef CAP_CHECKPOINT_RESTORE
#define CAP_CHECKPOINT_RESTORE 40
#define CAP_CHECKPOINT_RESTORE 40
#endif

/* prctl */
Expand Down

0 comments on commit fa934e3

Please sign in to comment.