1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-15 03:14:23 +00:00

Xymon-client was not completely dropping privileges at startup.

While xymon-client knows internally what UID it should run as, a
design flaw in the rc script was still launching its master process as
root. As a result the following two processes were always running as
root instead of the xymon user:

/usr/local/www/xymon/client/bin/xymonlaunch ...
sh -c vmstat 300 2 ...

The rest of the processes the xymon-client runs such as df, netstat,
top, custom scripts, etc were correctly executing as non-root.
This commit is contained in:
Mark Felder 2015-02-05 22:23:00 +00:00
parent 3eda69e87a
commit 237dabc340
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=378496
2 changed files with 8 additions and 7 deletions

View File

@ -2,7 +2,7 @@
PORTNAME= xymon
PORTVERSION= 4.3.18
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net-mgmt www
MASTER_SITES= SF/xymon/Xymon/${PORTVERSION}
PKGNAMESUFFIX= -client${PKGNAMESUFFIX2}
@ -16,6 +16,8 @@ LICENSE= GPLv2
USERS= xymon
GROUPS= xymon
SUB_LIST+= USERS="${USERS}"
# Options
XYMONUSER?= xymon
XYMONHOSTIP?= 127.0.0.1

View File

@ -14,12 +14,11 @@ rcvar=xymon_client_enable
load_rc_config "$name"
: ${xymon_client_enable:=NO}
: ${xymon_client_user:=%%USERS%%}
command="%%PREFIX%%/www/xymon/client/runclient.sh"
start_cmd="%%PREFIX%%/www/xymon/client/runclient.sh ${xymon_client_flags} start"
stop_cmd="%%PREFIX%%/www/xymon/client/runclient.sh ${xymon_client_flags} stop"
status_cmd="%%PREFIX%%/www/xymon/client/runclient.sh ${xymon_client_flags} status"
reload_cmd="%%PREFIX%%/www/xymon/client/runclient.sh ${xymon_client_flags} restart"
pidfile="%%PREFIX%%/www/xymon/client/logs/clientlaunch.`hostname`.pid"
command=/usr/local/www/xymon/client/runclient.sh
command_args="${xymon_client_flags} ${1}"
procname=/usr/local/www/xymon/client/bin/xymonlaunch
pidfile="/usr/local/www/xymon/client/logs/clientlaunch.`hostname`.pid"
run_rc_command "$1"