Check ACLs when editing allowed hosts

This commit is contained in:
Jamie Cameron
2026-08-03 10:40:02 -07:00
parent e0fbc043c2
commit 4aa97d1dbb
2 changed files with 3 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
require './postgresql-lib.pl';
&ReadParse();
$access{'users'} || &error($text{'host_ecannot'});
$v = &get_postgresql_version();
if ($in{'new'}) {
$type = $in{'new'};

View File

@@ -4,11 +4,12 @@
require './postgresql-lib.pl';
&ReadParse();
&error_setup($text{'host_err'});
$access{'users'} || &error($text{'host_ecannot'});
&lock_file($hba_conf_file);
$v = &get_postgresql_version();
@all = &get_hba_config($v);
$host = $all[$in{'idx'}] if (!$in{'new'});
&error_setup($text{'host_err'});
if ($in{'delete'}) {
# delete one host