[dovecot-cvs] dovecot/src/auth auth-client-connection.c, 1.15,
1.16 mech.h, 1.24, 1.25 passdb-sql.c, 1.2, 1.3
cras at dovecot.org
cras at dovecot.org
Mon Oct 18 22:21:43 EEST 2004
- Previous message: [dovecot-cvs] dovecot/src/lib restrict-access.c,1.16,1.17
- Next message: [dovecot-cvs] dovecot/src/imap-login Makefile.am, 1.3,
1.4 client-authenticate.c, 1.32, 1.33 client.c, 1.31,
1.32 client.h, 1.11, 1.12 imap-proxy.c, NONE, 1.1 imap-proxy.h,
NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv11547/auth
Modified Files:
auth-client-connection.c mech.h passdb-sql.c
Log Message:
Added IMAP and POP3 proxying support.
Index: auth-client-connection.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-client-connection.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- auth-client-connection.c 18 Oct 2004 01:00:42 -0000 1.15
+++ auth-client-connection.c 18 Oct 2004 19:21:40 -0000 1.16
@@ -80,10 +80,11 @@
break;
case AUTH_CLIENT_RESULT_FAILURE:
str = t_str_new(128);
- str_printfa(str, "FAIL\t%u", request->id);
- str_append_c(str, '\t');
+ str_printfa(str, "FAIL\t%u\t", request->id);
if (reply != NULL)
str_append(str, reply);
+ if (request->user != NULL)
+ str_printfa(str, "\tuser=%s", request->user);
if (request->extra_fields) {
str_append_c(str, '\t');
str_append(str, request->extra_fields);
Index: mech.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/mech.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- mech.h 18 Oct 2004 01:00:42 -0000 1.24
+++ mech.h 18 Oct 2004 19:21:40 -0000 1.25
@@ -37,6 +37,7 @@
unsigned int accept_input:1;
unsigned int no_failure_delay:1;
unsigned int no_login:1;
+ unsigned int proxy:1;
/* ... mechanism specific data ... */
};
Index: passdb-sql.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-sql.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- passdb-sql.c 18 Oct 2004 01:00:42 -0000 1.2
+++ passdb-sql.c 18 Oct 2004 19:21:40 -0000 1.3
@@ -30,6 +30,7 @@
static struct sql_connection *passdb_sql_conn;
static void result_save_extra_fields(struct sql_result *result,
+ struct passdb_sql_request *sql_request,
struct auth_request *auth_request)
{
unsigned int i, fields_count;
@@ -66,6 +67,21 @@
str_append_c(str, '\t');
str_append(str, name);
}
+ } else if (strcmp(name, "proxy") == 0) {
+ if (*value == 'Y') {
+ /* we're proxying authentication for this
+ user. send password back if using plaintext
+ authentication. */
+ auth_request->proxy = TRUE;
+ if (str_len(str) > 0)
+ str_append_c(str, '\t');
+ str_append(str, name);
+
+ if (*sql_request->password != '\0') {
+ str_printfa(str, "\tpass=%s",
+ sql_request->password);
+ }
+ }
} else {
if (str_len(str) > 0)
str_append_c(str, '\t');
@@ -102,7 +118,7 @@
get_log_prefix(auth_request));
} else {
password = t_strdup(sql_result_get_field_value(result, idx));
- result_save_extra_fields(result, auth_request);
+ result_save_extra_fields(result, sql_request, auth_request);
}
if (ret > 0) {
- Previous message: [dovecot-cvs] dovecot/src/lib restrict-access.c,1.16,1.17
- Next message: [dovecot-cvs] dovecot/src/imap-login Makefile.am, 1.3,
1.4 client-authenticate.c, 1.32, 1.33 client.c, 1.31,
1.32 client.h, 1.11, 1.12 imap-proxy.c, NONE, 1.1 imap-proxy.h,
NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list