opensmtpd: fix realpath() on glibc with FORTIFY_SOURCE.

PATH_MAX must be at least 4096, otherwise glibc will abort because it
thinks there's a buffer overflow if it's compiled with _FORTIFY_SOURCE.
This commit is contained in:
Juan RP 2015-04-01 12:29:26 +02:00
parent a0a32b2262
commit 01523bbb48
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,18 @@
Don't override PATH_MAX, glibc with FORTIFY_SOURCE exactly wants
it as 4096 bytes at least, otherwise it will abort().
-- xtraeme
--- openbsd-compat/defines.h.orig 2015-04-01 12:25:34.304411927 +0200
+++ openbsd-compat/defines.h 2015-04-01 12:26:10.832810710 +0200
@@ -65,10 +65,6 @@ enum
* Looks like ugly, but MAX_IMSGSIZE equals 16384,
* and if we don't care it will overflow for some struct
*/
-#if PATH_MAX > 1024
-# undef PATH_MAX
-# define PATH_MAX 1024
-#endif
#if MAXPATHLEN > 1024
# undef MAXPATHLEN

View File

@ -1,7 +1,7 @@
# Template file for 'opensmtpd'
pkgname=opensmtpd
version=5.4.4p1
revision=7
revision=8
build_style=gnu-configure
configure_args="--sysconfdir=/etc/smtpd --sbindir=/usr/sbin
--with-maildir=/var/spool/mail --with-privsep-path=/var/db