-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.432 2006/11/13 12:07:46 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.433 2006/11/13 12:29:30 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
values apply to message reception, and not to the outgoing interface when
a message is delivered. (The old names remain recognized, of course.)
+PH/44 There was no timeout on the connect() call when using a Unix domain
+ socket in the ${readsocket expansion. There now is.
+
Exim version 4.63
-----------------
-/* $Cambridge: exim/src/src/expand.c,v 1.70 2006/11/13 12:07:46 ph10 Exp $ */
+/* $Cambridge: exim/src/src/expand.c,v 1.71 2006/11/13 12:29:30 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
else
{
+ int rc;
if ((fd = socket(PF_UNIX, SOCK_STREAM, 0)) == -1)
{
expand_string_message = string_sprintf("failed to create socket: %s",
sockun.sun_family = AF_UNIX;
sprintf(sockun.sun_path, "%.*s", (int)(sizeof(sockun.sun_path)-1),
sub_arg[0]);
- if(connect(fd, (struct sockaddr *)(&sockun), sizeof(sockun)) == -1)
+
+ sigalrm_seen = FALSE;
+ alarm(timeout);
+ rc = connect(fd, (struct sockaddr *)(&sockun), sizeof(sockun));
+ alarm(0);
+ if (rc < 0)
{
expand_string_message = string_sprintf("failed to connect to socket "
"%s: %s", sub_arg[0], strerror(errno));
goto SOCK_FAIL;
}
+ if (sigalrm_seen)
+ {
+ expand_string_message = US "socket connect timed out";
+ goto SOCK_FAIL;
+ }
}
DEBUG(D_expand) debug_printf("connected to socket %s\n", sub_arg[0]);