Don't create world-readable swapfiles

This commit is contained in:
Eelco Dolstra 2014-04-23 17:45:46 +02:00
parent a2fad89723
commit d4986b5fd3

View File

@ -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
'';