From: Aki Tuomi Date: Wed, 2 Mar 2016 14:07:51 +0000 (+0200) Subject: doveadm-http: For each executed command, log the command name and the user parameter... X-Git-Tag: 2.2.22.rc1~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b7c4fe8a43c16fce1312aa4d39515ec1b4637e2a;p=thirdparty%2Fdovecot%2Fcore.git doveadm-http: For each executed command, log the command name and the user parameter if given. --- diff --git a/src/doveadm/client-connection-http.c b/src/doveadm/client-connection-http.c index 132ef06e44..b19b9d06f2 100644 --- a/src/doveadm/client-connection-http.c +++ b/src/doveadm/client-connection-http.c @@ -317,6 +317,7 @@ doveadm_http_server_command_execute(struct client_connection_http *conn) } struct istream *is; + const char *user; struct ioloop *ioloop,*prev_ioloop = current_ioloop; memset(&cctx, 0, sizeof(cctx)); @@ -338,6 +339,10 @@ doveadm_http_server_command_execute(struct client_connection_http *conn) cctx.remote_ip = conn->client.remote_ip; cctx.remote_port = conn->client.remote_port; + if (doveadm_cmd_param_str(&cctx, "user", &user)) + i_info("doveadm(%s): Executing command '%s' as '%s'", i_stream_get_name(conn->client.input), cctx.cmd->name, user); + else + i_info("doveadm(%s): Executing command '%s'", i_stream_get_name(conn->client.input), cctx.cmd->name); cctx.cmd->cmd(&cctx); io_loop_set_current(prev_ioloop);