chiark
/
gitweb
/
~mdw
/
qmail
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
qmail-smtpd: Validation of recipient mailbox names.
[qmail]
/
qmail.c
diff --git
a/qmail.c
b/qmail.c
index 4b7f3ef33cec1a862178a23a444854f1f7402233..9432b4baec124f65b3ce2d228708687adc7f0b99 100644
(file)
--- a/
qmail.c
+++ b/
qmail.c
@@
-6,8
+6,17
@@
#include "fd.h"
#include "qmail.h"
#include "auto_qmail.h"
#include "fd.h"
#include "qmail.h"
#include "auto_qmail.h"
+#include "env.h"
-static char *binqqargs[2] = { "/usr/sbin/qmail-queue", 0 } ;
+static char *binqqargs[2] = { 0, 0 } ;
+
+static void setup_qqargs()
+{
+ if(!binqqargs[0])
+ binqqargs[0] = env_get("QMAILQUEUE");
+ if(!binqqargs[0])
+ binqqargs[0] = "/usr/sbin/qmail-queue";
+}
int qmail_open(qq)
struct qmail *qq;
int qmail_open(qq)
struct qmail *qq;
@@
-15,6
+24,8
@@
struct qmail *qq;
int pim[2];
int pie[2];
int pim[2];
int pie[2];
+ setup_qqargs();
+
if (pipe(pim) == -1) return -1;
if (pipe(pie) == -1) { close(pim[0]); close(pim[1]); return -1; }
if (pipe(pim) == -1) return -1;
if (pipe(pie) == -1) { close(pim[0]); close(pim[1]); return -1; }