return (lsm->enabled ? *lsm->enabled : false);
}
-/* Is an LSM already listed in the ordered LSMs list? */
-static bool __init exists_ordered_lsm(struct lsm_info *lsm)
+/**
+ * lsm_order_exists - Determine if a LSM exists in the ordered list
+ * @lsm: LSM definition
+ */
+static bool __init lsm_order_exists(struct lsm_info *lsm)
{
struct lsm_info **check;
static void __init append_ordered_lsm(struct lsm_info *lsm, const char *from)
{
/* Ignore duplicate selections. */
- if (exists_ordered_lsm(lsm))
+ if (lsm_order_exists(lsm))
return;
if (WARN(last_lsm == MAX_LSM_COUNT, "%s: out of LSM static calls!?\n", from))
/* Process "security=", if given. */
if (lsm_order_legacy) {
lsm_for_each_raw(lsm) {
- if (exists_ordered_lsm(lsm))
+ if (lsm_order_exists(lsm))
continue;
if (strcmp(lsm->id->name, lsm_order_legacy) == 0)
append_ordered_lsm(lsm, "security=");
/* Disable all LSMs not in the ordered list. */
lsm_for_each_raw(lsm) {
- if (exists_ordered_lsm(lsm))
+ if (lsm_order_exists(lsm))
continue;
lsm_enabled_set(lsm, false);
init_debug("%s skipped: %s (not in requested order)\n",