mirror of
https://github.com/webmin/webmin.git
synced 2026-06-21 20:00:26 +01:00
Allow cidr maps and multiple SMTP client maps
This commit is contained in:
@@ -73,3 +73,5 @@ t/html MIME type.
|
||||
---- Changes since 1.500 ----
|
||||
If a map is made up of files in multiple directories and a Webmin user has a directory restriction defined, he will be able to edit map entries in files under that directory.
|
||||
Fixed the descriptions of logged events as shown in the Webmin Actions Log module.
|
||||
---- Changes since 1.510 ----
|
||||
Added support for CIDR maps and multiple SMTP client restriction maps.
|
||||
|
||||
@@ -39,7 +39,7 @@ foreach $r (&list_multi_client_restrictions()) {
|
||||
}
|
||||
push(@grid, &ui_checkbox("client", $r, $text{'sasl_'.$r},
|
||||
scalar(@v)),
|
||||
&ui_textbox("value_$r", $vals, 40).
|
||||
&ui_textbox("value_$r", $vals, 60).
|
||||
($r eq "check_client_access" ?
|
||||
" ".&map_chooser_button("value_$r", $r) : ""));
|
||||
$done{$r} = 1;
|
||||
|
||||
@@ -152,11 +152,16 @@ if (!defined($out)) {
|
||||
chop($out);
|
||||
}
|
||||
if ($key) {
|
||||
my @res=();
|
||||
foreach (split /,/,$out)
|
||||
{ push @res, $1 if /$key\s+(.+)/; }
|
||||
if ($#res>0) {$out=join ", ",@res}
|
||||
else {$out=$res[0]}
|
||||
# If the value asked for was like foo:bar, extract from the value
|
||||
# the parts after bar
|
||||
my @res = ( );
|
||||
while($out =~ /^(.*?)\Q$key\E\s+(\S+)(.*)$/) {
|
||||
my $v = $2;
|
||||
$out = $3;
|
||||
$v =~ s/,$//;
|
||||
push(@res, $v);
|
||||
}
|
||||
return join(" ", @res);
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
@@ -2172,7 +2177,7 @@ sub file_map_type
|
||||
{
|
||||
local ($type) = @_;
|
||||
return 1 if ($type eq 'hash' || $type eq 'regexp' || $type eq 'pcre' ||
|
||||
$type eq 'btree' || $type eq 'dbm');
|
||||
$type eq 'btree' || $type eq 'dbm' || $type eq 'cidr');
|
||||
}
|
||||
|
||||
# in_props(&props, name)
|
||||
|
||||
Reference in New Issue
Block a user