https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6313

--- Comment #4 from Mark Martinec <[email protected]> 2010-02-01 11:38:16 
UTC ---
> and prevents spamd creating user's .spamassassin directory
> if $opt{'user-config'} is false)

I just chose a minimal fix for this (in spamd.raw):

sub handle_user_setuid_with_sql
[...]
-  if (! -d $spam_conf_dir) {
+  if ($opt{'user-config'} && ! -d $spam_conf_dir) {
     if (mkdir $spam_conf_dir, 0700) {

Now, this opens a question, why the sub handle_user_setuid_with_sql()
tries to create the user's .spamassassin directory at all, considering
that it _only_ gets called when $opt{'user-config'} is false:

  if ( !$opt{'user-config'} ) {
    [...]
    elsif ( $opt{'setuid-with-sql'} ) {
      unless ( handle_user_setuid_with_sql($current_user) ) {

So, either the attempt in handle_user_setuid_with_sql() to
create the directory is entirely redundant, or the Juergen's claim
is for some reason flawed:

> When SPAMD is running with option -q or -Q it should not even attempt to build
> a ~./spamassassin directory. So the effect of using perl with -T is secondary.

So, insight from someone more familiar with spamd than me is needed.

-- 
Configure bugmail: 
https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to