aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-12-14 22:11:32 -0500
committerJames Morris <jmorris@namei.org>2011-12-15 20:45:24 -0500
commitb8aa09fd880eb4c2881b9f3c8a8d09c0404cd4eb (patch)
tree7a748b15df00f1338a0fba89455f202a58f53dbf /security
parent735e93c70434614bffac4a914ca1da72e37d43c0 (diff)
apparmor: fix module parameter handling
The 'aabool' wrappers actually pass off to the 'bool' parse functions, so you should use the same check function. Similarly for aauint and uint. (Note that 'bool' module parameters also allow 'int', which is why you got away with this, but that's changing very soon.) Cc: linux-security-module@vger.kernel.org Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: John Johansen <john.johansen@canonical.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r--security/apparmor/lsm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index 37832026e58a..41ae0c6cb903 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -671,7 +671,7 @@ static struct security_operations apparmor_ops = {
671 671
672static int param_set_aabool(const char *val, const struct kernel_param *kp); 672static int param_set_aabool(const char *val, const struct kernel_param *kp);
673static int param_get_aabool(char *buffer, const struct kernel_param *kp); 673static int param_get_aabool(char *buffer, const struct kernel_param *kp);
674#define param_check_aabool(name, p) __param_check(name, p, int) 674#define param_check_aabool param_check_bool
675static struct kernel_param_ops param_ops_aabool = { 675static struct kernel_param_ops param_ops_aabool = {
676 .set = param_set_aabool, 676 .set = param_set_aabool,
677 .get = param_get_aabool 677 .get = param_get_aabool
@@ -679,7 +679,7 @@ static struct kernel_param_ops param_ops_aabool = {
679 679
680static int param_set_aauint(const char *val, const struct kernel_param *kp); 680static int param_set_aauint(const char *val, const struct kernel_param *kp);
681static int param_get_aauint(char *buffer, const struct kernel_param *kp); 681static int param_get_aauint(char *buffer, const struct kernel_param *kp);
682#define param_check_aauint(name, p) __param_check(name, p, int) 682#define param_check_aauint param_check_uint
683static struct kernel_param_ops param_ops_aauint = { 683static struct kernel_param_ops param_ops_aauint = {
684 .set = param_set_aauint, 684 .set = param_set_aauint,
685 .get = param_get_aauint 685 .get = param_get_aauint
@@ -687,7 +687,7 @@ static struct kernel_param_ops param_ops_aauint = {
687 687
688static int param_set_aalockpolicy(const char *val, const struct kernel_param *kp); 688static int param_set_aalockpolicy(const char *val, const struct kernel_param *kp);
689static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp); 689static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp);
690#define param_check_aalockpolicy(name, p) __param_check(name, p, int) 690#define param_check_aalockpolicy param_check_bool
691static struct kernel_param_ops param_ops_aalockpolicy = { 691static struct kernel_param_ops param_ops_aalockpolicy = {
692 .set = param_set_aalockpolicy, 692 .set = param_set_aalockpolicy,
693 .get = param_get_aalockpolicy 693 .get = param_get_aalockpolicy