diff options
author | Steven Rostedt <rostedt@goodmis.org> | 2013-08-20 02:03:20 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-08-20 02:07:44 -0400 |
commit | 5265fc6219ddbf8dfc9b18223448a4997fb06eae (patch) | |
tree | d6b0dca1389c126757eb1f629799f0973dfb4ffb /security | |
parent | 0ce814096f388f6801587f01c1c5ee1d04e746b3 (diff) |
module/lsm: Have apparmor module parameters work with no args
The apparmor module parameters for param_ops_aabool and
param_ops_aalockpolicy are both based off of the param_ops_bool,
and can handle a NULL value passed in as val. Have it enable the
new KERNEL_PARAM_FL_NOARGS flag to allow the parameters to be set
without having to state "=y" or "=1".
Cc: John Johansen <john.johansen@canonical.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'security')
-rw-r--r-- | security/apparmor/lsm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index 2e2a0dd4a73f..e3a704c75ef6 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c | |||
@@ -666,6 +666,7 @@ static int param_set_aabool(const char *val, const struct kernel_param *kp); | |||
666 | static int param_get_aabool(char *buffer, const struct kernel_param *kp); | 666 | static int param_get_aabool(char *buffer, const struct kernel_param *kp); |
667 | #define param_check_aabool param_check_bool | 667 | #define param_check_aabool param_check_bool |
668 | static struct kernel_param_ops param_ops_aabool = { | 668 | static struct kernel_param_ops param_ops_aabool = { |
669 | .flags = KERNEL_PARAM_FL_NOARG, | ||
669 | .set = param_set_aabool, | 670 | .set = param_set_aabool, |
670 | .get = param_get_aabool | 671 | .get = param_get_aabool |
671 | }; | 672 | }; |
@@ -682,6 +683,7 @@ static int param_set_aalockpolicy(const char *val, const struct kernel_param *kp | |||
682 | static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp); | 683 | static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp); |
683 | #define param_check_aalockpolicy param_check_bool | 684 | #define param_check_aalockpolicy param_check_bool |
684 | static struct kernel_param_ops param_ops_aalockpolicy = { | 685 | static struct kernel_param_ops param_ops_aalockpolicy = { |
686 | .flags = KERNEL_PARAM_FL_NOARG, | ||
685 | .set = param_set_aalockpolicy, | 687 | .set = param_set_aalockpolicy, |
686 | .get = param_get_aalockpolicy | 688 | .get = param_get_aalockpolicy |
687 | }; | 689 | }; |