]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
snapshot-20000822
authorWietse Venema <wietse@porcupine.org>
Tue, 22 Aug 2000 00:00:00 +0000 (00:00 +0000)
committerWietse Venema <wietse@porcupine.org>
Thu, 17 Jan 2013 23:12:19 +0000 (18:12 -0500)
postfix/HISTORY
postfix/global/mail_version.h
postfix/smtpd/smtpd_sasl_proto.c
postfix/util/file_limit.c

index 17b46c12801107c2bbe0cb094af059e8568d11c7..6116015b312584877b58dc4c1c2a66d772b873e1 100644 (file)
@@ -4136,3 +4136,14 @@ Apologies for any names omitted.
        Cleanup: smtpd now replies with 555 when the client sends
        unrecognized RCPT TO parameters, as required by RFC 1869
        (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.
index 9d6310f5bd13790a4444722d0b54491677494c56..79c4668324dd7b188f9d44af439a0d0bb3595ae7 100644 (file)
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Snapshot-20000821"
+#define DEF_MAIL_VERSION       "Snapshot-20000822"
 extern char *var_mail_version;
 
 /* LICENSE
index 02ee490a3927fdfbd66ba027b19ded9f7d021307..8e762f41fcdcac6ec5ac58956097447621336768 100644 (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);
     err = smtpd_sasl_authenticate(state, auth_mechanism, initial_response);
     if (err != 0) {
-       msg_warn("%s[%s]: SASL authentication failed",
-                state->name, state->addr);
+       msg_warn("%s[%s]: SASL %s authentication failed",
+                state->name, state->addr, auth_mechanism);
        smtpd_chat_reply(state, "%s", err);
        return (-1);
     }
index a45c0a26d5a423d2bc92a6419aaa1208625b0343..91066dacdb101e2656f481b014d28b9a7e4e01f1 100644 (file)
@@ -44,6 +44,7 @@
 #include <sys/resource.h>
 #include <signal.h>
 #endif
+#include <limits.h>
 
 /* Utility library. */
 
 
 off_t   get_file_limit(void)
 {
-#ifdef USE_ULIMIT
     off_t   limit;
 
+#ifdef USE_ULIMIT
     if ((limit = ulimit(UL_GETFSIZE, 0)) < 0)
        msg_fatal("ulimit: %m");
+    if (limit > INT_MAX / ULIMIT_BLOCK_SIZE)
+       limit = INT_MAX / ULIMIT_BLOCK_SIZE;
     return (limit * ULIMIT_BLOCK_SIZE);
 #else
     struct rlimit rlim;
 
     if (getrlimit(RLIMIT_FSIZE, &rlim) < 0)
        msg_fatal("getrlimit: %m");
-    return (rlim.rlim_cur);
+    limit = rlim.rlim_cur;
+    return (limit < 0 ? INT_MAX : rlim.rlim_cur);
 #endif                                         /* USE_ULIMIT */
 }