upslog assumes starting as root, but should it? #1717
Labels
service/daemon start/stop
General subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug
Milestone
As analyzed in #1712 (comment) the
upslog
daemon is one of two that really usePIDPATH
which may be owned byroot
(rather thanALTPIDPATH
which should be owned by unprivileged run-time account likenut
).Code of this daemon writes the PID file and drops privileges, with mysterious comment
/* now drop root if we have it */
-- this implies we might start not asroot
, and then fail towritepid()
(ifPIDPATH
is root-owned like/var/run
) and then tobecome_user()
. It did so since beginning of time.Should the logging daemon start as
root
in the first place however?..The text was updated successfully, but these errors were encountered: