[INN-COMMITTERS] STABLE-2_4 inn/frontends (rnews.c)

Russ Allbery Russ_Allbery at isc.org
Thu Jun 3 23:47:18 UTC 2004


    Date: Thursday, June 3, 2004 @ 23:47:18
  Author: rra
    Path: /proj/cvs/isc/inn/inn/frontends
     Tag: STABLE-2_4

Modified: rnews.c

The code for changing users was intended to handle the case where rnews  
was setuid news, but we don't ever install it that way (for reasons that
I can't remember at the moment).  Instead, we sometimes install it setuid
root.

This should be looked at closer in the future, since I think that setuid
news should be sufficient.  But in any event, setuid(geteuid()) is going
to do nothing useful at all in a setuid root program.  Instead, if either
the real or effective UIDs are 0, figure out the UID of the news user and
setuid to it.  If we're setuid news, don't do anything at all.  I believe
this will work in both configurations.

Based on a problem reported by Matthias Scheler.


---------+
 rnews.c |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)


More information about the inn-committers mailing list