提交 7986cf28 编写于 作者: T Tetsuo Handa 提交者: James Morris

TOMOYO: Fix build error with CONFIG_SECURITY_TOMOYO_OMIT_USERSPACE_LOADER=y .

I forgot to add #ifndef in commit 0e4ae0e0 "TOMOYO: Make several options
configurable.", resulting

  security/built-in.o: In function `tomoyo_bprm_set_creds':
  tomoyo.c:(.text+0x4698e): undefined reference to `tomoyo_load_policy'

error.
Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: NJames Morris <jmorris@namei.org>
上级 da3f1c7b
...@@ -51,12 +51,14 @@ static int tomoyo_bprm_set_creds(struct linux_binprm *bprm) ...@@ -51,12 +51,14 @@ static int tomoyo_bprm_set_creds(struct linux_binprm *bprm)
*/ */
if (bprm->cred_prepared) if (bprm->cred_prepared)
return 0; return 0;
#ifndef CONFIG_SECURITY_TOMOYO_OMIT_USERSPACE_LOADER
/* /*
* Load policy if /sbin/tomoyo-init exists and /sbin/init is requested * Load policy if /sbin/tomoyo-init exists and /sbin/init is requested
* for the first time. * for the first time.
*/ */
if (!tomoyo_policy_loaded) if (!tomoyo_policy_loaded)
tomoyo_load_policy(bprm->filename); tomoyo_load_policy(bprm->filename);
#endif
/* /*
* Release reference to "struct tomoyo_domain_info" stored inside * Release reference to "struct tomoyo_domain_info" stored inside
* "bprm->cred->security". New reference to "struct tomoyo_domain_info" * "bprm->cred->security". New reference to "struct tomoyo_domain_info"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册