1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * AppArmor security module 4 * 5 * This file contains AppArmor basic global 6 * 7 * Copyright (C) 1998-2008 Novell/SUSE 8 * Copyright 2009-2017 Canonical Ltd. 9 */ 10 11 #ifndef __APPARMOR_H 12 #define __APPARMOR_H 13 14 #include <linux/types.h> 15 16 /* 17 * Class of mediation types in the AppArmor policy db 18 */ 19 #define AA_CLASS_NONE 0 20 #define AA_CLASS_UNKNOWN 1 21 #define AA_CLASS_FILE 2 22 #define AA_CLASS_CAP 3 23 #define AA_CLASS_DEPRECATED 4 24 #define AA_CLASS_RLIMITS 5 25 #define AA_CLASS_DOMAIN 6 26 #define AA_CLASS_MOUNT 7 27 #define AA_CLASS_PTRACE 9 28 #define AA_CLASS_SIGNAL 10 29 #define AA_CLASS_XMATCH 11 30 #define AA_CLASS_NET 14 31 #define AA_CLASS_LABEL 16 32 #define AA_CLASS_POSIX_MQUEUE 17 33 #define AA_CLASS_IO_URING 18 34 #define AA_CLASS_MODULE 19 35 #define AA_CLASS_DISPLAY_LSM 20 36 37 #define AA_CLASS_X 31 38 #define AA_CLASS_DBUS 32 39 40 #define AA_CLASS_LAST AA_CLASS_DBUS 41 42 /* Control parameters settable through module/boot flags */ 43 extern enum audit_mode aa_g_audit; 44 extern bool aa_g_audit_header; 45 extern bool aa_g_debug; 46 extern bool aa_g_hash_policy; 47 extern bool aa_g_export_binary; 48 extern int aa_g_rawdata_compression_level; 49 extern bool aa_g_lock_policy; 50 extern bool aa_g_logsyscall; 51 extern bool aa_g_paranoid_load; 52 extern unsigned int aa_g_path_max; 53 54 #ifdef CONFIG_SECURITY_APPARMOR_EXPORT_BINARY 55 #define AA_MIN_CLEVEL zstd_min_clevel() 56 #define AA_MAX_CLEVEL zstd_max_clevel() 57 #define AA_DEFAULT_CLEVEL ZSTD_CLEVEL_DEFAULT 58 #else 59 #define AA_MIN_CLEVEL 0 60 #define AA_MAX_CLEVEL 0 61 #define AA_DEFAULT_CLEVEL 0 62 #endif /* CONFIG_SECURITY_APPARMOR_EXPORT_BINARY */ 63 64 65 #endif /* __APPARMOR_H */ 66