3 # Move a hosts list entry down
5 require './postgresql-lib.pl';
7 $access{'users'} || &error($text{'host_ecannot'});
9 &lock_file($hba_conf_file);
10 @hosts = &get_hba_config();
11 $host = $hosts[$in{'idx'}];
12 &swap_hba($host, $hosts[$in{'idx'}+1]);
13 &unlock_file($hba_conf_file);
14 &restart_postgresql();
15 &webmin_log('move', 'hba',
16 $host->{'type'} eq 'local' ? 'local' :
17 $host->{'netmask'} eq '0.0.0.0' ? 'all' :
18 $host->{'netmask'} eq '255.255.255.255' ? $host->{'address'}:
19 "$host->{'address'}/$host->{'netmask'}", $host);
20 &redirect("list_hosts.cgi");