diff options
Diffstat (limited to 'auth2-none.c')
-rw-r--r-- | auth2-none.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/auth2-none.c b/auth2-none.c index 2bf5b5c80..1c30a3203 100644 --- a/auth2-none.c +++ b/auth2-none.c | |||
@@ -74,6 +74,19 @@ auth2_read_banner(void) | |||
74 | return (banner); | 74 | return (banner); |
75 | } | 75 | } |
76 | 76 | ||
77 | void | ||
78 | userauth_send_banner(const char *msg) | ||
79 | { | ||
80 | if (datafellows & SSH_BUG_BANNER) | ||
81 | return; | ||
82 | |||
83 | packet_start(SSH2_MSG_USERAUTH_BANNER); | ||
84 | packet_put_cstring(msg); | ||
85 | packet_put_cstring(""); /* language, unused */ | ||
86 | packet_send(); | ||
87 | debug("%s: sent", __func__); | ||
88 | } | ||
89 | |||
77 | static void | 90 | static void |
78 | userauth_banner(void) | 91 | userauth_banner(void) |
79 | { | 92 | { |
@@ -84,12 +97,8 @@ userauth_banner(void) | |||
84 | 97 | ||
85 | if ((banner = PRIVSEP(auth2_read_banner())) == NULL) | 98 | if ((banner = PRIVSEP(auth2_read_banner())) == NULL) |
86 | goto done; | 99 | goto done; |
100 | userauth_send_banner(banner); | ||
87 | 101 | ||
88 | packet_start(SSH2_MSG_USERAUTH_BANNER); | ||
89 | packet_put_cstring(banner); | ||
90 | packet_put_cstring(""); /* language, unused */ | ||
91 | packet_send(); | ||
92 | debug("userauth_banner: sent"); | ||
93 | done: | 102 | done: |
94 | if (banner) | 103 | if (banner) |
95 | xfree(banner); | 104 | xfree(banner); |
@@ -103,7 +112,7 @@ userauth_none(Authctxt *authctxt) | |||
103 | userauth_banner(); | 112 | userauth_banner(); |
104 | #ifdef HAVE_CYGWIN | 113 | #ifdef HAVE_CYGWIN |
105 | if (check_nt_auth(1, authctxt->pw) == 0) | 114 | if (check_nt_auth(1, authctxt->pw) == 0) |
106 | return(0); | 115 | return (0); |
107 | #endif | 116 | #endif |
108 | if (options.password_authentication) | 117 | if (options.password_authentication) |
109 | return (PRIVSEP(auth_password(authctxt, ""))); | 118 | return (PRIVSEP(auth_password(authctxt, ""))); |