nut: really run upsd as non-root
authorDaniel F. Dickinson <cshored@thecshore.com>
Sun, 23 Dec 2018 05:14:53 +0000 (00:14 -0500)
committerDaniel F. Dickinson <cshored@thecshore.com>
Sun, 23 Dec 2018 05:25:39 +0000 (00:25 -0500)
One local removal was missed in last push of this fix, so
in certain circumstances upsd would run as root even when
it shouldn't.

Fixes f48b060fa752 ("nut: Fix upsd runs as root")
Closes: #6697 (properly)
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
net/nut/files/nut-server.init

index 2cdeb96cf04f5e13f279e8b3e6b1b08439978a8a..a1df01645428b0c67ee99b5cefbf8d5f52edfc29 100755 (executable)
@@ -225,7 +225,6 @@ build_global_driver_config() {
 }
 
 build_config() {
-       local RUNAS=nut
        local STATEPATH=/var/run/nut
 
         mkdir -m 0755 -p "$(dirname "$UPS_C")"
@@ -281,7 +280,7 @@ start_driver_instance() {
 }
 
 start_server_instance() {
-       local RUNAS
+       local RUNAS=nut
        build_config
 
        [ "$haveserver" != 1 ] && return