]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-master: Don't use USER environment in log prefix
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 27 May 2025 08:20:00 +0000 (11:20 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 16 Jun 2025 15:25:17 +0000 (15:25 +0000)
USER environment is not so generally supported anymore. The tools
supporting it should change the log prefix themselves if they want it.

Also this fixes inconsistency where some tools logged "tool(USER): "
or "tool: " log prefix depending on whether the configuration was read
by executing doveconf or not (because doveconf dropped the USER
environment).

src/lib-master/master-service.c

index d1553da7bf05997cabb6375dc7c7c42dcd277241..32faf1b2065d3902caeba8d773f7816de2731230 100644 (file)
@@ -570,12 +570,7 @@ master_service_init(const char *name, enum master_service_flags flags,
           we want to log */
        if (getenv(MASTER_SERVICE_LOG_SERVICE_ENV) != NULL)
                i_set_failure_internal();
-       if (getenv("USER") != NULL) {
-               i_set_failure_prefix("%s(%s): ", service->configured_name,
-                                    getenv("USER"));
-       } else {
-               i_set_failure_prefix("%s: ", service->configured_name);
-       }
+       i_set_failure_prefix("%s: ", service->configured_name);
 
        /* Initialize debug logging */
        value = getenv(DOVECOT_LOG_DEBUG_ENV);