提交 5265fc62 编写于 作者: S Steven Rostedt 提交者: Rusty Russell

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: NSteven Rostedt <rostedt@goodmis.org>
Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
上级 0ce81409
...@@ -666,6 +666,7 @@ static int param_set_aabool(const char *val, const struct kernel_param *kp); ...@@ -666,6 +666,7 @@ static int param_set_aabool(const char *val, const struct kernel_param *kp);
static int param_get_aabool(char *buffer, const struct kernel_param *kp); static int param_get_aabool(char *buffer, const struct kernel_param *kp);
#define param_check_aabool param_check_bool #define param_check_aabool param_check_bool
static struct kernel_param_ops param_ops_aabool = { static struct kernel_param_ops param_ops_aabool = {
.flags = KERNEL_PARAM_FL_NOARG,
.set = param_set_aabool, .set = param_set_aabool,
.get = param_get_aabool .get = param_get_aabool
}; };
...@@ -682,6 +683,7 @@ static int param_set_aalockpolicy(const char *val, const struct kernel_param *kp ...@@ -682,6 +683,7 @@ static int param_set_aalockpolicy(const char *val, const struct kernel_param *kp
static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp); static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp);
#define param_check_aalockpolicy param_check_bool #define param_check_aalockpolicy param_check_bool
static struct kernel_param_ops param_ops_aalockpolicy = { static struct kernel_param_ops param_ops_aalockpolicy = {
.flags = KERNEL_PARAM_FL_NOARG,
.set = param_set_aalockpolicy, .set = param_set_aalockpolicy,
.get = param_get_aalockpolicy .get = param_get_aalockpolicy
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册