summaryrefslogtreecommitdiffstats
path: root/auth2.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-04-19 22:40:45 +0200
committerBen Lindstrom <mouring@eviladmin.org>2001-04-19 22:40:45 +0200
commit671388f2338ddb335b01f1c3cf545caa9f90649e (patch)
treeb43a722ec745e4be91af596d0f0603f3c1715e18 /auth2.c
parent - markus@cvs.openbsd.org 2001/04/18 22:48:26 (diff)
downloadopenssh-671388f2338ddb335b01f1c3cf545caa9f90649e.tar.xz
openssh-671388f2338ddb335b01f1c3cf545caa9f90649e.zip
- markus@cvs.openbsd.org 2001/04/18 23:43:26
[auth2.c compat.c sshconnect2.c] more ssh v2 hostbased-auth interop: ssh.com >= 2.1.0 works now (however the 2.1.0 server seems to work only if debug is enabled...)
Diffstat (limited to 'auth2.c')
-rw-r--r--auth2.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/auth2.c b/auth2.c
index 5db8f8d5d..1abb01d2a 100644
--- a/auth2.c
+++ b/auth2.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth2.c,v 1.54 2001/04/18 22:48:26 markus Exp $");
+RCSID("$OpenBSD: auth2.c,v 1.55 2001/04/18 23:43:25 markus Exp $");
#include <openssl/evp.h>
@@ -534,8 +534,7 @@ userauth_hostbased(Authctxt *authctxt)
{
Buffer b;
Key *key;
- char *pkalg, *pkblob, *sig;
- char *cuser, *chost;
+ char *pkalg, *pkblob, *sig, *cuser, *chost, *service;
u_int alen, blen, slen;
int pktype;
int authenticated = 0;
@@ -571,21 +570,14 @@ userauth_hostbased(Authctxt *authctxt)
debug("userauth_hostbased: cannot decode key: %s", pkalg);
goto done;
}
+ service = datafellows & SSH_BUG_HBSERVICE ? "ssh-userauth" :
+ authctxt->service;
buffer_init(&b);
- if (datafellows & SSH_OLD_SESSIONID) {
- buffer_append(&b, session_id2, session_id2_len);
- } else {
- buffer_put_string(&b, session_id2, session_id2_len);
- }
- if (datafellows & SSH_BUG_HBSERVICE)
- debug("SSH_BUG_HBSERVICE");
+ buffer_put_string(&b, session_id2, session_id2_len);
/* reconstruct packet */
buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST);
buffer_put_cstring(&b, authctxt->user);
- buffer_put_cstring(&b,
- datafellows & SSH_BUG_HBSERVICE ?
- "ssh-userauth" :
- authctxt->service);
+ buffer_put_cstring(&b, service);
buffer_put_cstring(&b, "hostbased");
buffer_put_string(&b, pkalg, alen);
buffer_put_string(&b, pkblob, blen);