From b7fac4266511ba92fc57a902ab22a55891edaefa Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Sat, 28 Aug 2010 14:58:44 +0900 Subject: [PATCH] --- yaml --- r: 211664 b: refs/heads/master c: 065d78a0603cc6f8d288e96dbf761b96984b634f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/security/security.c | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 2f02d1df4ed6..20af753434fb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: daa6d83a2863c28197b0c7dabfdf1e0606760b78 +refs/heads/master: 065d78a0603cc6f8d288e96dbf761b96984b634f diff --git a/trunk/security/security.c b/trunk/security/security.c index c53949f17d9e..43b6463ebbfb 100644 --- a/trunk/security/security.c +++ b/trunk/security/security.c @@ -89,20 +89,12 @@ __setup("security=", choose_lsm); * Return true if: * -The passed LSM is the one chosen by user at boot time, * -or the passed LSM is configured as the default and the user did not - * choose an alternate LSM at boot time, - * -or there is no default LSM set and the user didn't specify a - * specific LSM and we're the first to ask for registration permission, - * -or the passed LSM is currently loaded. + * choose an alternate LSM at boot time. * Otherwise, return false. */ int __init security_module_enable(struct security_operations *ops) { - if (!*chosen_lsm) - strncpy(chosen_lsm, ops->name, SECURITY_NAME_MAX); - else if (strncmp(ops->name, chosen_lsm, SECURITY_NAME_MAX)) - return 0; - - return 1; + return !strcmp(ops->name, chosen_lsm); } /**