Commit 9f1c1d42 authored by Tetsuo Handa's avatar Tetsuo Handa Committed by James Morris

TOMOYO: Print URL information before panic().

Configuration files for TOMOYO 2.3 are not compatible with TOMOYO 2.2.
But current panic() message is too unfriendly and is confusing users.
Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reviewed-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent b0ae1981
...@@ -2053,13 +2053,22 @@ void tomoyo_check_profile(void) ...@@ -2053,13 +2053,22 @@ void tomoyo_check_profile(void)
const u8 profile = domain->profile; const u8 profile = domain->profile;
if (tomoyo_profile_ptr[profile]) if (tomoyo_profile_ptr[profile])
continue; continue;
printk(KERN_ERR "You need to define profile %u before using it.\n",
profile);
printk(KERN_ERR "Please see http://tomoyo.sourceforge.jp/2.3/ "
"for more information.\n");
panic("Profile %u (used by '%s') not defined.\n", panic("Profile %u (used by '%s') not defined.\n",
profile, domain->domainname->name); profile, domain->domainname->name);
} }
tomoyo_read_unlock(idx); tomoyo_read_unlock(idx);
if (tomoyo_profile_version != 20090903) if (tomoyo_profile_version != 20090903) {
printk(KERN_ERR "You need to install userland programs for "
"TOMOYO 2.3 and initialize policy configuration.\n");
printk(KERN_ERR "Please see http://tomoyo.sourceforge.jp/2.3/ "
"for more information.\n");
panic("Profile version %u is not supported.\n", panic("Profile version %u is not supported.\n",
tomoyo_profile_version); tomoyo_profile_version);
}
printk(KERN_INFO "TOMOYO: 2.3.0\n"); printk(KERN_INFO "TOMOYO: 2.3.0\n");
printk(KERN_INFO "Mandatory Access Control activated.\n"); printk(KERN_INFO "Mandatory Access Control activated.\n");
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment