[dovecot-cvs] dovecot/src/lib-auth auth-client.h, 1.2, 1.3 auth-server-request.c, 1.7, 1.8

cras at procontrol.fi cras at procontrol.fi
Sat May 29 20:06:51 EEST 2004


Update of /home/cvs/dovecot/src/lib-auth
In directory talvi:/tmp/cvs-serv26071/lib-auth

Modified Files:
	auth-client.h auth-server-request.c 
Log Message:
Don't use hardcoded protocol list for auth process, string is just fine.



Index: auth-client.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-auth/auth-client.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/auth-client.h	17 May 2004 01:32:17 -0000	1.2
+++ b/auth-client.h	29 May 2004 17:06:49 -0000	1.3
@@ -30,7 +30,7 @@
    happens for the request. */
 struct auth_request *
 auth_client_request_new(struct auth_client *client,
-			enum auth_mech mech, enum auth_protocol protocol,
+			enum auth_mech mech, const char *protocol,
 			enum auth_client_request_new_flags flags,
 			auth_request_callback_t *callback, void *context,
 			const char **error_r);

Index: auth-server-request.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-auth/auth-server-request.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- a/auth-server-request.c	17 May 2004 01:32:17 -0000	1.7
+++ b/auth-server-request.c	29 May 2004 17:06:49 -0000	1.8
@@ -11,7 +11,7 @@
         struct auth_server_connection *conn;
 
 	enum auth_mech mech;
-	enum auth_protocol protocol;
+	char protocol[AUTH_CLIENT_PROTOCOL_BUF_SIZE];
 	enum auth_client_request_new_flags flags;
 
 	unsigned int id;
@@ -34,7 +34,8 @@
 
 	auth_request.type = AUTH_CLIENT_REQUEST_NEW;
 	auth_request.id = request->id;
-	auth_request.protocol = request->protocol;
+	strocpy(auth_request.protocol, request->protocol,
+		sizeof(auth_request.protocol));
 	auth_request.mech = request->mech;
 	auth_request.flags = request->flags;
 
@@ -178,7 +179,7 @@
 
 struct auth_request *
 auth_client_request_new(struct auth_client *client,
-			enum auth_mech mech, enum auth_protocol protocol,
+			enum auth_mech mech, const char *protocol,
 			enum auth_client_request_new_flags flags,
 			auth_request_callback_t *callback, void *context,
 			const char **error_r)
@@ -193,7 +194,7 @@
 	request = i_new(struct auth_request, 1);
 	request->conn = conn;
 	request->mech = mech;
-	request->protocol = protocol;
+	strocpy(request->protocol, protocol, sizeof(request->protocol));
 	request->flags = flags;
 	request->id = ++client->request_id_counter;
 	if (request->id == 0) {



More information about the dovecot-cvs mailing list