summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2019-05-10 15:35:58 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2019-05-10 15:35:58 +0100
commitaffc23f0d27bfbca773094146d7e62872ed2895b (patch)
tree7683a05c1309e1004523ab22baf195c3eb7e8054
parent5e64b73ef7cdaf20b998b3345a588b462fd30bfb (diff)
downloadexim4-affc23f0d27bfbca773094146d7e62872ed2895b.tar.gz
Fix listing a named queue by a non-admin user. Bug 2398
(cherry picked from commit e5903596a0)
-rw-r--r--doc/doc-txt/ChangeLog4
-rw-r--r--src/src/exim.c25
2 files changed, 17 insertions, 12 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 286832bf1..6c16f12d6 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -57,6 +57,10 @@ JH/16 GnuTLS: rework ciphersuite strings under recent library versions. Thanks
JH/18 GnuTLS: fix $tls_out_ocsp under hosts_request_ocsp. Previously the
verification result was not updated unless hosts_require_ocsp applied.
+JH/19 Bug 2398: fix listing of a named-queue. Previously, even with the option
+ queue_list_requires_admin set to false, non-admin users were denied the
+ facility.
+
Exim version 4.92
-----------------
diff --git a/src/src/exim.c b/src/src/exim.c
index f6f15f449..83b5ef51f 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -3187,22 +3187,23 @@ for (i = 1; i < argc; i++)
/* -q[f][f][l][G<name>]: Run the queue, optionally forced, optionally local
only, optionally named, optionally starting from a given message id. */
- if (*argrest == 0 &&
- (i + 1 >= argc || argv[i+1][0] == '-' || mac_ismsgid(argv[i+1])))
- {
- queue_interval = 0;
- if (i+1 < argc && mac_ismsgid(argv[i+1]))
- start_queue_run_id = argv[++i];
- if (i+1 < argc && mac_ismsgid(argv[i+1]))
- stop_queue_run_id = argv[++i];
- }
+ if (!(list_queue || count_queue))
+ if (*argrest == 0
+ && (i + 1 >= argc || argv[i+1][0] == '-' || mac_ismsgid(argv[i+1])))
+ {
+ queue_interval = 0;
+ if (i+1 < argc && mac_ismsgid(argv[i+1]))
+ start_queue_run_id = argv[++i];
+ if (i+1 < argc && mac_ismsgid(argv[i+1]))
+ stop_queue_run_id = argv[++i];
+ }
/* -q[f][f][l][G<name>/]<n>: Run the queue at regular intervals, optionally
forced, optionally local only, optionally named. */
- else if ((queue_interval = readconf_readtime(*argrest ? argrest : argv[++i],
- 0, FALSE)) <= 0)
- exim_fail("exim: bad time value %s: abandoned\n", argv[i]);
+ else if ((queue_interval = readconf_readtime(*argrest ? argrest : argv[++i],
+ 0, FALSE)) <= 0)
+ exim_fail("exim: bad time value %s: abandoned\n", argv[i]);
break;