Commit 9f1c1d426b0402b25cd0d7ca719ffc8e20e46d5f
Committed by
James Morris
1 parent
b0ae198113
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: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: James Morris <jmorris@namei.org>
Showing 1 changed file with 10 additions and 1 deletions Side-by-side Diff
security/tomoyo/common.c
... | ... | @@ -2053,13 +2053,22 @@ |
2053 | 2053 | const u8 profile = domain->profile; |
2054 | 2054 | if (tomoyo_profile_ptr[profile]) |
2055 | 2055 | continue; |
2056 | + printk(KERN_ERR "You need to define profile %u before using it.\n", | |
2057 | + profile); | |
2058 | + printk(KERN_ERR "Please see http://tomoyo.sourceforge.jp/2.3/ " | |
2059 | + "for more information.\n"); | |
2056 | 2060 | panic("Profile %u (used by '%s') not defined.\n", |
2057 | 2061 | profile, domain->domainname->name); |
2058 | 2062 | } |
2059 | 2063 | tomoyo_read_unlock(idx); |
2060 | - if (tomoyo_profile_version != 20090903) | |
2064 | + if (tomoyo_profile_version != 20090903) { | |
2065 | + printk(KERN_ERR "You need to install userland programs for " | |
2066 | + "TOMOYO 2.3 and initialize policy configuration.\n"); | |
2067 | + printk(KERN_ERR "Please see http://tomoyo.sourceforge.jp/2.3/ " | |
2068 | + "for more information.\n"); | |
2061 | 2069 | panic("Profile version %u is not supported.\n", |
2062 | 2070 | tomoyo_profile_version); |
2071 | + } | |
2063 | 2072 | printk(KERN_INFO "TOMOYO: 2.3.0\n"); |
2064 | 2073 | printk(KERN_INFO "Mandatory Access Control activated.\n"); |
2065 | 2074 | } |