-----BEGIN PGP SIGNED MESSAGE-----
Saturday, November 03, 2001, 11:18:01 AM, you wrote:
> This is happening to me as well and I find it pretty disturbing as
> it prevents localhost from sending mail via SMTP. This has to be a
> FreeBSD related problem (maybe some error related with creating
> temp files?).
The problem appears to be the calling sequence of tcprules which is
used to rebuild the cdb files cause if I chown tcp.smtp to root:wheel
and run
# su vpopmail -c "/home/vpopmail/bin/clearopensmtp"
I get
tcprules: fatal: unable to create /home/vpopmail/etc/tcp.smtp: access
denied
So the problem most likely lies in
long unsigned tcprules_open()
{
int pim[2];
long unsigned pid;
char template[20];
memset(bin0,0,BUFF_SIZE);
memset(bin1,0,BUFF_SIZE);
memset(bin2,0,BUFF_SIZE);
snprintf(relay_template, 300, ".tmp.%lu", (long
unsigned)getpid());
if (pipe(pim) == -1) { return(-1);}
switch( pid=vfork()){
case -1:
close(pim[0]); close(pim[1]);
return(-1);
case 0:
close(pim[1]);
if (vfd_move(0,pim[0]) == -1) _exit(120);
strncpy(bin0, TCPRULES_PROG, BUFF_SIZE);
strncpy( bin1, TCP_FILE, BUFF_SIZE);
strncat( bin1, ".cdb", BUFF_SIZE);
strncpy( bin2, TCP_FILE, BUFF_SIZE);
strncat( bin2, template, BUFF_SIZE);
binqqargs[0] = bin0;
binqqargs[1] = bin1;
binqqargs[2] = bin2;
binqqargs[3] = 0;
execv(*binqqargs,binqqargs);
}
fdm = pim[1]; close(pim[0]);
return(pid);
}
#endif
and I think the real problem is that above the unique part of the
name for
the temp file gets stored into relay_template whereas it should go
into template which is declared above (relay_template appears to be
undeclared anyway).
So the patch actually should be:
diff -ur vpopmail.c.orig vpopmail.c
- --- vpopmail.c.orig Mon Oct 8 18:09:12 2001
+++ vpopmail.c Sat Nov 3 12:15:15 2001
@@ -2049,8 +2049,8 @@
memset(bin0,0,BUFF_SIZE);
memset(bin1,0,BUFF_SIZE);
memset(bin2,0,BUFF_SIZE);
- - snprintf(relay_template, 300, ".tmp.%lu", (long
unsigned)getpid());
- -
+ snprintf(template, 20, ".tmp.%lu", (long unsigned)getpid());
+
if (pipe(pim) == -1) { return(-1);}
switch( pid=vfork()){
Best regards,
Gabriel
����L
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5i
iQEVAwUBO+PFY8Za2WpymlDxAQGMdwf/cJuSDh9zWC4Wyh5JBHeyqGqoU+GAIR7x
T6RyvZYjAAWSbxj5Jq84VSZh6ojYrWFC/15TB75JZ7wxvCtYXkn4gxBgPcnNw3my
EM6bPj4ciSTJxOD3XG7wHdgyHdm3y84pMrSvqlp3EUzcYWzODNIiAE3VRh9RTpwF
b0gq+ow0LfoFCuSZyVDuF35PvpcyUvVAjF0lmZtwuE9Ct3gA4Teyjt+anCwGtmmc
KqrV8xlx2hm7sOd8ZyWU6/JyIH11g8Wn+c/utBclZxBdqb+p/2eHP1pYWtZBjOKD
/1wqIh07vyQKjMfLRN5M0A1m5LaxstcRBjmaTeOb5RmEBQiuVM2f2w==
=IUkJ
-----END PGP SIGNATURE-----