Skip to content

Commit

Permalink
Include test scenario for multiple partitions
Browse files Browse the repository at this point in the history
An issue in the Ansible remediation was fixed by #11174 but no test
scenario was included to test this condition where there are privileged
commands in different partitions.
  • Loading branch information
marcusburghardt committed May 6, 2024
1 parent b241dc8 commit e3370aa
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
# packages = audit
# platform = multi_platform_fedora,multi_platform_rhel,Oracle Linux 7,Oracle Linux 8

. $SHARED/partition.sh

for num in 1 2; do
# PARTITION variable is used in $SHARED/partition.sh
PARTITION="/dev/new_partition$num"
MOUNT_POINT="/mnt/partition$num"

mkdir -p $MOUNT_POINT
create_partition
make_fstab_given_partition_line $MOUNT_POINT ext2
mount_partition $MOUNT_POINT

touch $MOUNT_POINT/priv_cmd
chmod +xs $MOUNT_POINT/priv_cmd
done

0 comments on commit e3370aa

Please sign in to comment.