| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * AppArmor security module |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Copyright (C) 1998-2008 Novell/SUSE |
|---|
| 7 | 8 | * Copyright 2009-2010 Canonical Ltd. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or |
|---|
| 10 | | - * modify it under the terms of the GNU General Public License as |
|---|
| 11 | | - * published by the Free Software Foundation, version 2 of the |
|---|
| 12 | | - * License. |
|---|
| 13 | 9 | */ |
|---|
| 14 | 10 | |
|---|
| 15 | 11 | #ifndef __POLICY_INTERFACE_H |
|---|
| .. | .. |
|---|
| 45 | 41 | AAFS_LOADDATA_REVISION, |
|---|
| 46 | 42 | AAFS_LOADDATA_HASH, |
|---|
| 47 | 43 | AAFS_LOADDATA_DATA, |
|---|
| 44 | + AAFS_LOADDATA_COMPRESSED_SIZE, |
|---|
| 48 | 45 | AAFS_LOADDATA_DIR, /* must be last actual entry */ |
|---|
| 49 | 46 | AAFS_LOADDATA_NDENTS /* count of entries */ |
|---|
| 50 | 47 | }; |
|---|
| .. | .. |
|---|
| 65 | 62 | struct dentry *dents[AAFS_LOADDATA_NDENTS]; |
|---|
| 66 | 63 | struct aa_ns *ns; |
|---|
| 67 | 64 | char *name; |
|---|
| 68 | | - size_t size; |
|---|
| 65 | + size_t size; /* the original size of the payload */ |
|---|
| 66 | + size_t compressed_size; /* the compressed size of the payload */ |
|---|
| 69 | 67 | long revision; /* the ns policy revision this caused */ |
|---|
| 70 | 68 | int abi; |
|---|
| 71 | 69 | unsigned char *hash; |
|---|
| 72 | 70 | |
|---|
| 71 | + /* Pointer to payload. If @compressed_size > 0, then this is the |
|---|
| 72 | + * compressed version of the payload, else it is the uncompressed |
|---|
| 73 | + * version (with the size indicated by @size). |
|---|
| 74 | + */ |
|---|
| 73 | 75 | char *data; |
|---|
| 74 | 76 | }; |
|---|
| 75 | 77 | |
|---|