apparmor: make allperms structure const
Subsystems (2)
PATCH 1/1 apparmor: make allperms structure const
Make this structure const as it is only used as a copy operations in the files referencing it. Add const to the declaration in the header too.
Structure found using a Coccinelle script and changes done by hand.
Signed-off-by Bhumika Goyal <[email protected]>
--- security/apparmor/include/perms.h | 2 +- security/apparmor/lib.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
security/apparmor/include/perms.h +1 -1
@@ -90,7 +90,7 @@ struct aa_perms {#define ALL_PERMS_MASK 0xffffffffextern struct aa_perms nullperms; -extern struct aa_perms allperms; +extern const struct aa_perms allperms;#define xcheck (FN1 ,FN2 ) \
security/apparmor/lib.c +1 -1
@@ -25,7 +25,7 @@#include "include/policy.h" struct aa_perms nullperms; -struct aa_perms allperms = { .allow =ALL_PERMS_MASK , +const struct aa_perms allperms = { .allow =ALL_PERMS_MASK , .quiet =ALL_PERMS_MASK , .hide =ALL_PERMS_MASK };
Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html