提交 39d84824 编写于 作者: J John Johansen

apparmor: provide information about path buffer size at boot

Signed-off-by: NJohn Johansen <john.johansen@canonical.com>
上级 4f3b3f2d
...@@ -774,11 +774,18 @@ static int param_get_aabool(char *buffer, const struct kernel_param *kp) ...@@ -774,11 +774,18 @@ static int param_get_aabool(char *buffer, const struct kernel_param *kp)
static int param_set_aauint(const char *val, const struct kernel_param *kp) static int param_set_aauint(const char *val, const struct kernel_param *kp)
{ {
int error;
if (!apparmor_enabled) if (!apparmor_enabled)
return -EINVAL; return -EINVAL;
if (apparmor_initialized && !policy_admin_capable(NULL)) /* file is ro but enforce 2nd line check */
if (apparmor_initialized)
return -EPERM; return -EPERM;
return param_set_uint(val, kp);
error = param_set_uint(val, kp);
pr_info("AppArmor: buffer size set to %d bytes\n", aa_g_path_max);
return error;
} }
static int param_get_aauint(char *buffer, const struct kernel_param *kp) static int param_get_aauint(char *buffer, const struct kernel_param *kp)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册