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

Peter Selinger selinger at mathstat.dal.ca
Fri Jan 26 04:49:33 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

Arjen de Korte wrote:
> 
> 
> > We don't have to wait that long. We could already check for this in the
> > listen_add() function. If a port lower than 1024 is specified and the
> > --privileged option (or something like that) is not specified, we already
> > know opening the socket is probably not going to work. I don't think we
> > should check if '-u <user>' was specified here by the way. Although
> > privileges won't be dropped in case no user was specified
> 
> Errrr, if no user is specified, the default user as specified by the
> --with-user option is used of course. So this should be 'Although
> privileges won't be dropped in case '-u root' was specified'
> 
> > (and it doesn't
> > matter when to open the sockets) I think people should be made aware of
> > this. Otherwise they may (wrongly) assume that specifying a privileged
> > port requires upsd to run as root. I don't think running nut on a
> > non-default port is that common anyway, so this option is merely used for
> > our peace of mind in case we misjudged this.
> 
> Best regards, Arjen
> 




More information about the Nut-upsdev mailing list