Set umask to 0077 before creating disk images
This commit is contained in:
@@ -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
3
debian/changelog
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user