summaryrefslogtreecommitdiffstats
path: root/security/apparmor/include/apparmorfs.h
diff options
context:
space:
mode:
authorJohn Johansen2017-05-27 01:27:58 +0200
committerJohn Johansen2017-06-11 02:11:27 +0200
commitd9bf2c268be6064ae0c9980e4c37fdd262c7effc (patch)
tree2899522e36e8d9d2cac79678647fcf6ecc36ca1d /security/apparmor/include/apparmorfs.h
parentapparmor: provide finer control over policy management (diff)
downloadkernel-qcow2-linux-d9bf2c268be6064ae0c9980e4c37fdd262c7effc.tar.gz
kernel-qcow2-linux-d9bf2c268be6064ae0c9980e4c37fdd262c7effc.tar.xz
kernel-qcow2-linux-d9bf2c268be6064ae0c9980e4c37fdd262c7effc.zip
apparmor: add policy revision file interface
Add a policy revision file to find the current revision of a ns's policy. There is a revision file per ns, as well as a virtualized global revision file in the base apparmor fs directory. The global revision file when opened will provide the revision of the opening task namespace. The revision file can be waited on via select/poll to detect apparmor policy changes from the last read revision of the opened file. This means that the revision file must be read after the select/poll other wise update data will remain ready for reading. Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/include/apparmorfs.h')
-rw-r--r--security/apparmor/include/apparmorfs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/apparmor/include/apparmorfs.h b/security/apparmor/include/apparmorfs.h
index 071a59a1f056..bd689114bf93 100644
--- a/security/apparmor/include/apparmorfs.h
+++ b/security/apparmor/include/apparmorfs.h
@@ -74,6 +74,7 @@ enum aafs_ns_type {
AAFS_NS_LOAD,
AAFS_NS_REPLACE,
AAFS_NS_REMOVE,
+ AAFS_NS_REVISION,
AAFS_NS_COUNT,
AAFS_NS_MAX_COUNT,
AAFS_NS_SIZE,
@@ -102,6 +103,7 @@ enum aafs_prof_type {
#define ns_subload(X) ((X)->dents[AAFS_NS_LOAD])
#define ns_subreplace(X) ((X)->dents[AAFS_NS_REPLACE])
#define ns_subremove(X) ((X)->dents[AAFS_NS_REMOVE])
+#define ns_subrevision(X) ((X)->dents[AAFS_NS_REVISION])
#define prof_dir(X) ((X)->dents[AAFS_PROF_DIR])
#define prof_child_dir(X) ((X)->dents[AAFS_PROF_PROFS])