seccomp: Separate read and write code for actions_logged sysctl
authorTyler Hicks <tyhicks@canonical.com>
Fri, 4 May 2018 01:08:12 +0000 (01:08 +0000)
committerPaul Moore <paul@paul-moore.com>
Tue, 8 May 2018 06:01:09 +0000 (02:01 -0400)
commitd013db029491b49e1459d5a55ecd9ec1be1447ca
tree2e7c741a7545476c4040d88bf37e5545d7f2f465
parent23bcc480dac204c7dbdf49d96b2c918ed98223c2
seccomp: Separate read and write code for actions_logged sysctl

Break the read and write paths of the kernel.seccomp.actions_logged
sysctl into separate functions to maintain readability. An upcoming
change will need to audit writes, but not reads, of this sysctl which
would introduce too many conditional code paths on whether or not the
'write' parameter evaluates to true.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/seccomp.c