rc.news: checking whether we run as the news user

Russ Allbery eagle at eyrie.org
Fri Sep 26 01:04:03 UTC 2014


Noel Butler <noel.butler at ausics.net> writes:

> I can run /etc/rc.d/rc.httpd (as its system startup at boot), apachectl,
> and even httpd itself by hand as root and it starts without the need to
> su prior to doing so. Inn requires su before its scripts specifically
> before running those type of files, as your example boot-time startup
> script shows, so its not actually the same :)

It wouldn't be hard to drop permissions in innd immediately at the top of
main() if it discovers that it's run as root instead of just bailing out.
It's always hard to figure out the right balance between attempting to
self-correct (and possibly getting things wrong) versus just telling the
user something looks wrong and leaving it to them to sort out.  But maybe
it would be less confusing to just switch to the right user if we can.

-- 
Russ Allbery (eagle at eyrie.org)              <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.


More information about the inn-workers mailing list