[openssh-commits] [openssh] 07/11: upstream commit
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Mar 10 15:35:50 AEDT 2017
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit df9936936c695f85c1038bd706d62edf752aca4b
Author: djm at openbsd.org <djm at openbsd.org>
Date: Fri Mar 10 04:24:55 2017 +0000
upstream commit
make hostname matching really insensitive to case;
bz#2685, reported by Petr Cerny; ok dtucker@
Upstream-ID: e632b7a9bf0d0558d5ff56dab98b7cca6c3db549
---
match.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/match.c b/match.c
index a7585e2..3cf4030 100644
--- a/match.c
+++ b/match.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: match.c,v 1.36 2017/03/10 03:52:48 djm Exp $ */
+/* $OpenBSD: match.c,v 1.37 2017/03/10 04:24:55 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -42,9 +42,11 @@
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
+#include <stdio.h>
#include "xmalloc.h"
#include "match.h"
+#include "misc.h"
/*
* Returns true if the given string matches the pattern (which may contain ?
@@ -177,7 +179,13 @@ match_pattern_list(const char *string, const char *pattern, int dolower)
int
match_hostname(const char *host, const char *pattern)
{
- return match_pattern_list(host, pattern, 1);
+ char *hostcopy = xstrdup(host);
+ int r;
+
+ lowercase(hostcopy);
+ r = match_pattern_list(hostcopy, pattern, 1);
+ free(hostcopy);
+ return r;
}
/*
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list