diff options
author | John Johansen <john.johansen@canonical.com> | 2017-06-09 20:36:48 +0200 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2017-06-11 02:11:36 +0200 |
commit | df8073c67fd8acb7e79f203ba4c0fa456bb82762 (patch) | |
tree | f2f3424c1ee0219162c9f8b4835826c5d71e6498 /security/apparmor/include | |
parent | apparmor: cleanup remove unused and not fully implemented profile rename (diff) | |
download | linux-df8073c67fd8acb7e79f203ba4c0fa456bb82762.tar.xz linux-df8073c67fd8acb7e79f203ba4c0fa456bb82762.zip |
apparmor: convert aa_change_XXX bool parameters to flags
Instead of passing multiple booleans consolidate on a single flags
field.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/include')
-rw-r--r-- | security/apparmor/include/domain.h | 10 | ||||
-rw-r--r-- | security/apparmor/include/procattr.h | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/security/apparmor/include/domain.h b/security/apparmor/include/domain.h index 6587c4abb7e8..255aa40ec1d1 100644 --- a/security/apparmor/include/domain.h +++ b/security/apparmor/include/domain.h @@ -23,12 +23,16 @@ struct aa_domain { char **table; }; +#define AA_CHANGE_NOFLAGS 0 +#define AA_CHANGE_TEST 1 +#define AA_CHANGE_CHILD 2 +#define AA_CHANGE_ONEXEC 4 + int apparmor_bprm_set_creds(struct linux_binprm *bprm); int apparmor_bprm_secureexec(struct linux_binprm *bprm); void aa_free_domain_entries(struct aa_domain *domain); -int aa_change_hat(const char *hats[], int count, u64 token, bool permtest); -int aa_change_profile(const char *fqname, bool onexec, bool permtest, - bool stack); +int aa_change_hat(const char *hats[], int count, u64 token, int flags); +int aa_change_profile(const char *fqname, int flags); #endif /* __AA_DOMAIN_H */ diff --git a/security/apparmor/include/procattr.h b/security/apparmor/include/procattr.h index 6bd5f33d9533..c0055d727868 100644 --- a/security/apparmor/include/procattr.h +++ b/security/apparmor/include/procattr.h @@ -15,11 +15,7 @@ #ifndef __AA_PROCATTR_H #define __AA_PROCATTR_H -#define AA_DO_TEST 1 -#define AA_ONEXEC 1 - int aa_getprocattr(struct aa_profile *profile, char **string); -int aa_setprocattr_changehat(char *args, size_t size, int test); -int aa_setprocattr_changeprofile(char *fqname, bool onexec, int test); +int aa_setprocattr_changehat(char *args, size_t size, int flags); #endif /* __AA_PROCATTR_H */ |