| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * AppArmor security module |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * This file contains AppArmor lib definitions |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * 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. |
|---|
| 12 | 8 | */ |
|---|
| 13 | 9 | |
|---|
| 14 | 10 | #ifndef __AA_LIB_H |
|---|
| .. | .. |
|---|
| 16 | 12 | |
|---|
| 17 | 13 | #include <linux/slab.h> |
|---|
| 18 | 14 | #include <linux/fs.h> |
|---|
| 15 | +#include <linux/lsm_hooks.h> |
|---|
| 19 | 16 | |
|---|
| 20 | 17 | #include "match.h" |
|---|
| 21 | 18 | |
|---|
| .. | .. |
|---|
| 25 | 22 | */ |
|---|
| 26 | 23 | |
|---|
| 27 | 24 | #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 |
|---|
| 28 | 30 | #define dbg_printk(__fmt, __args...) pr_debug(__fmt, ##__args) |
|---|
| 29 | 31 | #define AA_DEBUG(fmt, args...) \ |
|---|
| 30 | 32 | do { \ |
|---|
| .. | .. |
|---|
| 55 | 57 | size_t *ns_len); |
|---|
| 56 | 58 | void aa_info_message(const char *str); |
|---|
| 57 | 59 | |
|---|
| 60 | +/* Security blob offsets */ |
|---|
| 61 | +extern struct lsm_blob_sizes apparmor_blob_sizes; |
|---|
| 62 | + |
|---|
| 58 | 63 | /** |
|---|
| 59 | 64 | * aa_strneq - compare null terminated @str to a non null terminated substring |
|---|
| 60 | 65 | * @str: a null terminated string |
|---|