diff options
Diffstat (limited to 'qmail-smtpd.c')
| -rw-r--r-- | qmail-smtpd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qmail-smtpd.c b/qmail-smtpd.c index 1036eef..20027b0 100644 --- a/qmail-smtpd.c +++ b/qmail-smtpd.c | |||
| @@ -63,6 +63,7 @@ char *remotehost; | |||
| 63 | char *remoteinfo; | 63 | char *remoteinfo; |
| 64 | char *local; | 64 | char *local; |
| 65 | char *relayclient; | 65 | char *relayclient; |
| 66 | static const stralloc *client_get_session_id(); | ||
| 66 | 67 | ||
| 67 | #ifdef TLS | 68 | #ifdef TLS |
| 68 | # include <sys/stat.h> | 69 | # include <sys/stat.h> |
| @@ -346,6 +347,9 @@ void setup() | |||
| 346 | else | 347 | else |
| 347 | #endif | 348 | #endif |
| 348 | dohelo(remotehost); | 349 | dohelo(remotehost); |
| 350 | |||
| 351 | /* generate session */ | ||
| 352 | (void)client_get_session_id(); | ||
| 349 | } | 353 | } |
| 350 | 354 | ||
| 351 | 355 | ||
| @@ -959,7 +963,7 @@ void smtp_data(arg) char *arg; { | |||
| 959 | if (flagauth) | 963 | if (flagauth) |
| 960 | received_authed(&qqt,protocol,local,remoteinfo,client_get_session_id()->s); | 964 | received_authed(&qqt,protocol,local,remoteinfo,client_get_session_id()->s); |
| 961 | else | 965 | else |
| 962 | received(&qqt,protocol,local,remoteip,remotehost,remoteinfo,fakehelo); | 966 | received(&qqt,protocol,local,remoteip,remotehost,remoteinfo,client_get_session_id()->s,fakehelo); |
| 963 | qmail_put(&qqt,sppheaders.s,sppheaders.len); /* set in qmail-spp.c */ | 967 | qmail_put(&qqt,sppheaders.s,sppheaders.len); /* set in qmail-spp.c */ |
| 964 | spp_rset(); | 968 | spp_rset(); |
| 965 | blast(&hops); | 969 | blast(&hops); |
| @@ -1244,7 +1248,6 @@ char *arg; | |||
| 1244 | 1248 | ||
| 1245 | switch (authcmds[i].fun(arg)) { | 1249 | switch (authcmds[i].fun(arg)) { |
| 1246 | case 0: | 1250 | case 0: |
| 1247 | (void)client_get_session_id(); /* generate session */ | ||
| 1248 | if (!spp_auth(authcmds[i].text, user.s)) return; | 1251 | if (!spp_auth(authcmds[i].text, user.s)) return; |
| 1249 | flagauth = 1; | 1252 | flagauth = 1; |
| 1250 | if (ssl) { | 1253 | if (ssl) { |
