X-Git-Url: http://andersk.mit.edu/gitweb/gssapi-openssh.git/blobdiff_plain/7e82606eb98e6071e4ad650b91a75933c1358485..3114afc159b3a2502eb5675b5b07484f6e71b71a:/openssh/auth2-none.c diff --git a/openssh/auth2-none.c b/openssh/auth2-none.c index 2bf5b5c..952b448 100644 --- a/openssh/auth2-none.c +++ b/openssh/auth2-none.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth2-none.c,v 1.13 2006/08/05 07:52:52 dtucker Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -23,16 +24,29 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth2-none.c,v 1.7 2004/05/11 19:01:43 deraadt Exp $"); -#include "auth.h" +#include +#include +#include + +#include +#include +#include + #include "xmalloc.h" +#include "key.h" +#include "hostfile.h" +#include "auth.h" #include "packet.h" #include "log.h" +#include "buffer.h" #include "servconf.h" #include "atomicio.h" #include "compat.h" #include "ssh2.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" /* import */ @@ -74,6 +88,19 @@ auth2_read_banner(void) return (banner); } +void +userauth_send_banner(const char *msg) +{ + if (datafellows & SSH_BUG_BANNER) + return; + + packet_start(SSH2_MSG_USERAUTH_BANNER); + packet_put_cstring(msg); + packet_put_cstring(""); /* language, unused */ + packet_send(); + debug("%s: sent", __func__); +} + static void userauth_banner(void) { @@ -84,12 +111,8 @@ userauth_banner(void) if ((banner = PRIVSEP(auth2_read_banner())) == NULL) goto done; + userauth_send_banner(banner); - packet_start(SSH2_MSG_USERAUTH_BANNER); - packet_put_cstring(banner); - packet_put_cstring(""); /* language, unused */ - packet_send(); - debug("userauth_banner: sent"); done: if (banner) xfree(banner); @@ -103,7 +126,7 @@ userauth_none(Authctxt *authctxt) userauth_banner(); #ifdef HAVE_CYGWIN if (check_nt_auth(1, authctxt->pw) == 0) - return(0); + return (0); #endif if (options.password_authentication) return (PRIVSEP(auth_password(authctxt, "")));