Mercurial > dovecot > core-2.2
changeset 19949:761f81b9a814
doveadm-server: Fixed initializing username for mail commands.
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Tue, 22 Mar 2016 09:19:45 +0200 |
parents | c01499a4ca0f |
children | 4ccd54122839 |
files | src/doveadm/client-connection.c |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/doveadm/client-connection.c Wed Mar 23 10:08:06 2016 +0900 +++ b/src/doveadm/client-connection.c Tue Mar 22 09:19:45 2016 +0200 @@ -104,7 +104,7 @@ mctx = doveadm_mail_cmd_init(cmd, set); mctx->full_args = argv+1; mctx->proxying = TRUE; - + mctx->cur_username = cctx->username; mctx->service_flags |= MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT | MAIL_STORAGE_SERVICE_FLAG_USERDB_LOOKUP; @@ -149,6 +149,13 @@ } mctx->args = argv+optind; + if (mctx->cur_username != NULL) { + if (strchr(mctx->cur_username, '*') != NULL || + strchr(mctx->cur_username, '?') != NULL) { + add_username_header = TRUE; + } + } + if (doveadm_print_is_initialized() && add_username_header) { doveadm_print_header("username", "Username", DOVEADM_PRINT_HEADER_FLAG_STICKY |