[dovecot-cvs] dovecot/src/auth auth-digest-md5.c,1.17,1.18 auth-interface.h,1.6,1.7 auth-plain.c,1.9,1.10

cras at procontrol.fi cras at procontrol.fi
Thu Jan 9 14:19:09 EET 2003


Update of /home/cvs/dovecot/src/auth
In directory danu:/tmp/cvs-serv31037/auth

Modified Files:
	auth-digest-md5.c auth-interface.h auth-plain.c 
Log Message:
Log username with logins. auth/login processes are getting a bit kludgy..



Index: auth-digest-md5.c
===================================================================
RCS file: /home/cvs/dovecot/src/auth/auth-digest-md5.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- auth-digest-md5.c	5 Jan 2003 15:19:50 -0000	1.17
+++ auth-digest-md5.c	9 Jan 2003 12:19:07 -0000	1.18
@@ -536,6 +536,10 @@
 	if (auth->authenticated) {
 		/* authentication is done, we were just waiting the last
 		   word from client */
+		if (strocpy(reply.virtual_user, auth->cookie_reply.virtual_user,
+			    sizeof(reply.virtual_user)) < 0)
+			i_panic("virtual_user overflow");
+
 		auth->cookie_reply.success = TRUE;
 		reply.result = AUTH_RESULT_SUCCESS;
 		callback(&reply, NULL, context);

Index: auth-interface.h
===================================================================
RCS file: /home/cvs/dovecot/src/auth/auth-interface.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- auth-interface.h	5 Jan 2003 15:19:50 -0000	1.6
+++ auth-interface.h	9 Jan 2003 12:19:07 -0000	1.7
@@ -68,6 +68,8 @@
 	unsigned char cookie[AUTH_COOKIE_SIZE];
 	enum auth_result result;
 
+	char virtual_user[AUTH_MAX_VUSER_LEN]; /* set at SUCCESS */
+
 	size_t data_size;
 	/* unsigned char data[]; */
 };

Index: auth-plain.c
===================================================================
RCS file: /home/cvs/dovecot/src/auth/auth-plain.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- auth-plain.c	5 Jan 2003 15:19:50 -0000	1.9
+++ auth-plain.c	9 Jan 2003 12:19:07 -0000	1.10
@@ -46,6 +46,11 @@
 		if (userinfo->verify_plain(user, pass, cookie_reply)) {
 			cookie_reply->success = TRUE;
 			reply.result = AUTH_RESULT_SUCCESS;
+
+			if (strocpy(reply.virtual_user,
+				    cookie_reply->virtual_user,
+				    sizeof(reply.virtual_user)) < 0)
+				i_panic("virtual_user overflow");
 		}
 
 		if (*pass != '\0') {




More information about the dovecot-cvs mailing list