Don't create world-readable swapfiles
This commit is contained in:
parent
a2fad89723
commit
d4986b5fd3
|
@ -106,6 +106,7 @@ with utils;
|
|||
if [ ! -e "${sw.device}" ]; then
|
||||
fallocate -l ${toString sw.size}M "${sw.device}" ||
|
||||
dd if=/dev/zero of="${sw.device}" bs=1M count=${toString sw.size}
|
||||
chmod 0600 ${sw.device}
|
||||
mkswap ${sw.device}
|
||||
fi
|
||||
'';
|
||||
|
|
Loading…
Reference in New Issue