hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/security/apparmor/include/lib.h
....@@ -1,14 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * AppArmor security module
34 *
45 * This file contains AppArmor lib definitions
56 *
67 * 2017 Canonical Ltd.
7
- *
8
- * This program is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU General Public License as
10
- * published by the Free Software Foundation, version 2 of the
11
- * License.
128 */
139
1410 #ifndef __AA_LIB_H
....@@ -16,6 +12,7 @@
1612
1713 #include <linux/slab.h>
1814 #include <linux/fs.h>
15
+#include <linux/lsm_hooks.h>
1916
2017 #include "match.h"
2118
....@@ -25,6 +22,11 @@
2522 */
2623
2724 #define DEBUG_ON (aa_g_debug)
25
+/*
26
+ * split individual debug cases out in preparation for finer grained
27
+ * debug controls in the future.
28
+ */
29
+#define AA_DEBUG_LABEL DEBUG_ON
2830 #define dbg_printk(__fmt, __args...) pr_debug(__fmt, ##__args)
2931 #define AA_DEBUG(fmt, args...) \
3032 do { \
....@@ -55,6 +57,9 @@
5557 size_t *ns_len);
5658 void aa_info_message(const char *str);
5759
60
+/* Security blob offsets */
61
+extern struct lsm_blob_sizes apparmor_blob_sizes;
62
+
5863 /**
5964 * aa_strneq - compare null terminated @str to a non null terminated substring
6065 * @str: a null terminated string