ports/186837: [PATCH] nrpe2 rc.d script uses hardcoded path
Daniel Ylitalo
daniel at 203webgroup.se
Mon Feb 17 13:00:00 UTC 2014
>Number: 186837
>Category: ports
>Synopsis: [PATCH] nrpe2 rc.d script uses hardcoded path
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Feb 17 13:00:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Daniel Ylitalo
>Release: 10.0-RELEASE
>Organization:
203 Webgroup AB
>Environment:
FreeBSD la-03-us.p203.se 10.0-RELEASE FreeBSD 10.0-RELEASE #0: Thu Jan 30 16:46:36 PST 2014 root at la-03-us.p203.se:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
The nrpe2 rc.d file allows a user to change the location of the nrpe.cfg file.
If one were to do so the find_pidfile() function is hardcoded to look in the location of the default path.
Attaching patch.
>How-To-Repeat:
Change the location of the nrpe.cfg file in /etc/rc.conf with:
nrpe2_configfile="/your/random/location/nrpe.cfg"
and then move the default file there and try to restart nrpe2
>Fix:
See attached patch
Patch attached with submission follows:
--- /usr/local/etc/rc.d/nrpe2.orig 2014-02-17 04:41:58.000000000 -0800
+++ /usr/local/etc/rc.d/nrpe2 2014-02-17 04:43:36.000000000 -0800
@@ -37,7 +37,7 @@
[ -n "$nrpe2_pidfile" ] &&
warn "No longer necessary to set nrpe2_pidfile in rc.conf[.local]"
- if get_pidfile_from_conf pid_file /usr/local/etc/nrpe.cfg; then
+ if get_pidfile_from_conf pid_file ${nrpe2_configfile}; then
pidfile="$_pidfile_from_conf"
else
pidfile='%%PIDDIR%%/nrpe2.pid'
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list