From 45f7d54c984e73a056d21ce0ab5fb1d2f0e886c5 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sun, 24 Sep 2023 20:50:26 +0100 Subject: [PATCH] more detail in error messages --- src/src/exim.c | 5 +++-- src/src/readconf.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/src/exim.c b/src/src/exim.c index 8a78689ff..e200fc062 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -4478,7 +4478,8 @@ if (!f.admin_user) || queue_name_dest && prod_requires_admin || debugset && !f.running_in_test_harness ) - exim_fail("exim:%s permission denied\n", debugset ? " debugging" : ""); + exim_fail("exim:%s permission denied; not admin\n", + debugset ? " debugging" : ""); } /* If the real user is not root or the exim uid, the argument for passing @@ -4494,7 +4495,7 @@ if ( real_uid != root_uid && real_uid != exim_uid ) ) && !f.running_in_test_harness ) - exim_fail("exim: Permission denied\n"); + exim_fail("exim: Permission denied; not exim user or root\n"); /* If the caller is not trusted, certain arguments are ignored when running for real, but are permitted when checking things (-be, -bv, -bt, -bh, -bf, -bF). diff --git a/src/src/readconf.c b/src/src/readconf.c index 7d48f085d..d6d6f53a5 100644 --- a/src/src/readconf.c +++ b/src/src/readconf.c @@ -2915,7 +2915,7 @@ else if (Ustrcmp(type, "macro") == 0) for printing. So we have an admin_users restriction. */ if (!f.admin_user) { - fprintf(stderr, "exim: permission denied\n"); + fprintf(stderr, "exim: permission denied; not admin\n"); return FALSE; } for (macro_item * m = macros; m; m = m->next) -- 2.30.2