summaryrefslogtreecommitdiffstats
path: root/security/apparmor
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2017-03-30 05:25:23 -0700
committerJohn Johansen <john.johansen@canonical.com>2017-06-10 17:11:31 -0700
commit39d84824eae3b1348408237173c710473e726ca9 (patch)
tree4f758b69af48d8e844add51a54fd6058fe0ec024 /security/apparmor
parent4f3b3f2d79a42e5094f55eca4f29d8f60f1190bd (diff)
downloadlinux-39d84824eae3b1348408237173c710473e726ca9.tar.bz2
apparmor: provide information about path buffer size at boot
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor')
-rw-r--r--security/apparmor/lsm.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index a128f1772135..8ab00c98613f 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -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)
{
+ int error;
+
if (!apparmor_enabled)
return -EINVAL;
- if (apparmor_initialized && !policy_admin_capable(NULL))
+ /* file is ro but enforce 2nd line check */
+ if (apparmor_initialized)
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)