]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm-http: For each executed command, log the command name and the user parameter...
authorAki Tuomi <aki.tuomi@dovecot.fi>
Wed, 2 Mar 2016 14:07:51 +0000 (16:07 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 2 Mar 2016 18:28:31 +0000 (20:28 +0200)
src/doveadm/client-connection-http.c

index 132ef06e44ccc19f7052c506f7592f91b9367c01..b19b9d06f245801b17667b580a34abb191eea6e5 100644 (file)
@@ -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);