procmail
[Top] [All Lists]

Re: Maildir tmp problem <PATCH>

2001-07-13 10:48:31
On Thursday, July 12, 2001, at 05:54 AM, Santiago Vila wrote:

On Wed, 11 Jul 2001, William Carrel wrote:

I'm encountering the same problem.  It is due to a bug in the new
maildir name generating code in src/exopen.c

The author of this code meant to type strlcpy instead of strlcat

Changing the indicated code below in src/exopen.c should resolve the
issue:
...
ultstr(0,(long)thepid,dot+1)
*(dot=strchr(p,'\0'))='_';
*(++dot+1)='.';
strlcat(dot+2,hostname(),end-dot);  /* CHANGE THIS TO strlcpy */
}
...
It's roughly line 51 (or so).  Just keep the arguments the same and
everything should suddenly just work. Someone should commit this change
in if it hasn't already been done.  Thx!

FWIW, the machine affected by this in my case is a FreeBSD 4.3-STABLE
box.

I tried to change that line, but my system (Debian GNU/Linux 2.2) does
not have strlcpy:

exopen.o: In function `unique':
[...]/procmail-3.21/src/exopen.c:50: undefined reference to `strlcpy'

That is strlcpy with a lowercase L in the middle. It exists on all the Debian systems that I have access to. Perhaps you mistyped the name or a library is required? I find it difficult to fathom that strlcat and strlcpy wouldn't both be defined in the same library and header files, but odder things have been known to occur.

-- William Carrel
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>