Ran into this today:
delivery 1: deferral:
Unable_to_open_/usr/local/bin/qmail-quotawarn:_text_busy._(LDAP-ERR_#5.3.5)/
After a whole lot of tracing, the problem was the gratuitous recycling
of the global variable "foo" for string operations between functions.
In (qmail-local.c) -> main():
- the function calls maildir(foo.s) [foo.s becomes fn]
- which calls quota_warning(fn)
- which remaps foo.s to "<qmailpath>/bin/qmail-quotawarn"
- which trys to run (fn)(foo.s) which essentially runs qmail-quotawarn
apending to itself, causing the "text busy" message.
A patch against 20030101 is attached.
This WILL affect anyone using quotawarn based on a PERCENTAGE warn, but
will NOT affect the quota bounce messages.
cheers
--chris
[EMAIL PROTECTED]
$Gateweaver: patch-qmail-local_c,v 1.3 2003/02/03 20:19:46 cmaxwell Exp $
--- qmail-local.c.orig Mon Feb 3 20:10:28 2003
+++ qmail-local.c Mon Feb 3 20:13:52 2003
@@ -75,6 +75,7 @@ stralloc ueo = {0};
stralloc cmds = {0};
stralloc messline = {0};
stralloc foo = {0};
+stralloc quotwarn = {0};
char buf[1024];
char outbuf[1024];
@@ -210,9 +211,13 @@ void quota_warning(char *fn)
int wstat;
if (!env_get(ENV_QUOTAWARNING) ) return;
- if (!stralloc_copys(&foo, auto_qmail)) temp_nomem();
- if (!stralloc_cats(&foo, "/bin/qmail-quotawarn")) temp_nomem();
- if (!stralloc_0(&foo)) temp_nomem();
+ if (!stralloc_copys("warn, auto_qmail)) temp_nomem();
+ if (!stralloc_cats("warn, "/bin/qmail-quotawarn")) temp_nomem();
+ if (!stralloc_0("warn)) temp_nomem();
if (seek_begin(0) == -1) temp_rewind();
@@ -221,10 +226,10 @@ void quota_warning(char *fn)
case -1:
temp_fork();
case 0:
- args[0] = foo.s; args[1] = fn; args[2] = 0;
+ args[0] = quotwarn.s; args[1] = fn; args[2] = 0;
sig_pipedefault();
execv(*args,args);
- strerr_die5x(111,"Unable to run quotawarn program: ", foo.s, ":
",error_str(errno),". (LDAP-ERR #2.3.0)");
+ strerr_die5x(111,"Unable to run quotawarn program: ", quotwarn.s, ":
+",error_str(errno),". (LDAP-ERR #2.3.0)");
}
wait_pid(&wstat,child);