summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2005-01-04 10:37:55 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2005-01-04 10:37:55 +0000
commitd95f9fdbbc934eb921bdf989bda1139415ef7d91 (patch)
treeeca37c3771cd0a2c9c3e51f80dc466a70791f46e /src
parent17ffcae735bb0f871aa34740db16debe101efaa4 (diff)
Need to initialize getloadavg() as root in the daemon when
deliver_drop_privilege is set, for the benefit of the queue runner.
Diffstat (limited to 'src')
-rw-r--r--src/src/daemon.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/src/daemon.c b/src/src/daemon.c
index dfd781116..1c274d732 100644
--- a/src/src/daemon.c
+++ b/src/src/daemon.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/daemon.c,v 1.4 2005/01/04 10:00:42 ph10 Exp $ */
+/* $Cambridge: exim/src/src/daemon.c,v 1.5 2005/01/04 10:37:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -898,7 +898,9 @@ if (daemon_listen)
order to perform an "open" on the kernel memory file). */
#ifdef LOAD_AVG_NEEDS_ROOT
- if (queue_only_load >= 0 || smtp_load_reserve >= 0) (void)os_getloadavg();
+ if (queue_only_load >= 0 || smtp_load_reserve >= 0 ||
+ (deliver_queue_load_max >= 0 && deliver_drop_privilege))
+ (void)os_getloadavg();
#endif
/* If -oX was used, disable the writing of a pid file unless -oP was