aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrene <rene@FreeBSD.org>2010-08-02 03:12:17 +0800
committerrene <rene@FreeBSD.org>2010-08-02 03:12:17 +0800
commit2fcc741958daa620234b2cd4c90e0d66ea9d8d27 (patch)
tree8595190f8e3641f78c436b9e7867b0d65bac03da /net
parentf443a5d8cda69d92f80b8b41b4ca24293fbad4b0 (diff)
downloadfreebsd-ports-gnome-2fcc741958daa620234b2cd4c90e0d66ea9d8d27.tar.gz
freebsd-ports-gnome-2fcc741958daa620234b2cd4c90e0d66ea9d8d27.tar.zst
freebsd-ports-gnome-2fcc741958daa620234b2cd4c90e0d66ea9d8d27.zip
- Fix a potential buffer overflow and file descriptor leak. [1]
- Update to 214.3 [2] - Rename mdnsd.sh to mdnsd [2] - Remove duplicate MAKE_JOBS_UNSAFE [2] - Simplify manpage installation [2] - Pass maintainership to submitter [2] PR: ports/147007 [1] ports/147657 [2] Submitted by: jmallett [1] Sunpoet Po-Chuan Hsieh [sunpoet sunpoet.net] [2] Approved by: tabthorpe (mentor) Security: ports/147007
Diffstat (limited to 'net')
-rw-r--r--net/mDNSResponder/Makefile41
-rw-r--r--net/mDNSResponder/distinfo6
-rw-r--r--net/mDNSResponder/files/mdnsd.in (renamed from net/mDNSResponder/files/mdnsd.sh.in)11
-rw-r--r--net/mDNSResponder/files/patch-mDNSPosix_mDNSPosix.c19
4 files changed, 45 insertions, 32 deletions
diff --git a/net/mDNSResponder/Makefile b/net/mDNSResponder/Makefile
index 13819e248851..896540ca27ba 100644
--- a/net/mDNSResponder/Makefile
+++ b/net/mDNSResponder/Makefile
@@ -7,34 +7,26 @@
#
PORTNAME= mDNSResponder
-PORTVERSION= 214
+PORTVERSION= 214.3
CATEGORIES= net dns
MASTER_SITES= http://opensource.apple.com/tarballs/mDNSResponder/
-DISTNAME= ${PORTNAME}-${PORTVERSION}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= sunpoet@sunpoet.net
COMMENT= Apple's mDNSResponder
-MAKE_JOBS_UNSAFE= yes
-
-USE_BISON= build
-USE_LDCONFIG= YES
-
-USE_GMAKE= YES
-USE_RC_SUBR= mdnsd.sh
-MAKE_ARGS+= os=freebsd LOCALBASE=${PREFIX} MANPATH=${MANPREFIX}/man
BUILD_WRKSRC= ${WRKSRC}/mDNSPosix
INSTALL_WRKSRC= ${WRKSRC}/mDNSPosix
-EXTRA_PROGS_BIN=mDNSClientPosix \
- mDNSIdentify \
- mDNSNetMonitor \
- mDNSProxyResponderPosix \
- mDNSResponderPosix
-EXTRA_PROGS_SBIN=dnsextd
+MAKE_ARGS+= os=freebsd LOCALBASE=${PREFIX} MANPATH=${MANPREFIX}/man
MAKE_JOBS_UNSAFE= yes
+USE_BISON= build
+USE_GMAKE= yes
+USE_LDCONFIG= yes
+USE_RC_SUBR= mdnsd
+EXTRA_PROGS_BIN=mDNSClientPosix mDNSIdentify mDNSNetMonitor \
+ mDNSProxyResponderPosix mDNSResponderPosix
+EXTRA_PROGS_SBIN=dnsextd
EXTRAMAN8= dnsextd.8 mDNSResponderPosix.8
-
MAN8= mdnsd.8 ${EXTRAMAN8}
CONFLICTS= avahi-libdns-[0-9]*
@@ -46,21 +38,20 @@ BROKEN= Does not compile on alpha
.endif
post-patch:
- ${MV} ${WRKSRC}/mDNSShared/mDNSResponder.8 \
+ @${MV} ${WRKSRC}/mDNSShared/mDNSResponder.8 \
${WRKSRC}/mDNSShared/mDNSResponderPosix.8
+
pre-build:
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \
-e 's|mDNSResponder.8|mDNSResponderPosix.8|g' \
${WRKSRC}/mDNSPosix/Makefile
post-install:
- cd ${INSTALL_WRKSRC}/build/prod && \
+ @cd ${INSTALL_WRKSRC}/build/prod && \
${INSTALL_PROGRAM} ${EXTRA_PROGS_BIN} ${PREFIX}/bin && \
${INSTALL_PROGRAM} ${EXTRA_PROGS_SBIN} ${PREFIX}/sbin
-. for section in 1 2 3 4 5 6 7 8
-. for page in ${EXTRAMAN${section}}
- ${INSTALL_MAN} ${WRKSRC}/mDNSShared/${page} ${MAN${section}PREFIX}/man/man${page:E}/
-. endfor
-. endfor
+.for page in ${EXTRAMAN8}
+ @${INSTALL_MAN} ${WRKSRC}/mDNSShared/${page} ${MAN8PREFIX}/man/man8/
+.endfor
.include <bsd.port.post.mk>
diff --git a/net/mDNSResponder/distinfo b/net/mDNSResponder/distinfo
index 832c4a2fe4fe..6717dd4551d3 100644
--- a/net/mDNSResponder/distinfo
+++ b/net/mDNSResponder/distinfo
@@ -1,3 +1,3 @@
-MD5 (mDNSResponder-214.tar.gz) = 8285a8f63c63a824cbafb9b6404163e8
-SHA256 (mDNSResponder-214.tar.gz) = d8df2983869370853e3b189e209a68ec879295bd476f24a789c982292969df97
-SIZE (mDNSResponder-214.tar.gz) = 1623680
+MD5 (mDNSResponder-214.3.tar.gz) = b523eeadb302bbf124f985d5ff5d4a0d
+SHA256 (mDNSResponder-214.3.tar.gz) = 4ca4505fa151c45ccca6981562c11592cf7776576423a3fac926e0e1bd08e600
+SIZE (mDNSResponder-214.3.tar.gz) = 1632678
diff --git a/net/mDNSResponder/files/mdnsd.sh.in b/net/mDNSResponder/files/mdnsd.in
index f3e80c9d45aa..6011375d35a6 100644
--- a/net/mDNSResponder/files/mdnsd.sh.in
+++ b/net/mDNSResponder/files/mdnsd.in
@@ -1,19 +1,22 @@
#!/bin/sh
+#
# $FreeBSD$
# PROVIDE: mdnsd
# REQUIRE: DAEMON
# KEYWORD: shutdown
-mdnsd_enable="${mdnsd_enable-NO}"
-
. /etc/rc.subr
name=mdnsd
rcvar=`set_rcvar`
-command="%%PREFIX%%/sbin/${name}"
-pidfile="/var/run/${name}.pid"
load_rc_config $name
+: ${mdnsd_enable="NO"}
+: ${mdnsd_pidfile="/var/run/${name}.pid"}
+
+command="%%PREFIX%%/sbin/${name}"
+pidfile="${mdnsd_pidfile}"
+
run_rc_command $*
diff --git a/net/mDNSResponder/files/patch-mDNSPosix_mDNSPosix.c b/net/mDNSResponder/files/patch-mDNSPosix_mDNSPosix.c
new file mode 100644
index 000000000000..47cec1180bce
--- /dev/null
+++ b/net/mDNSResponder/files/patch-mDNSPosix_mDNSPosix.c
@@ -0,0 +1,19 @@
+--- mDNSPosix/mDNSPosix.c.orig 2009-01-25 04:16:46.000000000 +0100
++++ mDNSPosix/mDNSPosix.c 2010-06-20 21:03:33.000000000 +0200
+@@ -581,7 +581,7 @@
+ {
+ char line[256];
+ char nameserver[16];
+- char keyword[10];
++ char keyword[11];
+ int numOfServers = 0;
+ FILE *fp = fopen(filePath, "r");
+ if (fp == NULL) return -1;
+@@ -600,6 +600,7 @@
+ numOfServers++;
+ }
+ }
++ fclose(fp);
+ return (numOfServers > 0) ? 0 : -1;
+ }
+