diff options
author | Paul Moore <paul@paul-moore.com> | 2022-11-08 21:01:19 +0300 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2022-11-09 19:00:49 +0300 |
commit | 048be156491ff1aeb0fe5ff0862644d38cd39015 (patch) | |
tree | 8201a4ebe4bcc2dbdf95eef34761db08e25f3132 /security/selinux/ss/services.h | |
parent | e0d8259355cb846f9cf2e38f6ba3430aecb9ebcc (diff) | |
download | linux-048be156491ff1aeb0fe5ff0862644d38cd39015.tar.xz |
selinux: remove the sidtab context conversion indirect calls
The sidtab conversion code has support for multiple context
conversion routines through the use of function pointers and
indirect calls. However, the reality is that all current users rely
on the same conversion routine: convert_context(). This patch does
away with this extra complexity and replaces the indirect calls
with direct function calls; allowing us to remove a layer of
obfuscation and create cleaner, more maintainable code.
Reviewed-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/ss/services.h')
-rw-r--r-- | security/selinux/ss/services.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/security/selinux/ss/services.h b/security/selinux/ss/services.h index 9555ad074303..6348c95ff0e5 100644 --- a/security/selinux/ss/services.h +++ b/security/selinux/ss/services.h @@ -29,10 +29,18 @@ struct selinux_policy { u32 latest_granting; } __randomize_layout; -void services_compute_xperms_drivers(struct extended_perms *xperms, - struct avtab_node *node); +struct convert_context_args { + struct selinux_state *state; + struct policydb *oldp; + struct policydb *newp; +}; +void services_compute_xperms_drivers(struct extended_perms *xperms, + struct avtab_node *node); void services_compute_xperms_decision(struct extended_perms_decision *xpermd, - struct avtab_node *node); + struct avtab_node *node); + +int services_convert_context(struct convert_context_args *args, + struct context *oldc, struct context *newc); #endif /* _SS_SERVICES_H_ */ |