LSM: LoadPin: provide enablement CONFIG
Instead of being enabled by default when SECURITY_LOADPIN is selected, provide an additional (default off) config to determine the boot time behavior. As before, the "loadpin.enabled=0/1" kernel parameter remains available. Suggested-by: James Morris <jmorris@namei.org> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: James Morris <james.l.morris@oracle.com>
This commit is contained in:
@@ -45,7 +45,7 @@ static void report_load(const char *origin, struct file *file, char *operation)
|
||||
kfree(pathname);
|
||||
}
|
||||
|
||||
static int enabled = 1;
|
||||
static int enabled = IS_ENABLED(CONFIG_SECURITY_LOADPIN_ENABLED);
|
||||
static struct super_block *pinned_root;
|
||||
static DEFINE_SPINLOCK(pinned_root_spinlock);
|
||||
|
||||
|
Reference in New Issue
Block a user