[dovecot-cvs] dovecot/src/auth passdb-blocking.c,1.8,1.9

cras at dovecot.org cras at dovecot.org
Wed Oct 19 16:37:25 EEST 2005


Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv16052

Modified Files:
	passdb-blocking.c 
Log Message:
Blocking passdb didn't set nologin/proxy/nodelay flags for the request.



Index: passdb-blocking.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-blocking.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- passdb-blocking.c	16 Oct 2005 12:03:37 -0000	1.8
+++ passdb-blocking.c	19 Oct 2005 13:37:22 -0000	1.9
@@ -47,7 +47,7 @@
 static int get_pass_reply(struct auth_request *request, const char *reply,
 			  const char **password_r, const char **scheme_r)
 {
-	const char *p, *p2;
+	const char *p, *p2, **tmp;
 
 	/* user \t {scheme}password [\t extra] */
 	p = strchr(reply, '\t');
@@ -83,12 +83,16 @@
 	if (*reply != '\0') {
 		i_assert(request->extra_fields == NULL);
 
-		p = strstr(reply, "\tproxy");
-		if (p != NULL && (p[6] == '\0' || p[6] == '\t'))
-			request->proxy = TRUE;
-
-		request->extra_fields = auth_stream_reply_init(request);
-		auth_stream_reply_import(request->extra_fields, reply);
+		for (tmp = t_strsplit(reply, "\t"); *tmp != NULL; tmp++) {
+			p = strchr(*tmp, '=');
+			if (p == NULL)
+				p = "";
+			else {
+				*tmp = t_strdup_until(*tmp, p);
+				p++;
+			}
+			auth_request_set_field(request, *tmp, p, NULL);
+		}
 	}
 	return 0;
 }



More information about the dovecot-cvs mailing list