[Nut-upsdev] Re: [nut-commits] svn commit r731

Arjen de Korte nut+devel at de-korte.org
Fri Jan 26 10:02:29 CET 2007


> Agreed. I wasn't sure if "lower than 1024 = privileged" was a portable
> assumpion, so that's why I thought we should wait until the socket
> opening fails. -- Peter

Maybe we shouldn't bother about the parsing of upsd.conf and opening the
sockets as root at all. I doubt there is a lot to gain here by adding a
command line switch to delay dropping privileges. Parsing configuration
files as root is done with ups.conf and upsmon.conf too, so the probably
the only thing to gain is that we are sure that after dropping privileges
we're still able to read them. There are other ways to do that however.

The things I'm planning to change, are how to deal with not being able to
open a socket (probably we should use fatalx here, instead of just logging
to syslog) and not trying to bind to other sockets on reloading. If you
want to change these, you must restart upsd, rather than reload it. This
is how it has always been and makes sure we have a consistent interface,
regardless of the ports being used (you wouldn't be able to bind
privileged ports on reload).

Best regards, Arjen




More information about the Nut-upsdev mailing list