search for: auth_request_get_var_expand_table

Displaying 13 results from an estimated 13 matches for "auth_request_get_var_expand_table".

2016 Jul 26
2
[BUG] Re: auth_bind with "()" in username not working
...auth/passdb-ldap.c b/src/auth/passdb-ldap.c index c1c2544..10bfe20 100644 --- a/src/auth/passdb-ldap.c +++ b/src/auth/passdb-ldap.c @@ -367,7 +367,7 @@ ldap_verify_plain_auth_bind_userdn(struct auth_request *auth_request, brequest->request.type = LDAP_REQUEST_TYPE_BIND; - vars = auth_request_get_var_expand_table(auth_request, ldap_escape); + vars = auth_request_get_var_expand_table(auth_request, NULL); dn = t_str_new(512); var_expand(dn, conn->set.auth_bind_userdn, vars);
2014 Dec 12
0
PATCH - add username_format to the PAM auth module
...pam_setcred:1; unsigned int pam_session:1; unsigned int failure_show_msg:1; + unsigned int pam_allow_transform:1; }; struct pam_conv_context { @@ -67,6 +68,13 @@ char *string; int i; + const struct var_expand_table *table; + string_t *username; + + username = t_str_new(256); + table = auth_request_get_var_expand_table(ctx->request, auth_request_str_escape); + var_expand(username, passdb->username_format, table); + *resp_r = NULL; resp = calloc(num_msg, sizeof(struct pam_response)); @@ -82,7 +90,7 @@ case PAM_PROMPT_ECHO_ON: /* Assume we're asking for user. We might not ever get here...
2007 Nov 10
2
Request for variable unique to each server?
I've been looking for a variable I can use in my dovecot.conf within the INDEX= setting so I can have one index dir per imap server on NFS. I've been looking at http://wiki.dovecot.org/Variables but no variable seems to contain something like server hostname, and I've been hunting for the variable expansion code in dovecot but haven't been able to find it. %l (local IP) won't
2016 Jun 09
2
auth_bind with "()" in username not working
Hi all, I have an AD testsetup with auth_bind setting auth_bind_userdn = "spdev\\%Ln" I created a testuser "claasc (test)" which works fine in all ldapfilters but not for the auth_bind. the log shows everything correct just "invalid credentials" mail.debug: Jun 9 14:12:31 dovecot: auth: Debug: auth client connected (pid=12202) mail.debug: Jun 9 14:12:31
2006 Nov 18
2
Auth checking also the service
Hello everyone. I'm switching to dovecot from courier-imap and after some problems with Apple Mail client, now everything seems to be fine. The only problem that I have not solved yet is to check also the service (pop3, pop3s, imap, imaps) in the authentication phase. In courier-authlib I do this: MYSQL_SELECT_CLAUSE SELECT username, \ password, \
2014 May 03
1
%{orig_user} missing in checkpassword-Script
...nly one of them. I tried myself and found the following: - the environment of a checkpassword script is setup by checkpassword_setup_env() in db-checkpassword.c - checkpassword_setup_env() calls env_put_auth_vars() - env_put_auth_vars() creates AUTH_xxx environment variables for all entries of the auth_request_get_var_expand_table() - the auth_request_get_var_expand_table_full() routine does not contain the original user, but the auth_request-struct does. So I changed the dovecot sourcecode (version 2.2.12) as follows In src/auth/auth-request.h line 152 I replaced #define AUTH_REQUEST_VAR_TAB_COUNT 27 by #define AUTH_REQUE...
2011 Feb 09
2
critical feature from version 1 not migrated to version 2 = authentication configuration database per IP
not possible make operation with dovecot version 2.x as was possible in version 1.x: requisites description: connect to dovecot service on IP1 - dovecot must serve users that related to domain1 located in database1 connect to dovecot service on IP2 - dovecot must serve users that related to domain2 located in database2 login must be with username that form not as "user at domain" but
2007 Jan 15
1
patch for serdb-ldap which allows set user_global_mail variable
...vals[i]); @@ -126,6 +127,16 @@ auth_stream_reply_add(reply, "gid", dec2str(conn->set.gid)); } + if (!seen_mail) { + if (*conn->set.user_global_mail != '\0') { + const struct var_expand_table *vars; + vars = auth_request_get_var_expand_table(auth_request, auth_request_str_escape); + string_t *str; + str = t_str_new(512); + var_expand(str, conn->set.user_global_mail, vars); + auth_stream_reply_add(reply, "mail", str_c(str)); + } + } return reply; } -...
2015 Nov 02
2
auth_request_get_var_expand test fails on big endian arches.
............................... : FAILED auth request var expand usernames .................................... : ok auth request var expand funcs ........................................ : ok 2 / 5 tests failed Makefile:1257: recipe for target 'check-test' failed Looking into it I found that auth_request_get_var_expand_table ends up calling the net_ip2addr function. This function, in turn, uses ntohl to convert from network byte order to host byte order. In big endian machines, that means that the string output will be ------------- big endian --------------- +user at +domain1@+domain2 +user +domain1 at +domain2 +serv...
2014 Apr 24
0
Help implementing username_format in auth PAM driver
...onst char* +pam_username_lookup(struct auth_request *request) +{ + struct passdb_module *_module = request->passdb->passdb; + struct pam_passdb_module *module = (struct pam_passdb_module *)_module; + string_t *username = t_str_new(256); + var_expand(username, module->username_format, + auth_request_get_var_expand_table(request, auth_request_str_escape)); + return str_c(username); +} + static int pam_userpass_conv(int num_msg, pam_const struct pam_message **msg, struct pam_response **resp_r, void *appdata_ptr) @@ -82,7 +95,7 @@ pam_userpass_conv(int num_msg, pam_const struct pam_message **msg, case PAM_P...
2006 May 15
1
dovecot ldap auth bind and different directories
...great product everyone! Andrew =================================================================== --- dovecot-1.0.beta8/src/auth/auth-request.c 2006-04-12 22:00:06.000000000 -0400 +++ dovecot-1.0.beta8.new/src/auth/auth-request.c 2006-05-15 12:37:06.000000000 -0400 @@ -852,6 +852,7 @@ auth_request_get_var_expand_table(const struct auth_request *auth_request, const char *(*escape_func)(const char *)) { + char *str; static struct var_expand_table static_tab[] = { { 'u', NULL }, { 'n', NULL }, @@ -869,7 +870,27 @@...
2006 Feb 03
1
passwd-userdb with args
...w->pw_dir); callback(reply, auth_request); } struct userdb_module_interface userdb_passwd = { "passwd", ! NULL, NULL, NULL, passwd_lookup }; --- 45,118 ---- pw->pw_name, auth_request->user); } + t_push(); + str = t_str_new(256); + table = auth_request_get_var_expand_table(auth_request, NULL); + reply = auth_stream_reply_init(auth_request); auth_stream_reply_add(reply, NULL, pw->pw_name); auth_stream_reply_add(reply, "system_user", pw->pw_name); auth_stream_reply_add(reply, "uid", dec2str(pw->pw_uid)); auth_stream_reply_ad...
2006 Jun 26
1
[PATCH, RFC 0/13] OTP: add auth_cache_remove()
...ft -= alloc_size; hash_insert(cache->hash, node->data, node); } + +void auth_cache_remove(struct auth_cache *cache, + const struct auth_request *request, + const char *key) +{ + string_t *str; + struct cache_node *node; + + str = t_str_new(256); + var_expand(str, key, + auth_request_get_var_expand_table(request, + auth_request_str_escape)); + + node = hash_lookup(cache->hash, str_c(str)); + if (node == NULL) + return; + + auth_cache_node_destroy(cache, node); +} diff -urdpNX /usr/share/dontdiff -x Makefile dovecot.vanilla/src/auth/auth-cache.h dovecot/src/auth/auth-cache.h --- dov...