Project

General

Profile

Actions

Bug #24376

open

Script to check if module is disabled is_kernel_module_disabled.sh fails if module needs 2 .ko

Added by Nicolas CHARLES 9 months ago. Updated 5 months ago.

Status:
Pending release
Priority:
N/A
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
No

Description

on an ubuntu20, installing cramfs needs mtd.ko and cramfs.ko

modprobe -n -v cramfs
insmod /lib/modules/5.4.0-107-generic/kernel/drivers/mtd/mtd.ko 
insmod /lib/modules/5.4.0-107-generic/kernel/fs/cramfs/cramfs.ko

so our script is_kernel_module_disabled.sh fails on it, as it expects only one entry

echo "${dry_run}" | grep -Pq -- '^\h*install \/bin\/(true|false)'

CIS does that by filtering to get only the ko matching the module name

 [ "$(wc -l <<< "$l_loadable")" -gt "1" ] && l_loadable="$(grep -P -- "(^\h*install|\b$l_mname)\b" <<< "$l_loadable")" 

and then it does the grep

 grep -Pq -- '^\h*install \/bin\/(true|false)' <<< "$l_loadable";

Actions #1

Updated by Benoît PECCATTE 6 months ago

  • Status changed from New to In progress
  • Assignee changed from Félix DALLIDET to Benoît PECCATTE
Actions #2

Updated by Benoît PECCATTE 6 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Benoît PECCATTE to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder-plugins-private/pull/609
Actions #3

Updated by Benoît PECCATTE 6 months ago

  • Status changed from Pending technical review to Pending release

Applied in changeset rudder-plugins-private:commit:rudder-plugins-private|591102dbbf49fd7689811806ac92dfcd3984e8d1.

Actions #4

Updated by Félix DALLIDET 6 months ago

  • Fix check changed from To do to Checked
Actions #5

Updated by Alexis Mousset 5 months ago

  • Target version changed from 8.0 to 8.1
Actions

Also available in: Atom PDF