summaryrefslogtreecommitdiffstats
path: root/mod-extra-blacklist.sh
diff options
context:
space:
mode:
authorThorsten Leemhuis <fedora@leemhuis.info>2021-03-07 13:25:32 +0100
committerThorsten Leemhuis <fedora@leemhuis.info>2021-03-07 13:32:55 +0100
commitfb72952d5b63e40f63bfa1e3a5bce2262c424197 (patch)
treed1a9bf30437653b57b398fd3b4f3fb4897ca29cd /mod-extra-blacklist.sh
parentb9488a288ec844af97a516ac9ffe441221f6e67d (diff)
parent3422e04a2e31dba3e17af206f160d4fc409f4250 (diff)
downloadkernel-fb72952d5b63e40f63bfa1e3a5bce2262c424197.tar.gz
kernel-fb72952d5b63e40f63bfa1e3a5bce2262c424197.tar.xz
kernel-fb72952d5b63e40f63bfa1e3a5bce2262c424197.zip
:merge origin/stabilization and update to 5.10.4kernel-5.11.4-125.vanilla.1.fc33kernel-5.11.4-125.vanilla.1.fc32
Diffstat (limited to 'mod-extra-blacklist.sh')
-rwxr-xr-xmod-extra-blacklist.sh48
1 files changed, 0 insertions, 48 deletions
diff --git a/mod-extra-blacklist.sh b/mod-extra-blacklist.sh
deleted file mode 100755
index 9569ef6f2..000000000
--- a/mod-extra-blacklist.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-
-buildroot="$1"
-kernel_base="$2"
-
-blacklist()
-{
- cat > "$buildroot/etc/modprobe.d/$1-blacklist.conf" <<-__EOF__
- # This kernel module can be automatically loaded by non-root users. To
- # enhance system security, the module is blacklisted by default to ensure
- # system administrators make the module available for use as needed.
- # See https://access.redhat.com/articles/3760101 for more details.
- #
- # Remove the blacklist by adding a comment # at the start of the line.
- blacklist $1
-__EOF__
-}
-
-check_blacklist()
-{
- if modinfo "$1" | grep -q '^alias:\s\+net-'; then
- mod="${1##*/}"
- mod="${mod%.ko*}"
- echo "$mod has an alias that allows auto-loading. Blacklisting."
- blacklist "$mod"
- fi
-}
-
-foreachp()
-{
- P=$(nproc)
- bgcount=0
- while read mod; do
- $1 "$mod" &
-
- bgcount=$((bgcount + 1))
- if [ $bgcount -eq $P ]; then
- wait -n
- bgcount=$((bgcount - 1))
- fi
- done
-
- wait
-}
-
-[ -d "$buildroot/etc/modprobe.d/" ] || mkdir -p "$buildroot/etc/modprobe.d/"
-find "$buildroot/$kernel_base/extra" -name "*.ko*" | \
- foreachp check_blacklist