2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-29 13:18:12 +00:00

snapshot-20000822

This commit is contained in:
Wietse Venema 2000-08-22 00:00:00 +00:00
parent 22a2901531
commit df4c6b1b13
4 changed files with 20 additions and 5 deletions

View File

@ -4136,3 +4136,14 @@ Apologies for any names omitted.
Cleanup: smtpd now replies with 555 when the client sends Cleanup: smtpd now replies with 555 when the client sends
unrecognized RCPT TO parameters, as required by RFC 1869 unrecognized RCPT TO parameters, as required by RFC 1869
(problem report by Robert Norris @ its.monash.edu.au). (problem report by Robert Norris @ its.monash.edu.au).
20000822
Logging: the SMTP server's SASL code logs the authentication
method along with an authentication failure. Suggested by
Ronald F. Guilmette @ monkeys.com.
Workaround: some systems have file size resource limits
that cannot be represented with the off_t type that is used
by standard functions such as lseek(2). Problem reported
by Blaz Zupan @ amis.net.

View File

@ -15,7 +15,7 @@
* Version of this program. * Version of this program.
*/ */
#define VAR_MAIL_VERSION "mail_version" #define VAR_MAIL_VERSION "mail_version"
#define DEF_MAIL_VERSION "Snapshot-20000821" #define DEF_MAIL_VERSION "Snapshot-20000822"
extern char *var_mail_version; extern char *var_mail_version;
/* LICENSE /* LICENSE

View File

@ -148,8 +148,8 @@ int smtpd_sasl_auth_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
initial_response = (argc == 3 ? argv[2].strval : 0); initial_response = (argc == 3 ? argv[2].strval : 0);
err = smtpd_sasl_authenticate(state, auth_mechanism, initial_response); err = smtpd_sasl_authenticate(state, auth_mechanism, initial_response);
if (err != 0) { if (err != 0) {
msg_warn("%s[%s]: SASL authentication failed", msg_warn("%s[%s]: SASL %s authentication failed",
state->name, state->addr); state->name, state->addr, auth_mechanism);
smtpd_chat_reply(state, "%s", err); smtpd_chat_reply(state, "%s", err);
return (-1); return (-1);
} }

View File

@ -44,6 +44,7 @@
#include <sys/resource.h> #include <sys/resource.h>
#include <signal.h> #include <signal.h>
#endif #endif
#include <limits.h>
/* Utility library. */ /* Utility library. */
@ -56,18 +57,21 @@
off_t get_file_limit(void) off_t get_file_limit(void)
{ {
#ifdef USE_ULIMIT
off_t limit; off_t limit;
#ifdef USE_ULIMIT
if ((limit = ulimit(UL_GETFSIZE, 0)) < 0) if ((limit = ulimit(UL_GETFSIZE, 0)) < 0)
msg_fatal("ulimit: %m"); msg_fatal("ulimit: %m");
if (limit > INT_MAX / ULIMIT_BLOCK_SIZE)
limit = INT_MAX / ULIMIT_BLOCK_SIZE;
return (limit * ULIMIT_BLOCK_SIZE); return (limit * ULIMIT_BLOCK_SIZE);
#else #else
struct rlimit rlim; struct rlimit rlim;
if (getrlimit(RLIMIT_FSIZE, &rlim) < 0) if (getrlimit(RLIMIT_FSIZE, &rlim) < 0)
msg_fatal("getrlimit: %m"); msg_fatal("getrlimit: %m");
return (rlim.rlim_cur); limit = rlim.rlim_cur;
return (limit < 0 ? INT_MAX : rlim.rlim_cur);
#endif /* USE_ULIMIT */ #endif /* USE_ULIMIT */
} }