projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e30778
)
dma: allow empty sender in queue files
author
Simon Schubert
<corecode@dragonflybsd.org>
Sun, 20 Sep 2009 18:57:34 +0000
(20:57 +0200)
committer
Simon Schubert
<corecode@dragonflybsd.org>
Sun, 20 Sep 2009 19:01:27 +0000
(21:01 +0200)
Empty senders happen when a bounce gets queued, so we need to accept
such queue files.
libexec/dma/spool.c
patch
|
blob
|
blame
|
history
diff --git
a/libexec/dma/spool.c
b/libexec/dma/spool.c
index
23f6e42
..
0c5d50b
100644
(file)
--- a/
libexec/dma/spool.c
+++ b/
libexec/dma/spool.c
@@
-176,7
+176,7
@@
readqueuef(struct queue *queue, char *queuefn)
s++;
s = strdup(s);
- if (s == NULL
|| s[0] == 0
)
+ if (s == NULL)
goto malformed;
if (strcmp(line, "ID") == 0) {
@@
-192,7
+192,8
@@
readqueuef(struct queue *queue, char *queuefn)
}
}
- if (queueid == NULL || sender == NULL || addr == NULL) {
+ if (queueid == NULL || sender == NULL || addr == NULL ||
+ *queueid == 0 || *addr == 0) {
malformed:
errno = EINVAL;
syslog(LOG_ERR, "malformed queue file `%s'", queuefn);