mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-02 15:25:27 +00:00
parser: move ifdefs for capabilities to single common file
Unfortunately the parser was doing ifdef checks for capabilities in two places. Move all the capability ifdefs into capability.h MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/768 Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Georgia Garcia <georgia.garcia@canonical.com>
This commit is contained in:
@@ -19,8 +19,24 @@
|
|||||||
#ifndef __AA_CAPABILITY_H
|
#ifndef __AA_CAPABILITY_H
|
||||||
#define __AA_CAPABILITY_H
|
#define __AA_CAPABILITY_H
|
||||||
|
|
||||||
|
#include <linux/capability.h>
|
||||||
|
|
||||||
#define NO_BACKMAP_CAP 0xff
|
#define NO_BACKMAP_CAP 0xff
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef CAP_AUDIT_WRITE
|
||||||
|
#define CAP_AUDIT_WRITE 29
|
||||||
|
#endif
|
||||||
|
#ifndef CAP_AUDIT_CONTROL
|
||||||
|
#define CAP_AUDIT_CONTROL 30
|
||||||
|
#endif
|
||||||
|
#ifndef CAP_SETFCAP
|
||||||
|
#define CAP_SETFCAP 31
|
||||||
|
#endif
|
||||||
|
#ifndef CAP_MAC_OVERRIDE
|
||||||
|
#define CAP_MAC_OVERRIDE 32
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef CAP_PERFMON
|
#ifndef CAP_PERFMON
|
||||||
#define CAP_PERFMON 38
|
#define CAP_PERFMON 38
|
||||||
#endif
|
#endif
|
||||||
|
@@ -44,20 +44,6 @@
|
|||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#include <linux/capability.h>
|
|
||||||
|
|
||||||
#ifndef CAP_AUDIT_WRITE
|
|
||||||
#define CAP_AUDIT_WRITE 29
|
|
||||||
#endif
|
|
||||||
#ifndef CAP_AUDIT_CONTROL
|
|
||||||
#define CAP_AUDIT_CONTROL 30
|
|
||||||
#endif
|
|
||||||
#ifndef CAP_SETFCAP
|
|
||||||
#define CAP_SETFCAP 31
|
|
||||||
#endif
|
|
||||||
#ifndef CAP_MAC_OVERRIDE
|
|
||||||
#define CAP_MAC_OVERRIDE 32
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define CIDR_32 htonl(0xffffffff)
|
#define CIDR_32 htonl(0xffffffff)
|
||||||
#define CIDR_24 htonl(0xffffff00)
|
#define CIDR_24 htonl(0xffffff00)
|
||||||
|
Reference in New Issue
Block a user