* Fix rc.subr use so the it works properly with both 4.x and 5.x

* Fix a potential buffer overflow while reading the config file.  But,
  since the config file is owned by root this is the least of your worries.
* Enlarge the size of the _warn and _fail command strings

- Overflow noticed by Pete <shipley@dis.org>
This commit is contained in:
James E. Housley 2004-08-08 12:43:40 +00:00
parent a711bee086
commit 3ffc592c92
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=115627
3 changed files with 5 additions and 19 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= healthd
PORTVERSION= 0.7.7
PORTVERSION= 0.7.8
CATEGORIES= sysutils ipv6
MASTER_SITES= http://healthd.thehousleys.net/ \
http://healthd1.thehousleys.net/
@ -16,6 +16,7 @@ COMMENT= A daemon to monitor vital motherboard parameters
ONLY_FOR_ARCHS= i386
USE_REINPLACE= yes
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --exec-prefix=${PREFIX}
#
@ -35,14 +36,10 @@ HDDOCDIR= ${PREFIX}/share/doc/healthd
CONFIGURE_ARGS+= --disable-ipv6
.endif
.if ${OSVERSION} >= 500038
RC_SUBR?= /etc/rc.subr
EXTRA_PATCHES= files/healthd.sh-500038
.else
USE_RC_SUBR= yes
.endif
post-install:
@${REINPLACE_CMD} -e 's|/usr/local/etc/rc.subr|${RC_SUBR}|' ${WRKSRC}/healthd.sh
${INSTALL_SCRIPT} -m 751 ${WRKSRC}/healthd.sh ${PREFIX}/etc/rc.d/healthd.sh
@if [ ! -f ${PREFIX}/etc/healthd.conf ]; then \
${ECHO} "Installing ${PREFIX}/etc/healthd.conf configuration file."; \

View File

@ -1,2 +1,2 @@
MD5 (healthd-0.7.7.tar.gz) = e7d4bbc4ee4f2df70f28ff0b539aae73
SIZE (healthd-0.7.7.tar.gz) = 67263
MD5 (healthd-0.7.8.tar.gz) = 79f152000731b480a02265e9d8f08e1c
SIZE (healthd-0.7.8.tar.gz) = 67452

View File

@ -1,11 +0,0 @@
--- healthd.sh.orig Fri Apr 16 10:03:37 2004
+++ healthd.sh Fri Apr 16 10:04:17 2004
@@ -13,7 +13,7 @@
#healthd_enable="YES"
#
-. /usr/local/etc/rc.subr
+. /etc/rc.subr
name=healthd
rcvar=`set_rcvar`