[auth2-hostbased.c]
     strip trailing '.' from hostname when HostbasedUsesNameFromPacketOnly=yes
     report and patch from res AT qoxp.net (bz#1200); ok markus@
This commit is contained in:
Damien Miller 2008-07-17 18:57:19 +10:00
Родитель 7ba0ca7f6f
Коммит a1d03a5069
2 изменённых файлов: 11 добавлений и 6 удалений

Просмотреть файл

@ -3,6 +3,10 @@
- djm@cvs.openbsd.org 2008/07/17 08:48:00
[sshconnect2.c]
strnvis preauth banner; pointed out by mpf@ ok markus@
- djm@cvs.openbsd.org 2008/07/17 08:51:07
[auth2-hostbased.c]
strip trailing '.' from hostname when HostbasedUsesNameFromPacketOnly=yes
report and patch from res AT qoxp.net (bz#1200); ok markus@
20080716
- OpenBSD CVS Sync
@ -4690,4 +4694,4 @@
OpenServer 6 and add osr5bigcrypt support so when someone migrates
passwords between UnixWare and OpenServer they will still work. OK dtucker@
$Id: ChangeLog,v 1.5088 2008/07/17 08:57:06 djm Exp $
$Id: ChangeLog,v 1.5089 2008/07/17 08:57:19 djm Exp $

Просмотреть файл

@ -1,4 +1,4 @@
/* $OpenBSD: auth2-hostbased.c,v 1.11 2006/08/03 03:34:41 deraadt Exp $ */
/* $OpenBSD: auth2-hostbased.c,v 1.12 2008/07/17 08:51:07 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@ -151,15 +151,16 @@ hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,
debug2("userauth_hostbased: chost %s resolvedname %s ipaddr %s",
chost, resolvedname, ipaddr);
if (((len = strlen(chost)) > 0) && chost[len - 1] == '.') {
debug2("stripping trailing dot from chost %s", chost);
chost[len - 1] = '\0';
}
if (options.hostbased_uses_name_from_packet_only) {
if (auth_rhosts2(pw, cuser, chost, chost) == 0)
return 0;
lookup = chost;
} else {
if (((len = strlen(chost)) > 0) && chost[len - 1] == '.') {
debug2("stripping trailing dot from chost %s", chost);
chost[len - 1] = '\0';
}
if (strcasecmp(resolvedname, chost) != 0)
logit("userauth_hostbased mismatch: "
"client sends %s, but we resolve %s to %s",