lsm: constify the 'target' parameter in security_capget()
Three LSMs register the implementations for the "capget" hook: AppArmor, SELinux, and the normal capability code. Looking at the function implementations we may observe that the first parameter "target" is not changing. Mark the first argument "target" of LSM hook security_capget() as "const" since it will not be changing in the LSM hook. cap_capget() LSM hook declaration exceeds the 80 characters per line limit. Split the function declaration to multiple lines to decrease the line length. Signed-off-by:Khadija Kamran <kamrankhadijadj@gmail.com> Acked-by:
John Johansen <john.johansen@canonical.com> [PM: align the cap_capget() declaration, spelling fixes] Signed-off-by:
Paul Moore <paul@paul-moore.com>
Showing
- include/linux/lsm_hook_defs.h 1 addition, 1 deletioninclude/linux/lsm_hook_defs.h
- include/linux/security.h 4 additions, 3 deletionsinclude/linux/security.h
- kernel/capability.c 1 addition, 1 deletionkernel/capability.c
- security/apparmor/lsm.c 1 addition, 1 deletionsecurity/apparmor/lsm.c
- security/commoncap.c 1 addition, 1 deletionsecurity/commoncap.c
- security/security.c 1 addition, 1 deletionsecurity/security.c
- security/selinux/hooks.c 1 addition, 1 deletionsecurity/selinux/hooks.c
Please register or sign in to comment