[dovecot-cvs] dovecot/src/auth login-connection.c,1.20,1.21

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


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

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



Index: login-connection.c
===================================================================
RCS file: /home/cvs/dovecot/src/auth/login-connection.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- login-connection.c	2 Feb 2003 10:16:42 -0000	1.20
+++ login-connection.c	8 Feb 2003 08:07:31 -0000	1.21
@@ -284,13 +284,18 @@
 void login_connections_init(void)
 {
 	const char *env;
+	unsigned int pid;
 
 	env = getenv("AUTH_PROCESS");
 	if (env == NULL)
 		i_fatal("AUTH_PROCESS environment is unset");
 
+	pid = atoi(env);
+	if (pid == 0)
+		i_fatal("AUTH_PROCESS can't be 0");
+
 	memset(&handshake_output, 0, sizeof(handshake_output));
-	handshake_output.pid = atoi(env);
+	handshake_output.pid = pid;
 	handshake_output.auth_mechanisms = auth_mechanisms;
 
 	connections = NULL;




More information about the dovecot-cvs mailing list