mirror of https://github.com/aredn/aredn.git
bugfix: supportool: Sensitive files are being included in the support dump.
Add feature to remove files that are sensitive (such as vtun configuration with passwords)
This commit is contained in:
parent
c788d2daff
commit
23b634e6ac
|
@ -50,6 +50,13 @@ use perlfunc;
|
||||||
"/var/run/hosts_olsr",
|
"/var/run/hosts_olsr",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@sensitive = ( "/etc/config/vtun",
|
||||||
|
"/etc/config.mesh/vtun",
|
||||||
|
"/etc/httpd.conf",
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@cmds = ( "cat /proc/cpuinfo",
|
@cmds = ( "cat /proc/cpuinfo",
|
||||||
"df -k",
|
"df -k",
|
||||||
"dmesg",
|
"dmesg",
|
||||||
|
@ -100,6 +107,15 @@ foreach $path (@files) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#Remove sensitive files
|
||||||
|
foreach $path (@sensitive) {
|
||||||
|
if ( $path =~ /^\/(.*)/ ) {
|
||||||
|
my $sourcepath = $1;
|
||||||
|
system("rm", "-r", "-f", "/tmp/sd/$sourcepath");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
system("touch","/tmp/sd/data.txt");
|
system("touch","/tmp/sd/data.txt");
|
||||||
open (my $CMDS_OUT, '>', '/tmp/sd/data.txt') or die "Could not open dump file";
|
open (my $CMDS_OUT, '>', '/tmp/sd/data.txt') or die "Could not open dump file";
|
||||||
|
|
Loading…
Reference in New Issue