- # Create a File::UseList object and load the list
-
- my $uselist = new File::UseList(listfile => $config->{'uselist_file'},
- lockfile => $config->{'lock_file'},
- timeout => $config->{'lock_timeout'});
-
- $uselist->lock or abort($config->{'errors'}->{'lock_failed'},undef,{USELIST => $uselist->{'listfile'}, LOCK_FILE => $uselist->{'lockfile'}});
- $uselist->load;
-
- # Create a hash containing data submitted by the user
- # (some other necessary information are also included)
-
- my %data = (physical => $physical,
- virtual => $virtual,
- new_physical => $new_physical,
- new_virtual => $new_virtual,
- uselist => $uselist,
- cgi => $cgi,
- version => $VERSION,
- configfile => CONFIGFILE);
-
- my $output = exec_command($command,\%data,$config); # Execute the command...
-
- $uselist->unlock; # ... unlock the list with files in use...
- print $$output; # ... and show the output of the command
+ if(is_forbidden_file($config->{'forbidden'},$virtual))
+ {
+ abort($config->{'errors'}->{'forbidden_file'},'/');
+ }
+ else
+ {
+ # Create a hash containing data submitted by the user
+ # (some other necessary information are also included)
+
+ my %data = (physical => $physical,
+ virtual => $virtual,
+ new_physical => $new_physical,
+ new_virtual => $new_virtual,
+ cgi => $cgi,
+ version => $VERSION,
+ configfile => CONFIGFILE);
+
+ # Execute the command...
+
+ my $output = exec_command($command,\%data,$config);
+
+ # ... and show its output
+
+ print $$output;
+ }