[dovecot-cvs] dovecot/src/login-common auth-connection.c,1.4,1.5 master.c,1.1,1.2

cras at procontrol.fi cras at procontrol.fi
Sat Feb 8 10:07:33 EET 2003


Update of /home/cvs/dovecot/src/login-common
In directory danu:/tmp/cvs-serv1369/login-common

Modified Files:
	auth-connection.c master.c 
Log Message:
Some extra checks to make sure we notice if auth process ID is 0.



Index: auth-connection.c
===================================================================
RCS file: /home/cvs/dovecot/src/login-common/auth-connection.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- auth-connection.c	2 Feb 2003 10:53:43 -0000	1.4
+++ auth-connection.c	8 Feb 2003 08:07:31 -0000	1.5
@@ -189,6 +189,12 @@
 static void auth_handle_handshake(struct auth_connection *conn,
 				  struct auth_login_handshake_output *handshake)
 {
+	if (handshake->pid == 0) {
+		i_error("BUG: Auth process said it's PID 0");
+		auth_connection_destroy(conn);
+		return;
+	}
+
 	conn->pid = handshake->pid;
 	conn->available_auth_mechs = handshake->auth_mechanisms;
 	conn->handshake_received = TRUE;

Index: master.c
===================================================================
RCS file: /home/cvs/dovecot/src/login-common/master.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- master.c	28 Jan 2003 21:35:26 -0000	1.1
+++ master.c	8 Feb 2003 08:07:31 -0000	1.2
@@ -34,6 +34,8 @@
 {
 	struct master_login_request req;
 
+	i_assert(auth_pid != 0);
+
 	memset(&req, 0, sizeof(req));
 	req.tag = client->fd;
 	req.auth_pid = auth_pid;




More information about the dovecot-cvs mailing list