mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-31 01:51:48 +01:00
Apply user/group Id range patch from Gergely Risko
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
a38f773ab1
commit
da3e1b720c
@ -4220,12 +4220,12 @@ sub do_user( $ ) {
|
|||||||
|
|
||||||
if ( supplied $2 ) {
|
if ( supplied $2 ) {
|
||||||
$user = $2;
|
$user = $2;
|
||||||
$user = resolve_id( $user, 'user' ) unless $user =~ /\d+$/;
|
$user = resolve_id( $user, 'user' ) unless $user =~ /\d+(-\d+)?$/;
|
||||||
$rule .= "${invert}--uid-owner $user ";
|
$rule .= "${invert}--uid-owner $user ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $group ne '' ) {
|
if ( $group ne '' ) {
|
||||||
$group = resolve_id( $group, 'group' ) unless $group =~ /^\d+$/;
|
$group = resolve_id( $group, 'group' ) unless $group =~ /^\d+(-\d+)?$/;
|
||||||
$rule .= "${invert}--gid-owner $group ";
|
$rule .= "${invert}--gid-owner $group ";
|
||||||
}
|
}
|
||||||
} elsif ( $user =~ /^(!)?(.*)$/ ) {
|
} elsif ( $user =~ /^(!)?(.*)$/ ) {
|
||||||
@ -4233,10 +4233,10 @@ sub do_user( $ ) {
|
|||||||
$user = $2;
|
$user = $2;
|
||||||
|
|
||||||
fatal_error "Invalid USER/GROUP (!)" if $user eq '';
|
fatal_error "Invalid USER/GROUP (!)" if $user eq '';
|
||||||
$user = resolve_id ($user, 'user' ) unless $user =~ /\d+$/;
|
$user = resolve_id ($user, 'user' ) unless $user =~ /\d+(-\d+)?$/;
|
||||||
$rule .= "${invert}--uid-owner $user ";
|
$rule .= "${invert}--uid-owner $user ";
|
||||||
} else {
|
} else {
|
||||||
$user = resolve_id( $user, 'user' ) unless $user =~ /\d+$/;
|
$user = resolve_id( $user, 'user' ) unless $user =~ /\d+(-\d+)?$/;
|
||||||
$rule .= "--uid-owner $user ";
|
$rule .= "--uid-owner $user ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user