- # 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'},{USELIST => $config->{'uselist_file'}, LOCK_FILE => $config->{'lock_file'}});
- $uselist->load;
-
- # Create a hash with data submitted by user
- # (some other necessary information will also be 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;
+ }