ssh-keygen -R is case-sensitive, but should not be

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



Here is a better patch. Somehow I pasted an older version of my edits:

-------------------------------------------------------
% diff ./match.c /home/millerig/osrc/openssh-7.2p2/match.c
121a122
> 	char *low_string = 0;
156,159c157,168
< 		if (match_pattern(string, sub)) {
< 			if (negated)
< 				return -1;		/* Negative */
< 			else
---
> 		if (dolower) {
> 			u_int j;
> 			if (low_string) free(low_string);
> 			low_string = malloc(strlen(string) + 1);
> 			for (j = 0; j < strlen(string); ++j) low_string[j] = tolower(string[j]);
> 			low_string[j] = 0;
> 		}
> 		if (match_pattern((dolower ? low_string : string), sub)) {
> 			if (negated) {
> 				got_positive = -1;		/* Negative */
> 				break;
> 			} else
165,166c174,175
< 	 * Return success if got a positive match.  If there was a negative
< 	 * match, we have already returned -1 and never get here.
---
> 	 * Return success if there was a positive match;
> 	 * return -1 if there was a negative match.
167a177
> 	if (low_string) free(low_string);
-------------------------------------------------------

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux