Message ID | 20220914074607.194838-1-xiujianfeng@huawei.com (mailing list archive) |
---|---|
State | Handled Elsewhere |
Headers | show |
Series | apparmor: make __aa_path_perm() static | expand |
On 9/14/22 00:46, Xiu Jianfeng wrote: > Make __aa_path_perm() static as it's only used inside apparmor/file.c. > > Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com> Acked-by: John Johansen <john.johansen@canonical.com> > --- > security/apparmor/file.c | 6 +++--- > security/apparmor/include/file.h | 3 --- > 2 files changed, 3 insertions(+), 6 deletions(-) > > diff --git a/security/apparmor/file.c b/security/apparmor/file.c > index e1b7e93602e4..14f7d7ef3f54 100644 > --- a/security/apparmor/file.c > +++ b/security/apparmor/file.c > @@ -265,9 +265,9 @@ unsigned int aa_str_perms(struct aa_dfa *dfa, unsigned int start, > return state; > } > > -int __aa_path_perm(const char *op, struct aa_profile *profile, const char *name, > - u32 request, struct path_cond *cond, int flags, > - struct aa_perms *perms) > +static int __aa_path_perm(const char *op, struct aa_profile *profile, const char *name, > + u32 request, struct path_cond *cond, int flags, > + struct aa_perms *perms) > { > int e = 0; > > diff --git a/security/apparmor/include/file.h b/security/apparmor/include/file.h > index 029cb20e322d..17dca3502230 100644 > --- a/security/apparmor/include/file.h > +++ b/security/apparmor/include/file.h > @@ -189,9 +189,6 @@ unsigned int aa_str_perms(struct aa_dfa *dfa, unsigned int start, > const char *name, struct path_cond *cond, > struct aa_perms *perms); > > -int __aa_path_perm(const char *op, struct aa_profile *profile, > - const char *name, u32 request, struct path_cond *cond, > - int flags, struct aa_perms *perms); > int aa_path_perm(const char *op, struct aa_label *label, > const struct path *path, int flags, u32 request, > struct path_cond *cond);
diff --git a/security/apparmor/file.c b/security/apparmor/file.c index e1b7e93602e4..14f7d7ef3f54 100644 --- a/security/apparmor/file.c +++ b/security/apparmor/file.c @@ -265,9 +265,9 @@ unsigned int aa_str_perms(struct aa_dfa *dfa, unsigned int start, return state; } -int __aa_path_perm(const char *op, struct aa_profile *profile, const char *name, - u32 request, struct path_cond *cond, int flags, - struct aa_perms *perms) +static int __aa_path_perm(const char *op, struct aa_profile *profile, const char *name, + u32 request, struct path_cond *cond, int flags, + struct aa_perms *perms) { int e = 0; diff --git a/security/apparmor/include/file.h b/security/apparmor/include/file.h index 029cb20e322d..17dca3502230 100644 --- a/security/apparmor/include/file.h +++ b/security/apparmor/include/file.h @@ -189,9 +189,6 @@ unsigned int aa_str_perms(struct aa_dfa *dfa, unsigned int start, const char *name, struct path_cond *cond, struct aa_perms *perms); -int __aa_path_perm(const char *op, struct aa_profile *profile, - const char *name, u32 request, struct path_cond *cond, - int flags, struct aa_perms *perms); int aa_path_perm(const char *op, struct aa_label *label, const struct path *path, int flags, u32 request, struct path_cond *cond);
Make __aa_path_perm() static as it's only used inside apparmor/file.c. Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com> --- security/apparmor/file.c | 6 +++--- security/apparmor/include/file.h | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-)