summaryrefslogtreecommitdiff
path: root/auth2-none.c
diff options
context:
space:
mode:
authordtucker <dtucker>2004-09-11 13:07:03 +0000
committerdtucker <dtucker>2004-09-11 13:07:03 +0000
commit9d83f23f2fcbfea1ce09025a87ef2528c979146b (patch)
tree7044c36b48e013d21fe6e98b0caf5cc69b5ac7b2 /auth2-none.c
parentdf28a1ce6463e9e4d83a1e15f92558fec2a95a61 (diff)
downloadopenssh-9d83f23f2fcbfea1ce09025a87ef2528c979146b.tar.gz
- (dtucker) [auth-pam.c auth.h auth2-none.c auth2.c monitor.c monitor_wrap.c]
Bug #892: Send messages from failing PAM account modules to the client via SSH2_MSG_USERAUTH_BANNER messages. Note that this will not happen with SSH2 kbdint authentication, which need to be dealt with separately. ok djm@
Diffstat (limited to 'auth2-none.c')
-rw-r--r--auth2-none.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/auth2-none.c b/auth2-none.c
index 787458da..1c30a320 100644
--- a/auth2-none.c
+++ b/auth2-none.c
@@ -74,6 +74,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 +97,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);