iucvterm/ts-shell: Correct user/group names being interpreted as regex

When ts-shell creates the authorization for current user, the
user name and group names are interpreted as regex.  This might
create additional authorizations which are not permitted for
current user.

Correct this behavior by quoting the user name in the regex.

Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Hendrik Brueckner
2026-07-02 19:45:23 +02:00
committed by Jan Höppner
parent 0c771423b4
commit 10ec3f18fc

View File

@@ -217,7 +217,7 @@ sub loadAuthorization(\%)
my ($key, $val) = split /\s*=\s*/;
# read authorization configuration for user and its groups
if ($key =~ /^$cfg->{user}$/) {
if ($key =~ /^\Q$cfg->{user}\E$/) {
$authorized = 1;
log_debug "Found user: $key";