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

TOMOYO: Fix domain transition failure warning.

Commit bd03a3e4 "TOMOYO: Add policy namespace support." introduced policy
namespace. But as of /sbin/modprobe is executed from initramfs/initrd, profiles
for target domain's namespace is not defined because /sbin/tomoyo-init is not
yet called.
Reported-by: NJamie Nguyen <jamie@tomoyolinux.co.uk>
Signed-off-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: NJames Morris <jmorris@namei.org>
上级 c6cb56fc
...@@ -515,7 +515,8 @@ struct tomoyo_domain_info *tomoyo_assign_domain(const char *domainname, ...@@ -515,7 +515,8 @@ struct tomoyo_domain_info *tomoyo_assign_domain(const char *domainname,
* that domain. Do not perform domain transition if * that domain. Do not perform domain transition if
* profile for that domain is not yet created. * profile for that domain is not yet created.
*/ */
if (!entry->ns->profile_ptr[entry->profile]) if (tomoyo_policy_loaded &&
!entry->ns->profile_ptr[entry->profile])
return NULL; return NULL;
} }
return entry; return entry;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册