Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This test verifies that the rule passes when /boot/efi is mounted with vfat filesystem
# Even with nosuid set, vfat is excluded from the requirement (nosuid has no effect on vfat)

# packages = dosfstools

. $SHARED/partition.sh

clean_up_partition /boot/efi
Expand All @@ -14,7 +16,11 @@ mkfs.vfat $VFAT_PARTITION

# Add to fstab with nosuid option (should still pass because vfat is excluded)
mkdir -p /boot/efi
echo "$VFAT_PARTITION /boot/efi vfat rw,nosuid,relatime 0 0" >> /etc/fstab
echo "$VFAT_PARTITION /boot/efi vfat rw,nosuid,relatime,loop 0 0" >> /etc/fstab

# Mount the partition
mount /boot/efi

# Add verification step to ensure the mount is active and correct
# This helps the script exit with a failure if mount failed unexpectedly
findmnt --target /boot/efi > /dev/null 2>&1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This test verifies that the rule passes when /boot/efi is mounted with vfat filesystem
# The nosuid requirement is not applicable to vfat filesystems

# packages = dosfstools

. $SHARED/partition.sh

clean_up_partition /boot/efi
Expand All @@ -14,7 +16,7 @@ mkfs.vfat $VFAT_PARTITION

# Add to fstab without nosuid option (should pass because vfat is excluded)
mkdir -p /boot/efi
echo "$VFAT_PARTITION /boot/efi vfat rw,relatime 0 0" >> /etc/fstab
echo "$VFAT_PARTITION /boot/efi vfat rw,relatime,loop 0 0" >> /etc/fstab

# Mount the partition
mount /boot/efi
Loading