darkstat: correct incompatbility with sshd
authorJean-Michel Lacroix <redacted>
Wed, 1 Jul 2020 22:40:42 +0000 (18:40 -0400)
committerJean-Michel Lacroix <redacted>
Wed, 1 Jul 2020 22:40:42 +0000 (18:40 -0400)
The init file of darkstat is creating the pid in /var/empty and
setting the owner of the directory to darkstat which is incompatible
with sshd as sshd requires /var/empty to be owned by root and not
group or world-writable.  See issue #12420.

This corrects the problem by creating another directory: /var/darkstat
instead without setting the owner, which is not actually required.
Compile tested: not applicable as the changes do not involve
compilation.
Tested on my home router running darkstat.

Signed-off-by: Jean-Michel Lacroix <redacted>
net/darkstat/Makefile
net/darkstat/files/darkstat.init

index f7c8508f7258f74f8f7f855cf58c6f65f4a117b9..c57005127eac44652aae234277b9c562ad63d094 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=darkstat
 PKG_VERSION:=3.0.719
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_MAINTAINER:=Jean-Michel Lacroix <lacroix@lepine-lacroix.info>
 
index 4cd8b3ef3c2482a34279d22e52daeda8e6d30143..523322012736420de68fad7a82fd110481c715d1 100755 (executable)
@@ -6,7 +6,7 @@ USE_PROCD=1
 START=60
 
 APP=darkstat
-RUN_D=/var/empty
+RUN_D=/var/darkstat
 PID_F=$RUN_D/$APP.pid
 CONFIGNAME=darkstat
 USER=nobody
@@ -30,7 +30,6 @@ export_bool () {
 
 set_config_string(){
        mkdir -p $RUN_D
-       chown $USER:$GROUP $RUN_D
        . /lib/functions/network.sh
        config_load $CONFIGNAME
        config_foreach build_config_string darkstat
git clone https://git.99rst.org/PROJECT