pkgsrc/mail/sendmail/patches/patch-af
jnemeth 04f01c205f Update to sendmail 8.14.9: this fixes a minor potential security issue
pkgsrc changes:

- consolidate several patches into site.config.m4
  - pkgsrc LDFLAGS should always be used
- don't bother specifying file owner/group anywhere except in Makefile
- create include/sm/os/sm_os_netbsd.h to fix warnings and OS specific stuff
- install mail.local and rmail
- convert to use res_n* functions
  - allows for linking against threaded libraries
- add a TODO file
- PR/35249 - Loren M. Lang
  - can't find libraries on Linux, this should be fixed by using pkgsrc LDFLAGS
- PR/46694 - Makoto Fujiwara
  - bring back netbsd-proto.mc from when sendmail was part of the base system
- PR/47207 - Richard Palo
  - let pkgsrc infrastructure handle file ownership and group
- PR/48566 - Emmanuel Dreyfus
  - always set _FFR_USE_GETPWNAM_ERRNO on NetBSD
  - roll ffr_tls_1 and the suggested ffr_tls_ec into one new ffr_tls option
    - not enabled by default because it changes behaviour

8.14.9/8.14.9   2014/05/21
        SECURITY: Properly set the close-on-exec flag for file descriptors
                (except stdin, stdout, and stderr) before executing mailers.
        Fix a misformed comment in conf.c: "/*" within comment
                which may cause a compilation error on some systems.
                Problem reported by John Beck of Oracle.
        DEVTOOLS: Fix regression in auto-detection of libraries when only
                shared libraries are available.  Problem reported by
                Bryan Costales.
2014-06-15 20:48:49 +00:00

42 lines
1.3 KiB
Text

$NetBSD: patch-af,v 1.12 2014/06/15 20:48:50 jnemeth Exp $
--- sendmail/conf.c.orig 2014-05-20 17:24:39.000000000 +0000
+++ sendmail/conf.c
@@ -43,6 +43,10 @@ SM_RCSID("@(#)$Id: conf.c,v 8.1191 2014-
# include <ulimit.h>
#endif /* HASULIMIT && defined(HPUX11) */
+#if !HAS_GETHOSTBYNAME2
+extern struct __res_state sm_res;
+#endif
+
static void setupmaps __P((void));
static void setupmailers __P((void));
static void setupqueues __P((void));
@@ -4242,13 +4246,13 @@ sm_getipnodebyname(name, family, flags,
if (family == AF_INET6)
{
/* From RFC2133, section 6.1 */
- resv6 = bitset(RES_USE_INET6, _res.options);
- _res.options |= RES_USE_INET6;
+ resv6 = bitset(RES_USE_INET6, sm_res.options);
+ sm_res.options |= RES_USE_INET6;
}
SM_SET_H_ERRNO(0);
h = gethostbyname(name);
if (!resv6)
- _res.options &= ~RES_USE_INET6;
+ sm_res.options &= ~RES_USE_INET6;
/* the function is supposed to return only the requested family */
if (h != NULL && h->h_addrtype != family)
@@ -4463,7 +4467,8 @@ sm_gethostbyaddr(addr, len, type)
#if NETINET6
if (type == AF_INET6 &&
- IN6_IS_ADDR_UNSPECIFIED((struct in6_addr *) addr))
+ (IN6_IS_ADDR_UNSPECIFIED((struct in6_addr *) addr) ||
+ IN6_IS_ADDR_LINKLOCAL((struct in6_addr *) addr)))
{
/* Avoid reverse lookup for IPv6 unspecified address */
SM_SET_H_ERRNO(HOST_NOT_FOUND);