Skip to content
Commit e33c1b99 authored by Kees Cook's avatar Kees Cook Committed by John Johansen
Browse files

apparmor: Restore Y/N in /sys for apparmor's "enabled"



Before commit c5459b82 ("LSM: Plumb visibility into optional "enabled"
state"), /sys/module/apparmor/parameters/enabled would show "Y" or "N"
since it was using the "bool" handler. After being changed to "int",
this switched to "1" or "0", breaking the userspace AppArmor detection
of dbus-broker. This restores the Y/N output while keeping the LSM
infrastructure happy.

Before:
	$ cat /sys/module/apparmor/parameters/enabled
	1

After:
	$ cat /sys/module/apparmor/parameters/enabled
	Y

Reported-by: default avatarDavid Rheinsberg <david.rheinsberg@gmail.com>
Reviewed-by: default avatarDavid Rheinsberg <david.rheinsberg@gmail.com>
Link: https://lkml.kernel.org/r/CADyDSO6k8vYb1eryT4g6+EHrLCvb68GAbHVWuULkYjcZcYNhhw@mail.gmail.com


Fixes: c5459b82 ("LSM: Plumb visibility into optional "enabled" state")
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent 771acc7e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment