Skip to content

Commit

Permalink
Fixed bug with modprobe
Browse files Browse the repository at this point in the history
Fixed the bug with modprobe not detecting modules not installed.
  • Loading branch information
massyn authored Aug 1, 2018
1 parent 3a82c7e commit 70301ed
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/1.1.1.1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

# 1.1.1.1 - Ensure mounting of cramfs filesystems is disabled (Scored)

modprobe -n -v cramfs | grep -E "(install /bin/true|FATAL: Module cramfs not found.)" || exit $?
modprobe -n -v cramfs 2>&1 | grep -E "(install /bin/true|FATAL: Module cramfs not found.)" || exit $?
[[ -z "$(lsmod | grep cramfs)" ]] || exit 1
2 changes: 1 addition & 1 deletion test/1.1.1.2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

# 1.1.1.2 - Ensure mounting of freevxfs filesystems is disabled (Scored)

modprobe -n -v freevxfs | grep -E "(install /bin/true|FATAL: Module freevxfs not found.)" || exit $?
modprobe -n -v freevxfs 2>&1 | grep -E "(install /bin/true|FATAL: Module freevxfs not found.)" || exit $?
[[ -z "$(lsmod | grep freevxfs)" ]] || exit 1
2 changes: 1 addition & 1 deletion test/1.1.1.3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

# 1.1.1.3 - Ensure mounting of jffs2 filesystems is disabled (Scored)

modprobe -n -v jffs2 | grep -E "(install /bin/true|FATAL: Module jffs2 not found.)" || exit $?
modprobe -n -v jffs2 2>&1 | grep -E "(install /bin/true|FATAL: Module jffs2 not found.)" || exit $?
[[ -z "$(lsmod | grep jffs2)" ]] || exit 1
2 changes: 1 addition & 1 deletion test/1.1.1.4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

# 1.1.1.4 - Ensure mounting of hfs filesystems is disabled (Scored)

modprobe -n -v hfs | grep -E "(install /bin/true|FATAL: Module hfs not found.)" || exit $?
modprobe -n -v hfs 2>&1 | grep -E "(install /bin/true|FATAL: Module hfs not found.)" || exit $?
[[ -z "$(lsmod | grep hfs)" ]] || exit 1
2 changes: 1 addition & 1 deletion test/1.1.1.5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

# 1.1.1.5 - Ensure mounting of hfsplus filesystems is disabled (Scored)

modprobe -n -v hfsplus | grep -E "(install /bin/true|FATAL: Module hfsplus not found.)" || exit $?
modprobe -n -v hfsplus 2>&1 | grep -E "(install /bin/true|FATAL: Module hfsplus not found.)" || exit $?
[[ -z "$(lsmod | grep hfsplus)" ]] || exit 1
2 changes: 1 addition & 1 deletion test/1.1.1.6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

# 1.1.1.6 - Ensure mounting of squashfs filesystems is disabled (Scored)

modprobe -n -v squashfs | grep -E "(install /bin/true|FATAL: Module squashfs not found.)" || exit $?
modprobe -n -v squashfs 2>&1 | grep -E "(install /bin/true|FATAL: Module squashfs not found.)" || exit $?
[[ -z "$(lsmod | grep squashfs)" ]] || exit 1
2 changes: 1 addition & 1 deletion test/1.1.1.7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

# 1.1.1.7 - Ensure mounting of udf filesystems is disabled (Scored)

modprobe -n -v udf | grep -E "(install /bin/true|FATAL: Module udf not found.)" || exit $?
modprobe -n -v udf 2>&1 | grep -E "(install /bin/true|FATAL: Module udf not found.)" || exit $?
[[ -z "$(lsmod | grep udf)" ]] || exit 1
2 changes: 1 addition & 1 deletion test/1.1.1.8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

# 1.1.1.8 - Ensure mounting of FAT filesystems is disabled (Scored)

modprobe -n -v vfat | grep -E "(install /bin/true|FATAL: Module vfat not found.)" || exit $?
modprobe -n -v vfat 2>&1 | grep -E "(install /bin/true|FATAL: Module vfat not found.)" || exit $?
[[ -z "$(lsmod | grep vfat)" ]] || exit 1

0 comments on commit 70301ed

Please sign in to comment.