http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5728





------- Additional Comments From [EMAIL PROTECTED]  2007-11-28 03:02 -------
(In reply to comment #9)
> (In reply to comment #8)
> 
> > I think it's ok, since $setuid_to_user is set to 1 if ($> != 0).
> 
> I'm confused by your comment (what is ok?) -- what do you think is the right
> thing to do?

actually, ignore my comment -- I misread both your intentions, and the code ;)
So you said:

'I believe under the current code, you can't run
"spamd --vpopmail" or "spamd --virtual-config-dir" as a non-root user. We
specifically check to see if these options are used without the "--username"
option and die.
With my change, this also applies to "spamd --sql-config" and "spamd
--ldap-config".'

that's almost correct.  Actually, it *IS* possible to run as non-root if the
user uses '-u $currentuser'; e.g. if you look at t/spamd_allow_user_rules.t, it
runs spamd with

  spamd --virtual-config-dir=log/virtualconfig/%u -L -u $spamd_run_as_user

where $spamd_run_as_user is set by the test framework to be whatever the 
username
of the currently-running uid is.  So the caller has to know what their current
username is, and use that in the invocation, and spamd will then run ok as
non-root with those options.

If you are suggesting that we should *automatically* deal with this case, by
doing something like

  if ($> != 0 && !$opt{'username'}) {
    # we are run as non-root; set username to whatever we're currently running 
as
    $opt{'username'} = currently_running_username();
  }

I would be in favour of this, as a new feature.  But it'd be a separate bug...

is that what you were talking about?



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to