]> andersk Git - openssh.git/blobdiff - auth2-none.c
- deraadt@cvs.openbsd.org 2006/03/19 18:51:18
[openssh.git] / auth2-none.c
index 787458dadd7fc407f6a95e45eccf2f635377be65..19cc2b1b77bfc49afe376217d30c17d92f235b63 100644 (file)
@@ -23,7 +23,9 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth2-none.c,v 1.7 2004/05/11 19:01:43 deraadt Exp $");
+
+#include <sys/types.h>
+#include <sys/stat.h>
 
 #include "auth.h"
 #include "xmalloc.h"
@@ -74,6 +76,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 +99,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);
This page took 0.361876 seconds and 4 git commands to generate.