diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2010-10-08 01:43:22 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-10-20 19:12:45 -0400 |
commit | 9f1c1d426b0402b25cd0d7ca719ffc8e20e46d5f (patch) | |
tree | 5d31ff027688a90cef5ccea5bee1cb3e65639b37 /security/tomoyo | |
parent | b0ae19811375031ae3b3fecc65b702a9c6e5cc28 (diff) |
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>
Diffstat (limited to 'security/tomoyo')
-rw-r--r-- | security/tomoyo/common.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c index e0a1059aaf3a..7556315c1978 100644 --- a/security/tomoyo/common.c +++ b/security/tomoyo/common.c | |||
@@ -2053,13 +2053,22 @@ void tomoyo_check_profile(void) | |||
2053 | const u8 profile = domain->profile; | 2053 | const u8 profile = domain->profile; |
2054 | if (tomoyo_profile_ptr[profile]) | 2054 | if (tomoyo_profile_ptr[profile]) |
2055 | continue; | 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 | panic("Profile %u (used by '%s') not defined.\n", | 2060 | panic("Profile %u (used by '%s') not defined.\n", |
2057 | profile, domain->domainname->name); | 2061 | profile, domain->domainname->name); |
2058 | } | 2062 | } |
2059 | tomoyo_read_unlock(idx); | 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 | panic("Profile version %u is not supported.\n", | 2069 | panic("Profile version %u is not supported.\n", |
2062 | tomoyo_profile_version); | 2070 | tomoyo_profile_version); |
2071 | } | ||
2063 | printk(KERN_INFO "TOMOYO: 2.3.0\n"); | 2072 | printk(KERN_INFO "TOMOYO: 2.3.0\n"); |
2064 | printk(KERN_INFO "Mandatory Access Control activated.\n"); | 2073 | printk(KERN_INFO "Mandatory Access Control activated.\n"); |
2065 | } | 2074 | } |