diff options
author | Colin Watson <cjwatson@debian.org> | 2005-05-25 11:01:01 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2005-05-25 11:01:01 +0000 |
commit | e88de75a1a236779a10e8ccbcc51d25308be8840 (patch) | |
tree | 7495477a2a7d0cac17a9fcded020b6ea816182ef /auth2-none.c | |
parent | 30a0f9443782cd9d7308acd09430bf586186aa55 (diff) | |
parent | 5d05471f6657646d1d6500c7c43134462c407ee6 (diff) |
Merge 4.0p1 to the trunk.
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, ""))); |