aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2019-01-18 05:15:59 -0500
committerJames Morris <james.morris@microsoft.com>2019-01-18 14:44:02 -0500
commit1cfb2a512e74e577bb0ed7c8d76df90a41a83f6a (patch)
treef628dd07b171deba0cdc1ff48621f6c07aa0de2a /security/selinux/hooks.c
parentc1a85a00ea66cb6f0bd0f14e47c28c2b0999799f (diff)
LSM: Make lsm_early_cred() and lsm_early_task() local functions.
Since current->cred == current->real_cred when ordered_lsm_init() is called, and lsm_early_cred()/lsm_early_task() need to be called between the amount of required bytes is determined and module specific initialization function is called, we can move these calls from individual modules to ordered_lsm_init(). Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Acked-by: Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: James Morris <james.morris@microsoft.com>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index b2ee49f938f1..5d92167dbe05 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -207,7 +207,6 @@ static void cred_init_security(void)
207 struct cred *cred = (struct cred *) current->real_cred; 207 struct cred *cred = (struct cred *) current->real_cred;
208 struct task_security_struct *tsec; 208 struct task_security_struct *tsec;
209 209
210 lsm_early_cred(cred);
211 tsec = selinux_cred(cred); 210 tsec = selinux_cred(cred);
212 tsec->osid = tsec->sid = SECINITSID_KERNEL; 211 tsec->osid = tsec->sid = SECINITSID_KERNEL;
213} 212}