Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e00fb3f7 authored by Tetsuo Handa's avatar Tetsuo Handa Committed by James Morris
Browse files

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: default avatarJamie Nguyen <jamie@tomoyolinux.co.uk>
Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent c6cb56fc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -515,7 +515,8 @@ struct tomoyo_domain_info *tomoyo_assign_domain(const char *domainname,
			 * that domain. Do not perform domain transition if
			 * 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 entry;