aboutsummaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2019-09-16 10:47:55 +0200
committerJakub Jelen <jjelen@redhat.com>2019-09-18 10:45:21 +0200
commit9b8b312b88ee79009df40a07b90548f743df9f9f (patch)
treecdcc90a69b173b10ddaed2bede976797817ea224 /src/config.c
parent4900ab6ca9a016c66c3ba1a2edd27fe155170e06 (diff)
downloadlibssh-9b8b312b88ee79009df40a07b90548f743df9f9f.tar.gz
libssh-9b8b312b88ee79009df40a07b90548f743df9f9f.tar.xz
libssh-9b8b312b88ee79009df40a07b90548f743df9f9f.zip
config: Make the matching case sensitive as documented in ssh_config manual pages
> note that keywords are case-insensitive and arguments are case-sensitive Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/config.c b/src/config.c
index 7503f0ea..256a9a94 100644
--- a/src/config.c
+++ b/src/config.c
@@ -274,10 +274,8 @@ static int
ssh_config_match(char *value, const char *pattern, bool negate)
{
int ok, result = 0;
- char *lowervalue;
- lowervalue = (value) ? ssh_lowercase(value) : NULL;
- ok = match_pattern_list(lowervalue, pattern, strlen(pattern), 0);
+ ok = match_pattern_list(value, pattern, strlen(pattern), 0);
if (ok <= 0 && negate == true) {
result = 1;
} else if (ok > 0 && negate == false) {
@@ -286,7 +284,6 @@ ssh_config_match(char *value, const char *pattern, bool negate)
SSH_LOG(SSH_LOG_TRACE, "%s '%s' against pattern '%s'%s (ok=%d)",
result == 1 ? "Matched" : "Not matched", value, pattern,
negate == true ? " (negated)" : "", ok);
- SAFE_FREE(lowervalue);
return result;
}