hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/security/apparmor/include/policy_unpack.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * AppArmor security module
34 *
....@@ -5,11 +6,6 @@
56 *
67 * Copyright (C) 1998-2008 Novell/SUSE
78 * 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.
139 */
1410
1511 #ifndef __POLICY_INTERFACE_H
....@@ -45,6 +41,7 @@
4541 AAFS_LOADDATA_REVISION,
4642 AAFS_LOADDATA_HASH,
4743 AAFS_LOADDATA_DATA,
44
+ AAFS_LOADDATA_COMPRESSED_SIZE,
4845 AAFS_LOADDATA_DIR, /* must be last actual entry */
4946 AAFS_LOADDATA_NDENTS /* count of entries */
5047 };
....@@ -65,11 +62,16 @@
6562 struct dentry *dents[AAFS_LOADDATA_NDENTS];
6663 struct aa_ns *ns;
6764 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 */
6967 long revision; /* the ns policy revision this caused */
7068 int abi;
7169 unsigned char *hash;
7270
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
+ */
7375 char *data;
7476 };
7577