apparmor: advertise availability of exended perms
authorJohn Johansen <john.johansen@canonical.com>
Thu, 16 Mar 2023 23:04:17 +0000 (16:04 -0700)
committerJohn Johansen <john.johansen@canonical.com>
Mon, 10 Jul 2023 00:31:11 +0000 (17:31 -0700)
Userspace won't load policy using extended perms unless it knows the
kernel can handle them. Advertise that extended perms are supported in
the feature set.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Reviewed-by: Jon Tourville <jontourville@me.com>
security/apparmor/apparmorfs.c

index db7a51acf9dbd40b52bc42e0c3312ccc29327512..0e8d690c911bf6c3882e29b00baf212585fbd93e 100644 (file)
@@ -2348,11 +2348,14 @@ static struct aa_sfs_entry aa_sfs_entry_versions[] = {
        { }
 };
 
+#define PERMS32STR "allow deny subtree cond kill complain prompt audit quiet hide xindex tag label"
 static struct aa_sfs_entry aa_sfs_entry_policy[] = {
        AA_SFS_DIR("versions",                  aa_sfs_entry_versions),
        AA_SFS_FILE_BOOLEAN("set_load",         1),
        /* number of out of band transitions supported */
        AA_SFS_FILE_U64("outofband",            MAX_OOB_SUPPORTED),
+       AA_SFS_FILE_U64("permstable32_version", 1),
+       AA_SFS_FILE_STRING("permstable32", PERMS32STR),
        { }
 };