From e20b043a6902ecb61c2c84355c3bae5149f391db Mon Sep 17 00:00:00 2001 From: Casey Schaufler Date: Sat, 2 May 2015 15:11:36 -0700 Subject: LSM: Add security module hook list heads Add a list header for each security hook. They aren't used until later in the patch series. They are grouped together in a structure so that there doesn't need to be an external address for each. Macro-ize the initialization of the security_operations for each security module in anticipation of changing out the security_operations structure. Signed-off-by: Casey Schaufler Acked-by: John Johansen Acked-by: Kees Cook Acked-by: Paul Moore Acked-by: Stephen Smalley Acked-by: Tetsuo Handa Signed-off-by: James Morris --- security/yama/yama_lsm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'security/yama') diff --git a/security/yama/yama_lsm.c b/security/yama/yama_lsm.c index 14557ffa7b4d..23dd4c6246b2 100644 --- a/security/yama/yama_lsm.c +++ b/security/yama/yama_lsm.c @@ -366,12 +366,12 @@ int yama_ptrace_traceme(struct task_struct *parent) #ifndef CONFIG_SECURITY_YAMA_STACKED static struct security_operations yama_ops = { - .name = "yama", + LSM_HOOK_INIT(name, "yama"), - .ptrace_access_check = yama_ptrace_access_check, - .ptrace_traceme = yama_ptrace_traceme, - .task_prctl = yama_task_prctl, - .task_free = yama_task_free, + LSM_HOOK_INIT(ptrace_access_check, yama_ptrace_access_check), + LSM_HOOK_INIT(ptrace_traceme, yama_ptrace_traceme), + LSM_HOOK_INIT(task_prctl, yama_task_prctl), + LSM_HOOK_INIT(task_free, yama_task_free), }; #endif -- cgit v1.2.3