Lines 3707-3714
tryagain:
Link Here
|
3707 |
/* |
3707 |
/* |
3708 |
* If an '@' is found and the domain name matches, search for |
3708 |
* If an '@' is found and the domain name matches, search for |
3709 |
* the name with dns stripped off. |
3709 |
* the name with dns stripped off. |
3710 |
* Mixed case alphabetics will match for the domain name, but |
3710 |
* The match for alphabetics in now case insensitive, |
3711 |
* all upper case will not. |
3711 |
* since RFC8881 defines this string as a DNS domain name. |
3712 |
*/ |
3712 |
*/ |
3713 |
if (cnt == 0 && i < len && i > 0 && |
3713 |
if (cnt == 0 && i < len && i > 0 && |
3714 |
(len - 1 - i) == NFSD_VNET(nfsrv_dnsnamelen) && |
3714 |
(len - 1 - i) == NFSD_VNET(nfsrv_dnsnamelen) && |
Lines 3985-3991
out:
Link Here
|
3985 |
|
3985 |
|
3986 |
/* |
3986 |
/* |
3987 |
* Cmp len chars, allowing mixed case in the first argument to match lower |
3987 |
* Cmp len chars, allowing mixed case in the first argument to match lower |
3988 |
* case in the second, but not if the first argument is all upper case. |
3988 |
* case in the second. |
3989 |
* Return 0 for a match, 1 otherwise. |
3989 |
* Return 0 for a match, 1 otherwise. |
3990 |
*/ |
3990 |
*/ |
3991 |
static int |
3991 |
static int |
Lines 3993-4015
nfsrv_cmpmixedcase(u_char *cp, u_char *cp2, int len)
Link Here
|
3993 |
{ |
3993 |
{ |
3994 |
int i; |
3994 |
int i; |
3995 |
u_char tmp; |
3995 |
u_char tmp; |
3996 |
int fndlower = 0; |
|
|
3997 |
|
3996 |
|
3998 |
for (i = 0; i < len; i++) { |
3997 |
for (i = 0; i < len; i++) { |
3999 |
if (*cp >= 'A' && *cp <= 'Z') { |
3998 |
if (*cp >= 'A' && *cp <= 'Z') |
4000 |
tmp = *cp++ + ('a' - 'A'); |
3999 |
tmp = *cp++ + ('a' - 'A'); |
4001 |
} else { |
4000 |
else |
4002 |
tmp = *cp++; |
4001 |
tmp = *cp++; |
4003 |
if (tmp >= 'a' && tmp <= 'z') |
|
|
4004 |
fndlower = 1; |
4005 |
} |
4006 |
if (tmp != *cp2++) |
4002 |
if (tmp != *cp2++) |
4007 |
return (1); |
4003 |
return (1); |
4008 |
} |
4004 |
} |
4009 |
if (fndlower) |
4005 |
return (0); |
4010 |
return (0); |
|
|
4011 |
else |
4012 |
return (1); |
4013 |
} |
4006 |
} |
4014 |
|
4007 |
|
4015 |
/* |
4008 |
/* |