Mercurial > dovecot > core-2.2
changeset 21770:ace143d416d1
auth: Support client_id variable
When imap_id_retain is turned on, contains
the client ID request content with dovecot
special vars removed.
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Tue, 14 Mar 2017 10:01:51 +0200 |
parents | 6985bf43b94f |
children | 4cc995a5f002 |
files | src/auth/auth-request-var-expand.c src/auth/auth-request-var-expand.h |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/auth-request-var-expand.c Thu Mar 16 10:01:23 2017 +0200 +++ b/src/auth/auth-request-var-expand.c Tue Mar 14 10:01:51 2017 +0200 @@ -46,6 +46,7 @@ { '\0', NULL, "auth_username" }, { '\0', NULL, "auth_domain" }, { '\0', NULL, "local_name" }, + { '\0', NULL, "client_id" }, /* be sure to update AUTH_REQUEST_VAR_TAB_COUNT */ { '\0', NULL, NULL } }; @@ -173,6 +174,8 @@ tab[33].value = escape_func(auth_request->local_name, auth_request); else tab[33].value = ""; + if (auth_request->client_id != NULL) + tab[34].value = escape_func(auth_request->client_id, auth_request); return ret_tab; }
--- a/src/auth/auth-request-var-expand.h Thu Mar 16 10:01:23 2017 +0200 +++ b/src/auth/auth-request-var-expand.h Tue Mar 14 10:01:51 2017 +0200 @@ -8,7 +8,7 @@ #define AUTH_REQUEST_VAR_TAB_USER_IDX 0 #define AUTH_REQUEST_VAR_TAB_USERNAME_IDX 1 #define AUTH_REQUEST_VAR_TAB_DOMAIN_IDX 2 -#define AUTH_REQUEST_VAR_TAB_COUNT 34 +#define AUTH_REQUEST_VAR_TAB_COUNT 35 extern const struct var_expand_table auth_request_var_expand_static_tab[AUTH_REQUEST_VAR_TAB_COUNT+1];