Package: apt-mirror
Severity: normal

Hi,

I noticed that apt-mirror ignores the return value of "close" on write
handles.  This means that the program will happy ignore "out of disk
space" issues (etc.) in some cases and continue without warning
despite having written incomplete or corrupt files.

Example:

"""
open FILES_ALL, ">" . get_variable("var_path") . "/ALL" or die("apt-mirror: 
can't write to intermediate file (ALL)");
open FILES_NEW, ">" . get_variable("var_path") . "/NEW" or die("apt-mirror: 
can't write to intermediate file (NEW)");
open FILES_MD5, ">" . get_variable("var_path") . "/MD5" or die("apt-mirror: 
can't write to intermediate file (MD5)");
open FILES_SHA1, ">" . get_variable("var_path") . "/SHA1" or die("apt-mirror: 
can't write to intermediate file (SHA1)");
open FILES_SHA256, ">" . get_variable("var_path") . "/SHA256" or 
die("apt-mirror: can't write to intermediate file (SHA256)");

[...]

close FILES_ALL;
close FILES_NEW;
close FILES_MD5;
close FILES_SHA1;
close FILES_SHA256;

"""



Thanks,
~Niels

Reply via email to