mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 00:14:44 +01:00
swap regression test: fix swap permissions warning
When running the swap regression tests, the swapon command would issue a warning about insecure permissions on the swapfile being used as part of the test: mkswap: /tmp/sdtest.9698-822-2BL034/swapfile: insecure permissions 0644, 0600 suggested. Fix this by setting the permissions after the swapfile is created. Signed-off-by: Steve Beattie <steve.beattie@canonical.com> Acked-by: John Johansen <john.johansen@canonical.com> PR: https://gitlab.com/apparmor/apparmor/merge_requests/108
This commit is contained in:
parent
49ba6af2bf
commit
e87a662efc
1 changed files with 1 additions and 0 deletions
|
@ -41,6 +41,7 @@ swap_file=$tmpdir/swapfile
|
|||
# ppc64el wants this to be larger than 640KiB
|
||||
# arm/small machines want this as small as possible
|
||||
dd if=/dev/zero of=${swap_file} bs=1024 count=768 2> /dev/null
|
||||
chmod 600 ${swap_file}
|
||||
/sbin/mkswap -f ${swap_file} > /dev/null
|
||||
|
||||
# TEST 1. Make sure can enable and disable swap unconfined
|
||||
|
|
Loading…
Add table
Reference in a new issue