diff options
author | Darren Tucker <dtucker@zip.com.au> | 2004-09-11 23:07:03 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2004-09-11 23:07:03 +1000 |
commit | 77fc29eeb382974ae063227c249ee3b98646e38a (patch) | |
tree | fba14efc7adf195758fc0e556c88d8fcc772919c /auth2-none.c | |
parent | 4765679649c51a83e5ceb3d0c1e51e33db251f27 (diff) |
- (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.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/auth2-none.c b/auth2-none.c index 787458dad..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); |