Skip to content

Commit

Permalink
added modifications to run eq3configd under a dedicated user and group
Browse files Browse the repository at this point in the history
(this refs #599).
  • Loading branch information
jens-maus committed Sep 25, 2023
1 parent 03bc331 commit c3e9ee6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion buildroot-external/package/eq3configd/S50eq3configd
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ init () {
cp /var/ids /etc/config/
fi

# make sure crypttool.cfg exists and has secure permissions
if [[ ! -e /etc/config/crypttool.cfg ]] ; then
touch /etc/config/crypttool.cfg
fi
chmod 0640 /etc/config/crypttool.cfg
chgrp eq3cfg /etc/config/crypttool.cfg
}

start() {
Expand All @@ -34,7 +37,7 @@ start() {
# to ensure that others are killed first in case of low memory situations
echo -900 >/proc/$$/oom_score_adj 2> /dev/null

start-stop-daemon -S -q -b -m -p ${PIDFILE} --exec /bin/${DAEMON}
start-stop-daemon -S -q -b -m -c eq3cfg:eq3cfg -p ${PIDFILE} --exec /bin/${DAEMON}
echo "OK"
}
stop() {
Expand Down
4 changes: 4 additions & 0 deletions buildroot-external/package/eq3configd/eq3configd.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@ define EQ3CONFIGD_INSTALL_INIT_SYSV
$(TARGET_DIR)/etc/init.d/S50eq3configd
endef

define EQ3CONFIGD_USERS
eq3cfg -1 eq3cfg -1 * - - - eq3configd user
endef

$(eval $(generic-package))

0 comments on commit c3e9ee6

Please sign in to comment.