Handle hostnames with upper-case letters
[webmin.git] / itsecur-firewall / save_remote.cgi
1 #!/usr/bin/perl
2 # Set up remote logging, creating a webmin server if needed
3
4 require './itsecur-lib.pl';
5 &foreign_require("servers", "servers-lib.pl");
6 &can_edit_error("remote");
7 &ReadParse();
8
9 # Validate inputs
10 &error_setup($text{'remote_err'});
11 if (!$in{'host_def'}) {
12         gethostbyname($in{'host'}) || &error($text{'remote_ehost'});
13         $in{'user'} || &error($text{'remote_euser'});
14         $server = &save_remote($in{'host'}, $in{'port'},
15                                $in{'user'}, $in{'pass'}, 1, 1);
16         }
17 else {
18         # Just stop logging
19         &save_remote(undef, undef, undef, undef, 0, 1);
20         }
21 &webmin_log("remote");
22 &redirect("");
23
24