corecode's projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
0caaabf
)
dma: implement alternate identity for mailq
author
Simon Schubert <corecode@dragonflybsd.org>
Thu, 16 Jul 2009 10:10:51 +0000 (12:10 +0200)
committer
Simon Schubert <corecode@dragonflybsd.org>
Thu, 16 Jul 2009 14:13:07 +0000 (16:13 +0200)
mailq does not take the standard sendmail options, but behaves like -bp.
libexec/dma/dma.c
patch
|
blob
|
blame
|
history
diff --git
a/libexec/dma/dma.c
b/libexec/dma/dma.c
index
dbb93ba
..
ef0639a
100644
(file)
--- a/
libexec/dma/dma.c
+++ b/
libexec/dma/dma.c
@@
-1024,6
+1024,14
@@
main(int argc, char **argv)
LIST_INIT(&queue.queue);
snprintf(tag, 254, "dma");
+ if (strcmp(argv[0], "mailq") == 0) {
+ argv++; argc--;
+ showq = 1;
+ if (argc != 0)
+ errx(1, "invalid arguments");
+ goto skipopts;
+ }
+
opterr = 0;
while ((ch = getopt(argc, argv, "A:b:B:C:d:Df:F:h:iL:N:no:O:q:r:R:UV:vX:")) != -1) {
switch (ch) {
@@
-1090,6
+1098,7
@@
main(int argc, char **argv)
argv += optind;
opterr = 1;
+skipopts:
openlog(tag, LOG_PID, LOG_MAIL);
set_username();