summaryrefslogtreecommitdiff
path: root/tests/sshserver.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sshserver.pl')
-rw-r--r--tests/sshserver.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/sshserver.pl b/tests/sshserver.pl
index 24c98d630..5cff897a3 100644
--- a/tests/sshserver.pl
+++ b/tests/sshserver.pl
@@ -522,6 +522,11 @@ push @cfgarr, '#';
# and do not support quotes around values for some unknown reason.
if ($sshdid =~ /OpenSSH-Windows/) {
my $username_lc = lc $username;
+ if (exists $ENV{USERDOMAIN}) {
+ my $userdomain_lc = lc $ENV{USERDOMAIN};
+ $username_lc = "$userdomain_lc\\$username_lc";
+ }
+ $username_lc =~ s/ /\?/g; # replace space with ?
push @cfgarr, "DenyUsers !$username_lc";
push @cfgarr, "AllowUsers $username_lc";
} else {