blob: 589bc88718cd399d9b4d61503586078a583d02d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
Drop root privs by default.
--- buildfactory/freePOPsd.initd
+++ buildfactory/freePOPsd.initd
@@ -35,6 +35,9 @@
if [ ${USER_NAME} ] && [ ${USER_PASSWD} ]; then
ARGS="${ARGS} -A ${USER_NAME}:${USER_PASSWD}"
fi
+ if [ ${SUID_USER} ] && [ ${SUID_GROUP} ]; then
+ ARGS="${ARGS} -s ${SUID_USER}.${SUID_GROUP}"
+ fi
start-stop-daemon --start --exec /usr/bin/freepopsd \
-- -d ${ARGS}
eend ${?}
--- buildfactory/freePOPsd.confd
+++ buildfactory/freePOPsd.confd
@@ -24,3 +24,6 @@
# USER_NAME=""
# USER_PASSWD=""
+# You can drop root privs by changing to this username/group
+SUID_USER="nobody"
+SUID_GROUP="nogroup"
|