More IPv6 friendly function conversions

This commit is contained in:
Jamie Cameron
2010-10-31 17:23:47 -07:00
parent 583c18b5eb
commit b0ce51ec87
16 changed files with 83 additions and 26 deletions

View File

@@ -10,8 +10,8 @@ $p = $in{'proto'};
# Parse inputs
if ($p eq 'mysql' || $p eq 'postgresql' || $p eq 'ldap') {
gethostbyname($in{$p."_host"}) ||
$in{$p."_host"} =~ /^(\S+):(\d+)$/ && gethostbyname($1) ||
&to_ipaddress($in{$p."_host"}) ||
$in{$p."_host"} =~ /^(\S+):(\d+)$/ && &to_ipaddress("$1") ||
&error($text{'sql_ehost'});
$in{$p."_user"} =~ /^\S+$/ || &error($text{'sql_euser'});
$in{$p."_pass"} =~ /^\S*$/ || &error($text{'sql_epass'});