michael@146: Index: makedefs michael@146: --- makedefs.orig 2008-01-15 21:20:24 +0100 michael@146: +++ makedefs 2008-01-24 12:31:48 +0100 michael@146: @@ -132,6 +132,10 @@ michael@146: ;; michael@146: FreeBSD.7*) SYSTYPE=FREEBSD7 michael@146: ;; michael@146: + FreeBSD.7*) SYSTYPE=FREEBSD7 michael@146: + ;; michael@146: + FreeBSD.8*) SYSTYPE=FREEBSD8 michael@146: + ;; michael@146: OpenBSD.2*) SYSTYPE=OPENBSD2 michael@146: ;; michael@146: OpenBSD.3*) SYSTYPE=OPENBSD3 michael@146: Index: src/util/file_limit.c michael@146: --- src/util/file_limit.c.orig 2003-10-22 20:48:36 +0200 michael@146: +++ src/util/file_limit.c 2008-01-24 12:31:48 +0100 michael@146: @@ -80,12 +80,21 @@ michael@146: void set_file_limit(off_t limit) michael@146: { michael@146: #ifdef USE_ULIMIT michael@146: +#ifdef USE_SOFTLIMITONLY michael@146: +#error "USE_ULIMIT and USE_SOFTLIMITONLY are mutual exclusive" michael@146: +#endif michael@146: if (ulimit(UL_SETFSIZE, limit / ULIMIT_BLOCK_SIZE) < 0) michael@146: msg_fatal("ulimit: %m"); michael@146: #else michael@146: struct rlimit rlim; michael@146: michael@146: +#ifdef USE_SOFTLIMITONLY michael@146: + if (getrlimit(RLIMIT_FSIZE, &rlim) < 0) michael@146: + rlim.rlim_max = RLIM_INFINITY; michael@146: + rlim.rlim_cur = limit; michael@146: +#else michael@146: rlim.rlim_cur = rlim.rlim_max = limit; michael@146: +#endif michael@146: if (setrlimit(RLIMIT_FSIZE, &rlim) < 0) michael@146: msg_fatal("setrlimit: %m"); michael@146: #ifdef SIGXFSZ michael@146: Index: src/util/msg_syslog.c michael@146: --- src/util/msg_syslog.c.orig 2006-06-15 20:07:16 +0200 michael@146: +++ src/util/msg_syslog.c 2008-01-24 12:31:48 +0100 michael@146: @@ -50,6 +50,11 @@ michael@146: #include michael@146: #include michael@146: #include michael@146: +#ifdef USE_SOFTLIMITONLY michael@146: +#include michael@146: +#include michael@146: +#include michael@146: +#endif michael@146: michael@146: /* Application-specific. */ michael@146: michael@146: @@ -144,6 +149,9 @@ michael@146: michael@146: static void msg_syslog_print(int level, const char *text) michael@146: { michael@146: +#ifdef USE_SOFTLIMITONLY michael@146: + struct rlimit save, rlim; michael@146: +#endif michael@146: static int log_level[] = { michael@146: LOG_INFO, LOG_WARNING, LOG_ERR, LOG_CRIT, LOG_CRIT, michael@146: }; michael@146: @@ -154,6 +162,15 @@ michael@146: if (level < 0 || level >= (int) (sizeof(log_level) / sizeof(log_level[0]))) michael@146: msg_panic("msg_syslog_print: invalid severity level: %d", level); michael@146: michael@146: +#ifdef USE_SOFTLIMITONLY michael@146: + if (getrlimit(RLIMIT_FSIZE, &save) < 0) { michael@146: + save.rlim_cur = RLIM_INFINITY; michael@146: + save.rlim_max = RLIM_INFINITY; michael@146: + } michael@146: + rlim.rlim_cur = save.rlim_max; michael@146: + rlim.rlim_max = save.rlim_max; michael@146: + (void)setrlimit(RLIMIT_FSIZE, &rlim); michael@146: +#endif michael@146: if (level == MSG_INFO) { michael@146: syslog(syslog_facility | log_level[level], "%.*s", michael@146: (int) MSG_SYSLOG_RECLEN, text); michael@146: @@ -161,6 +178,9 @@ michael@146: syslog(syslog_facility | log_level[level], "%s: %.*s", michael@146: severity_name[level], (int) MSG_SYSLOG_RECLEN, text); michael@146: } michael@146: +#ifdef USE_SOFTLIMITONLY michael@146: + (void)setrlimit(RLIMIT_FSIZE, &save); michael@146: +#endif michael@146: } michael@146: michael@146: /* msg_syslog_init - initialize */ michael@146: Index: src/util/sys_defs.h michael@146: --- src/util/sys_defs.h.orig 2008-01-15 01:51:44 +0100 michael@146: +++ src/util/sys_defs.h 2008-01-24 12:32:41 +0100 michael@146: @@ -24,7 +24,7 @@ michael@146: * 4.4BSD and close derivatives. michael@146: */ michael@146: #if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \ michael@146: - || defined(FREEBSD5) || defined(FREEBSD6) || defined(FREEBSD7) \ michael@146: + || defined(FREEBSD5) || defined(FREEBSD6) || defined(FREEBSD7) || defined(FREEBSD8) \ michael@146: || defined(BSDI2) || defined(BSDI3) || defined(BSDI4) \ michael@146: || defined(OPENBSD2) || defined(OPENBSD3) || defined(OPENBSD4) \ michael@146: || defined(NETBSD1) || defined(NETBSD2) || defined(NETBSD3) \ michael@146: Index: src/smtp/smtp_reuse.c michael@147: --- src/smtp/smtp_reuse.c.orig 2008-12-04 01:06:42.000000000 +0100 michael@147: +++ src/smtp/smtp_reuse.c 2009-04-06 20:38:18.974597344 +0200 michael@146: @@ -216,7 +216,9 @@ michael@146: /* michael@146: * Avoid poor performance when TCP MSS > VSTREAM_BUFSIZE. michael@146: */ michael@146: +#if 0 michael@147: vstream_tweak_sock(session->stream); michael@146: +#endif michael@146: michael@146: /* michael@146: * Update the list of used cached addresses.