|
Lines 151-165
Link Here
|
| 151 |
debug2("userauth_hostbased: chost %s resolvedname %s ipaddr %s", |
151 |
debug2("userauth_hostbased: chost %s resolvedname %s ipaddr %s", |
| 152 |
chost, resolvedname, ipaddr); |
152 |
chost, resolvedname, ipaddr); |
| 153 |
|
153 |
|
|
|
154 |
if (((len = strlen(chost)) > 0) && chost[len - 1] == '.') { |
| 155 |
debug2("stripping trailing dot from chost %s", chost); |
| 156 |
chost[len - 1] = '\0'; |
| 157 |
} |
| 154 |
if (options.hostbased_uses_name_from_packet_only) { |
158 |
if (options.hostbased_uses_name_from_packet_only) { |
| 155 |
if (auth_rhosts2(pw, cuser, chost, chost) == 0) |
159 |
if (auth_rhosts2(pw, cuser, chost, chost) == 0) |
| 156 |
return 0; |
160 |
return 0; |
| 157 |
lookup = chost; |
161 |
lookup = chost; |
| 158 |
} else { |
162 |
} else { |
| 159 |
if (((len = strlen(chost)) > 0) && chost[len - 1] == '.') { |
|
|
| 160 |
debug2("stripping trailing dot from chost %s", chost); |
| 161 |
chost[len - 1] = '\0'; |
| 162 |
} |
| 163 |
if (strcasecmp(resolvedname, chost) != 0) |
163 |
if (strcasecmp(resolvedname, chost) != 0) |
| 164 |
logit("userauth_hostbased mismatch: " |
164 |
logit("userauth_hostbased mismatch: " |
| 165 |
"client sends %s, but we resolve %s to %s", |
165 |
"client sends %s, but we resolve %s to %s", |