summaryrefslogtreecommitdiffstats
path: root/security/apparmor/policy_unpack.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2022-01-17 13:43:49 -0800
committerJohn Johansen <john.johansen@canonical.com>2022-10-03 14:49:03 -0700
commit33fc95d8293cfca352ac875668857293e22d7d51 (patch)
tree045b3ba1a1fb5d6e08845d650b19806c6f44f4d4 /security/apparmor/policy_unpack.c
parente844fe9b51c984472ea98be3b2d1201ba9ee3213 (diff)
downloadlinux-stable-33fc95d8293cfca352ac875668857293e22d7d51.tar.gz
linux-stable-33fc95d8293cfca352ac875668857293e22d7d51.tar.bz2
linux-stable-33fc95d8293cfca352ac875668857293e22d7d51.zip
apparmor: preparse for state being more than just an integer
Convert from an unsigned int to a state_t for state position. This is a step in prepping for the state position carrying some additional flags, and a limited form of backtracking to support variables. Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/policy_unpack.c')
-rw-r--r--security/apparmor/policy_unpack.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c
index 0917412ba48f..3ea591d31be7 100644
--- a/security/apparmor/policy_unpack.c
+++ b/security/apparmor/policy_unpack.c
@@ -698,7 +698,7 @@ static u32 map_old_perms(u32 old)
}
static void compute_fperms_allow(struct aa_perms *perms, struct aa_dfa *dfa,
- unsigned int state)
+ aa_state_t state)
{
perms->allow |= AA_MAY_GETATTR;
@@ -710,7 +710,7 @@ static void compute_fperms_allow(struct aa_perms *perms, struct aa_dfa *dfa,
}
static struct aa_perms compute_fperms_user(struct aa_dfa *dfa,
- unsigned int state)
+ aa_state_t state)
{
struct aa_perms perms = { };
@@ -725,7 +725,7 @@ static struct aa_perms compute_fperms_user(struct aa_dfa *dfa,
}
static struct aa_perms compute_fperms_other(struct aa_dfa *dfa,
- unsigned int state)
+ aa_state_t state)
{
struct aa_perms perms = { };
@@ -748,8 +748,8 @@ static struct aa_perms compute_fperms_other(struct aa_dfa *dfa,
*/
static struct aa_perms *compute_fperms(struct aa_dfa *dfa)
{
- int state;
- int state_count;
+ aa_state_t state;
+ unsigned int state_count;
struct aa_perms *table;
AA_BUG(!dfa);
@@ -796,7 +796,7 @@ static u32 map_other(u32 x)
}
static struct aa_perms compute_perms_entry(struct aa_dfa *dfa,
- unsigned int state)
+ aa_state_t state)
{
struct aa_perms perms = { };
@@ -817,8 +817,8 @@ static struct aa_perms compute_perms_entry(struct aa_dfa *dfa,
static struct aa_perms *compute_perms(struct aa_dfa *dfa)
{
- int state;
- int state_count;
+ unsigned int state;
+ unsigned int state_count;
struct aa_perms *table;
AA_BUG(!dfa);