Prevent openrc service from generating a config readable by everyone

This commit is contained in:
mirefly42 2025-05-02 14:44:58 +07:00
parent 47818a1a7c
commit 9cf0a75940

View file

@ -14,7 +14,7 @@ depend() {
start_pre() {
if [ ! -f "${CONFFILE}" ]; then
ebegin "Generating new configuration file into ${CONFFILE}"
if ! eval ${command} -genconf > ${CONFFILE}; then
if ! (umask 037 && eval ${command} -genconf > ${CONFFILE}); then
eerror "Failed to generate configuration file"
exit 1
fi