search for: auth_request

Displaying 20 results from an estimated 107 matches for "auth_request".

2004 Jul 01
3
[PATCH, RFC] add APOP authentication mechanism
...r option) any later version. + */ + +#include "common.h" +#include "safe-memset.h" +#include "mech.h" +#include "passdb.h" +#include "md5.h" +#include "buffer.h" +#include "hex-binary.h" + +#include <ctype.h> + +struct apop_auth_request { + struct auth_request auth_request; + + pool_t pool; + + /* requested: */ + char *challenge; + + /* received: */ + char *username; + char *digest; + unsigned long maxbuf; +}; + +static void +apop_credentials_callback(const char *credentials, + struct auth_request *auth_request) +{ + struct ap...
2004 Aug 09
1
[PATCH] RPA authentication mechanism
...+#include "passdb.h" +#include "str.h" +#include "strfuncs.h" +#include "safe-memset.h" +#include "randgen.h" +#include "buffer.h" +#include "hostpid.h" +#include "hex-binary.h" +#include "md5.h" + +struct rpa_auth_request { + struct auth_request auth_request; + + pool_t pool; + + int phase; + + /* cached: */ + unsigned char *pwd_md5; + size_t service_len; + const unsigned char *service_ucs2be; + size_t username_len; + const unsigned char *username_ucs2be; + size_t realm_len; + const unsigned char *realm_ucs2be; + +...
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...
2004 Jul 22
1
[PATCH] add LOGIN authentication mechanism
...ware Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include "common.h" +#include "mech.h" +#include "passdb.h" +#include "safe-memset.h" + +static void verify_callback(enum passdb_result result, + struct auth_request *request) +{ + mech_auth_finish(request, NULL, 0, result == PASSDB_RESULT_OK); +} + +static int +mech_login_auth_continue(struct auth_request *auth_request, + const unsigned char *data, size_t data_size, + mech_callback_t *callback) +{ + struct auth_client_request_reply reply; + static const...
2004 Jun 14
1
vpopmail and open smtp relay
...}; /* Continue authentication request */ diff -Naur dovecot-0.99.10.5/src/auth/mech.c dovecot-0.99.10.5-patched/src/auth/mech.c --- dovecot-0.99.10.5/src/auth/mech.c Sun May 18 16:26:28 2003 +++ dovecot-0.99.10.5-patched/src/auth/mech.c Mon Jun 14 13:27:33 2004 @@ -98,7 +98,10 @@ auth_request->conn = conn; auth_request->id = request->id; auth_request->protocol = request->protocol; - +#ifdef PASSDB_VPOPMAIL + auth_request->client_ip = request->client_ip; +#endif + hash_insert(conn->auth_requests, POINTER_CAST(request->i...
2016 Jul 26
2
[BUG] Re: auth_bind with "()" in username not working
...eper in the sources give me a hint if this will make some troubles? Patch for 2.2.16: diff --git a/src/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...
2017 Nov 21
3
Passing information from passdb to userdb
I'm trying to hack together a new authentication back-end and I wanted to know if it's possible to pass values from passdb to userdb in the auth_request structure at authentication time. I modified struct auth_request in auth-request.h to contain a new variable and it gets set properly in my passdb, however the value is not there when checking for it userdb. I'm very novice when it comes to Dovecot programming so any help is appreciated. Thanks...
2008 Jun 12
1
strange looking code and userdb errors
hi, i'm trying to use passdb ldap and userdb prefetch, using the userdb_ prefixes in pass_attrs, and i get: passdb didn't return userdb entries looking at the code at auth/userdb-prefetch.c i see: if (auth_request->userdb_reply == NULL) { if (auth_request->auth->userdbs->next == NULL) { /* no other userdbs */ auth_request_log_error(auth_request, "prefetch", "passdb didn't return user...
2004 Jul 09
1
passing remote ip to pam
...ain.c dovecot-0.99.10.6/src/auth/mech-plain.c --- dovecot-0.99.10.6.deborig/src/auth/mech-plain.c 2003-05-18 05:26:28.000000000 -0700 +++ dovecot-0.99.10.6/src/auth/mech-plain.c 2004-07-08 18:25:14.000000000 -0700 @@ -21,6 +21,7 @@ mech_plain_auth_continue(struct auth_req size_t i, count, len; auth_request->callback = callback; + auth_request->remote_ip = request->remote_ip; /* authorization ID \0 authentication ID \0 pass. we'll ignore authorization ID for now. */ diff -rpu dovecot-0.99.10.6.deborig/src/auth/mech.h dovecot-0.99.10.6/src/auth/mech.h --- dovecot-0.99.10.6.deborig/...
2017 Aug 23
1
Patch: acl list from ldap must be possible to have multiple values, that combined in one comma separated list
...ll in one CSV list diff -upbBr src/auth/passdb-ldap.c src/auth/passdb-ldap.c --- src/auth/passdb-ldap.c 2017-06-26 13:29:36.000000000 +0200 +++ src/auth/passdb-ldap.c 2017-08-22 09:56:59.697420441 +0200 @@ -52,13 +52,27 @@ ldap_query_save_result(struct ldap_conne auth_request_set_null_field(auth_request, name); continue; } + if (strcmp(name,"userdb_acl_groups")==0) { + int i = 1; + while (values[i] != NULL) { + strcat(values[0],","); +...
2003 Nov 04
0
PATCH: make local IP address available to auth modules
The attached patch makes the local IP address to which the client connected available to the authentication modules; i.e., the local IP address is available for substitution as %i for the mysql and pgsql modules. We needed this feature to support thousands of our legacy accounts which are authenticated by username/local_part (not the full email address) and IP address (one per domain). Timo,
2006 Feb 03
1
passwd-userdb with args
...rray.h" + #include "str.h" + #include "var-expand.h" #include "userdb.h" #include <pwd.h> + struct passwd_userdb_module { + struct userdb_module module; + + array_t ARRAY_DEFINE(template, const char *); + }; + static void passwd_lookup(struct auth_request *auth_request, userdb_callback_t *callback) { + struct userdb_module *_module = auth_request->userdb->userdb; + struct passwd_userdb_module *module = + (struct passwd_userdb_module *)_module; struct passwd *pw; struct auth_stream_reply *reply; + const struct var_expand_tab...
2005 Mar 29
2
Multiple auth method problem
Hi, I'm having issues getting the multiple authentication methods of dovecot 1.0-test65 to work correctly on NetBSD. I am combining a MySQL database of virtual host accounts with the system password database of local machine accounts. Both work correctly when enabled on their own, but when enabled together only the one listed first in the "auth default" section of dovecot.conf
2008 Sep 25
1
patch for passdb-vpopmail in v1.1.3
...e to update the relays file brings a small bug to light, fixable with the following patch: --- passdb-vpopmail.c~ 2008-09-25 15:06:47.000000000 +0100 +++ passdb-vpopmail.c 2008-09-25 15:07:14.000000000 +0100 @@ -31,9 +31,9 @@ } if (((vpw->pw_gid & NO_IMAP) != 0 && - strcmp(auth_request->service, "IMAP") == 0) || + strcasecmp(auth_request->service, "IMAP") == 0) || ((vpw->pw_gid & NO_POP) != 0 && - strcmp(auth_request->service, "POP3") == 0)) { + strcasecmp(auth_request->service, "POP3") == 0))...
2003 Jul 23
0
Re: Stripping of domain name
...how to do that with mailman. RCS file: /home/cvs/dovecot/src/auth/mech-plain.c,v retrieving revision 1.13 diff -u -r1.13 mech-plain.c --- mech-plain.c 8 May 2003 03:18:43 -0000 1.13 +++ mech-plain.c 23 Jul 2003 19:31:13 -0000 @@ -48,14 +48,8 @@ mech_auth_finish(auth_request, NULL, 0, FALSE); } else { /* split and save user/realm */ - if (strchr(authenid, '@') == NULL && default_realm != NULL) { - auth_request->user = p_strconcat(auth_request->pool, -...
2004 Nov 19
0
[PATCH] add initial response support for NTLM and RPA
...rc/auth/mech-ntlm.c --- dovecot-1.0-test52.vanilla/src/auth/mech-ntlm.c 2004-11-07 13:41:25.000000000 +0300 +++ dovecot-1.0-test52/src/auth/mech-ntlm.c 2004-11-14 00:07:03.000000000 +0300 @@ -203,12 +208,14 @@ mech_ntlm_auth_continue(struct auth_requ } static void -mech_ntlm_auth_initial(struct auth_request *auth_request, - const unsigned char *data __attr_unused__, - size_t data_size __attr_unused__, +mech_ntlm_auth_initial(struct auth_request *request, + const unsigned char *data, size_t data_size, mech_callback_t *callback) { - callback(auth_request, AUTH_CLIENT_R...
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 }, @@ -8...
2012 Oct 02
2
[PATCH] Add SCRAM-SHA-1 password scheme
...Hi */ - for (j = 2; j <= i; j++) { - hmac_init(&ctx, str, str_size, &hash_method_sha1); - hmac_update(&ctx, U, sizeof(U)); - hmac_final(&ctx, U); - for (k = 0; k < SHA1_RESULTLEN; k++) - result[k] ^= U[k]; - } -} - -static const char *get_scram_server_first(struct scram_auth_request *request) +static const char *get_scram_server_first(struct scram_auth_request *request, + int iter, const char *salt) { unsigned char snonce[SCRAM_SERVER_NONCE_LEN+1]; string_t *str; @@ -84,12 +63,9 @@ snonce[sizeof(snonce)-1] = '\0'; request->snonce = p_strndup(request-&...
2014 Apr 25
1
Segfault in auth (when talked to by postfix lda)
...(fields=0x0, key=key at entry=0xb84ae448 "uid", value=value at entry=0xb84a6312 "1120", flags=flags at entry=(unknown: 0)) at auth-fields.c:68 field = <optimized out> idx = 3091882770 __FUNCTION__ = "auth_fields_add" #2 0xb77bb03b in auth_request_set_userdb_field (request=request at entry=0xb84b9218, name=0xb84ae448 "uid", value=0xb84a6312 "1120") at auth-request.c:1605 uid = <optimized out> gid = <optimized out> #3 0xb77d2fb5 in userdb_template_export (tmpl=0xb84ae410, auth_request=a...
2008 Oct 29
1
Panic: pop3-login: file sasl-server.c: line 75 (authenticate_callback): assertion failed: (client->auth_request == request)
Running Dovecot-1.1.5, I see this assertion failure: Panic: pop3-login: file sasl-server.c: line 75 (authenticate_callback): assertion failed: (client->auth_request == request) Error: pop3-login: Raw backtrace: 2 pop3-login 0x000000010000ac41 default_fatal_finish + 41 -> 3 pop3-login 0x000000010000acac i_syslog_fatal_handler + 0 -> 4 pop3-login 0x000000010000a446...