]> andersk Git - openssh.git/blobdiff - auth2-none.c
- (tim) [kex.c myproposal.h md-sha256.c openbsd-compat/sha2.c,h] Disable
[openssh.git] / auth2-none.c
index 2bf5b5c80c931123438a6606e031e49ded76601b..2eb27a914030d2665463f2f0992e3d873bcc9e91 100644 (file)
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth2-none.c,v 1.7 2004/05/11 19:01:43 deraadt Exp $");
+RCSID("$OpenBSD: auth2-none.c,v 1.8 2006/02/20 17:19:54 stevesk Exp $");
+
+#include <sys/types.h>
+#include <sys/stat.h>
 
 #include "auth.h"
 #include "xmalloc.h"
@@ -74,6 +77,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 +100,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 +115,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, "")));
This page took 0.100363 seconds and 4 git commands to generate.