aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authorfeld <feld@FreeBSD.org>2018-04-06 00:37:19 +0800
committerfeld <feld@FreeBSD.org>2018-04-06 00:37:19 +0800
commit7a5f53d04e35255f5dc6629ca866e3410eb7230a (patch)
treeaa71b5b11ca35eae630e0a29c92ada3fd7ed056c /net-mgmt
parent8d7c4e003f7f79ae04c2db763cc7340c19e55019 (diff)
downloadfreebsd-ports-gnome-7a5f53d04e35255f5dc6629ca866e3410eb7230a.tar.gz
freebsd-ports-gnome-7a5f53d04e35255f5dc6629ca866e3410eb7230a.tar.zst
freebsd-ports-gnome-7a5f53d04e35255f5dc6629ca866e3410eb7230a.zip
net-mgmt/py-pdagent: Add dedicated user/group
- Also add pkg-message informing how to permit users and services access PR: 227273
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/py-pdagent/Makefile4
-rw-r--r--net-mgmt/py-pdagent/files/pdagentd.in14
-rw-r--r--net-mgmt/py-pdagent/pkg-message6
3 files changed, 16 insertions, 8 deletions
diff --git a/net-mgmt/py-pdagent/Makefile b/net-mgmt/py-pdagent/Makefile
index b9ff149dfa00..291ea6cc3160 100644
--- a/net-mgmt/py-pdagent/Makefile
+++ b/net-mgmt/py-pdagent/Makefile
@@ -4,6 +4,7 @@
PORTNAME= pdagent
PORTVERSION= 1.4
DISTVERSIONPREFIX=v
+PORTREVISION= 1
CATEGORIES= net-mgmt python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -26,6 +27,9 @@ SUB_LIST+= PYTHON_CMD="${PYTHON_CMD}"
BINFILES= pd-queue pd-send pdagentd.py
+USERS= pdagent
+GROUPS= pdagent
+
do-patch:
${REINPLACE_CMD} -e 's|/var/lib/pdagent|/var/db/pdagent|' -e 's|/etc|${ETCDIR}|' ${WRKSRC}/pdagent/confdirs.py
diff --git a/net-mgmt/py-pdagent/files/pdagentd.in b/net-mgmt/py-pdagent/files/pdagentd.in
index a33879d0cdfa..2865a97cf940 100644
--- a/net-mgmt/py-pdagent/files/pdagentd.in
+++ b/net-mgmt/py-pdagent/files/pdagentd.in
@@ -20,8 +20,8 @@ rcvar=pdagentd_enable
load_rc_config $name
: ${pdagentd_enable="NO"}
-: ${pdagentd_user:="nobody"}
-: ${pdagentd_group:="nogroup"}
+: ${pdagentd_user:="pdagent"}
+: ${pdagentd_group:="pdagent"}
pidfile="/var/run/pdagent/pdagentd.pid"
command="%%PREFIX%%/bin/pdagentd.py"
@@ -37,12 +37,10 @@ pdagentd_precmd()
install -d -o ${pdagentd_user} -g ${pdagentd_group} -m 775 ${i}
done
- if [ ! -d /var/log/pdagent ]; then
- install -d -o ${pdagentd_user} /var/log/pdagent
- fi
- if [ ! -d /var/run/pdagent ]; then
- install -d -o ${pdagentd_user} /var/run/pdagent
- fi
+ chown -R ${pdagentd_user}:${pdagentd_group} /var/db/pdagent
+
+ install -d -o ${pdagentd_user} /var/log/pdagent
+ install -d -o ${pdagentd_user} /var/run/pdagent
}
run_rc_command "$1"
diff --git a/net-mgmt/py-pdagent/pkg-message b/net-mgmt/py-pdagent/pkg-message
new file mode 100644
index 000000000000..bbd05924630a
--- /dev/null
+++ b/net-mgmt/py-pdagent/pkg-message
@@ -0,0 +1,6 @@
+!!! NOTICE !!!
+
+You must add the required users and service accounts to the pdagent
+group to permit write access to /var/db/pdagent.
+
+!!! NOTICE !!!