dovecot-2.1: login: Save final SASL reply to client struct.

dovecot at dovecot.org dovecot at dovecot.org
Thu Nov 24 01:53:12 EET 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/cc497af529cd
changeset: 13771:cc497af529cd
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Nov 24 01:45:09 2011 +0200
description:
login: Save final SASL reply to client struct.

diffstat:

 src/login-common/client-common.h |  1 +
 src/login-common/sasl-server.c   |  9 ++++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 733ac4aba089 -r cc497af529cd src/login-common/client-common.h
--- a/src/login-common/client-common.h	Thu Nov 24 01:34:02 2011 +0200
+++ b/src/login-common/client-common.h	Thu Nov 24 01:45:09 2011 +0200
@@ -101,6 +101,7 @@
 	struct auth_client_request *auth_request;
 	string_t *auth_response;
 	time_t auth_first_started;
+	const char *sasl_final_resp;
 
 	unsigned int master_auth_id;
 	unsigned int master_tag;
diff -r 733ac4aba089 -r cc497af529cd src/login-common/sasl-server.c
--- a/src/login-common/sasl-server.c	Thu Nov 24 01:34:02 2011 +0200
+++ b/src/login-common/sasl-server.c	Thu Nov 24 01:45:09 2011 +0200
@@ -232,11 +232,14 @@
 			if (strncmp(args[i], "user=", 5) == 0) {
 				i_free(client->virtual_user);
 				client->virtual_user = i_strdup(args[i] + 5);
-			}
-			if (strcmp(args[i], "nologin") == 0 ||
-			    strcmp(args[i], "proxy") == 0) {
+			} else if (strcmp(args[i], "nologin") == 0 ||
+				   strcmp(args[i], "proxy") == 0) {
 				/* user can't login */
 				nologin = TRUE;
+			} else if (strncmp(args[i], "resp=", 5) == 0 &&
+				   login_binary->sasl_support_final_reply) {
+				client->sasl_final_resp =
+					p_strdup(client->pool, args[i] + 5);
 			}
 		}
 


More information about the dovecot-cvs mailing list