1
0
mirror of synced 2026-02-22 14:47:18 +00:00

Set umask to 0077 before creating disk images

This commit is contained in:
Axel Beckert
2010-01-26 01:57:40 +01:00
parent a1078d5908
commit dfbf5910b9
2 changed files with 10 additions and 1 deletions

View File

@@ -2573,9 +2573,17 @@ sub createLoopbackImages
$image_cmd = "dd if=/dev/zero of=$disk bs=$size count=1024";
}
# Set the umask so that the images are not world readable.
my $oldumask = umask;
umask(0077);
# run the image creation command
runCommand($image_cmd);
logprint("Done\n");
# Reset the umask to the previous value
umask($oldumask);
if ( !-e $disk )
{
logprint("The partition image creation failed to create $disk.\n");

3
debian/changelog vendored
View File

@@ -5,7 +5,8 @@ xen-tools (4.1-2) UNRELEASED; urgency=low
* Removal of /etc/bash_completion.d/xm from the package since
bash-completion ships a more elaborate version of that file. (Closes:
#566683, #550590)
* Set umask to 0077 before creating disk images (Closes: #548909)
--
xen-tools (4.1-1) unstable; urgency=low