OSDN Git Service

selinux: avoid implicit conversions in services code
authorChristian Göttsche <cgzones@googlemail.com>
Fri, 28 Jul 2023 15:54:56 +0000 (17:54 +0200)
committerPaul Moore <paul@paul-moore.com>
Fri, 4 Aug 2023 02:19:57 +0000 (22:19 -0400)
commitc50e125d057152bc68dfd5669b73611343653eb7
tree5fb485f54bce01b64598669f33e76112ff430b42
parentfd5a90ff1e95671e5b22dfa88d7359729b6c42b7
selinux: avoid implicit conversions in services code

Use u32 as the output parameter type in security_get_classes() and
security_get_permissions(), based on the type of the symtab nprim
member.

Declare the read-only class string parameter of
security_get_permissions() const.

Avoid several implicit conversions by using the identical type for the
destination.

Use the type identical to the source for local variables.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
[PM: cleanup extra whitespace in subject]
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/include/security.h
security/selinux/selinuxfs.c
security/selinux/ss/services.c