diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-04-11 08:43:59 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-04-11 08:43:59 +0100 |
commit | bb59556b3302a941db4630613c604644d5f7a617 (patch) | |
tree | 42e60b7ae227b0fe3af52dfac08d59653066a2db /mail-mta/sendmail/files | |
parent | 3cd09a18bad26aad2645241b868755cfdf41b6ae (diff) |
Diffstat (limited to 'mail-mta/sendmail/files')
4 files changed, 79 insertions, 0 deletions
diff --git a/mail-mta/sendmail/files/sendmail-8.18.1-ctime.patch b/mail-mta/sendmail/files/sendmail-8.18.1-ctime.patch new file mode 100644 index 000000000000..2db37c424652 --- /dev/null +++ b/mail-mta/sendmail/files/sendmail-8.18.1-ctime.patch @@ -0,0 +1,13 @@ +Bug: https://bugs.gentoo.org/945726 + +--- a/mailstats/mailstats.c ++++ b/mailstats/mailstats.c +@@ -65,7 +65,7 @@ + char sfilebuf[MAXPATHLEN]; + char buf[MAXLINE]; + struct statistics stats; +- extern char *ctime(); ++ extern char *ctime(const time_t *); + extern char *optarg; + extern int optind; + # define MSOPTS "cC:f:opP" diff --git a/mail-mta/sendmail/files/sendmail-maildir.mc b/mail-mta/sendmail/files/sendmail-maildir.mc new file mode 100644 index 000000000000..eb8a3f06c48f --- /dev/null +++ b/mail-mta/sendmail/files/sendmail-maildir.mc @@ -0,0 +1,13 @@ +divert(-1) +divert(0)dnl +include(`/usr/share/sendmail-cf/m4/cf.m4')dnl +VERSIONID(`$Id$')dnl +OSTYPE(linux)dnl +DOMAIN(generic)dnl +FEATURE(`smrsh',`/usr/sbin/smrsh')dnl +FEATURE(`local_lmtp',`/usr/sbin/mail.local')dnl +FEATURE(`local_procmail')dnl +dnl FEATURE(`local_procmail',`/usr/bin/maildrop',`maildrop -d $u')dnl +MAILER(local)dnl +MAILER(smtp)dnl +MAILER(procmail)dnl diff --git a/mail-mta/sendmail/files/sendmail-musl-disable-cdefs.patch b/mail-mta/sendmail/files/sendmail-musl-disable-cdefs.patch new file mode 100644 index 000000000000..6dc4ac63105e --- /dev/null +++ b/mail-mta/sendmail/files/sendmail-musl-disable-cdefs.patch @@ -0,0 +1,11 @@ +--- a/include/sm/os/sm_os_linux.h 2020-06-09 11:57:46.789786561 +0200 ++++ b/include/sm/os/sm_os_linux.h 2020-06-09 11:57:49.174781812 +0200 +@@ -33,7 +33,7 @@ + # endif /* LINUX_VERSION_CODE */ + #endif /* SM_CONF_SHM */ + +-#define SM_CONF_SYS_CDEFS_H 1 ++#define SM_CONF_SYS_CDEFS_H 0 + #ifndef SM_CONF_SEM + # define SM_CONF_SEM 2 + #endif /* SM_CONF_SEM */ diff --git a/mail-mta/sendmail/files/sendmail-musl-stack-size.patch b/mail-mta/sendmail/files/sendmail-musl-stack-size.patch new file mode 100644 index 000000000000..9993adfece34 --- /dev/null +++ b/mail-mta/sendmail/files/sendmail-musl-stack-size.patch @@ -0,0 +1,42 @@ +Set default pthread stack size to 256 KB + +This patch tries to fix various crashes for applications depending on libmilter +by setting the stack size for pthreads to 256 KB. The default stack size for +musl libc is set to 80 KB whereas glibc has it set to 8 MB. This causes problems +when a large amount of memory is allocated on the stack. + +For example, opendkim allocates blocks of 64 KB multiple times, which causes +libmilter (and therefore opendkim) to crash. For now, a stack size of 256 KB +looks sufficient and makes opendkim stop crashing. + +Fixes https://bugs.alpinelinux.org/issues/6360 + +--- a/libmilter/libmilter.h ++++ b/libmilter/libmilter.h +@@ -127,10 +127,10 @@ + # define MI_SOCK_READ(s, b, l) read(s, b, l) + # define MI_SOCK_READ_FAIL(x) ((x) < 0) + # define MI_SOCK_WRITE(s, b, l) write(s, b, l) +- +-# define thread_create(ptid,wr,arg) pthread_create(ptid, NULL, wr, arg) + # define sthread_get_id() pthread_self() + ++extern int thread_create(pthread_t *ptid, void *(*wr) (void *), void *arg); ++ + typedef pthread_mutex_t smutex_t; + # define smutex_init(mp) (pthread_mutex_init(mp, NULL) == 0) + # define smutex_destroy(mp) (pthread_mutex_destroy(mp) == 0) +--- a/libmilter/main.c ++++ b/libmilter/main.c +@@ -16,6 +16,12 @@ + #include <fcntl.h> + #include <sys/stat.h> + ++int thread_create(pthread_t *ptid, void *(*wr) (void *), void *arg) { ++ pthread_attr_t attr; ++ pthread_attr_init(&attr); ++ pthread_attr_setstacksize(&attr,256*1024); ++ return pthread_create(ptid, &attr, wr, arg); ++} + + static smfiDesc_ptr smfi = NULL; |