From: Timo Sirainen Date: Tue, 27 May 2025 08:20:00 +0000 (+0300) Subject: lib-master: Don't use USER environment in log prefix X-Git-Tag: 2.4.2~715 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f6bad8d6affaf05af9c9ca07d3f401a7fc3a9a0;p=thirdparty%2Fdovecot%2Fcore.git lib-master: Don't use USER environment in log prefix 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). --- diff --git a/src/lib-master/master-service.c b/src/lib-master/master-service.c index d1553da7bf..32faf1b206 100644 --- a/src/lib-master/master-service.c +++ b/src/lib-master/master-service.c @@ -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);