1 |
slords |
1.1 |
diff -Nur -x '*.orig' -x '*.rej' qmail-workaround-0.0.1/no_connect_zero.c mezzanine_patched_qmail-workaround-0.0.1/no_connect_zero.c |
2 |
|
|
--- qmail-workaround-0.0.1/no_connect_zero.c 2006-04-13 10:15:21.000000000 -0400 |
3 |
|
|
+++ mezzanine_patched_qmail-workaround-0.0.1/no_connect_zero.c 2006-04-13 10:14:10.000000000 -0400 |
4 |
|
|
@@ -15,22 +15,25 @@ |
5 |
|
|
static int (*lib_connect)(int sockfd, const struct sockaddr *serv_addr, socklen_t |
6 |
|
|
addrlen) = NULL; |
7 |
|
|
void *handle; |
8 |
|
|
- char *error; |
9 |
|
|
struct sockaddr_in * sip; |
10 |
|
|
if (!lib_connect) { |
11 |
|
|
- handle = dlopen("/lib/tls/libc.so.6", |
12 |
|
|
- RTLD_LAZY); |
13 |
|
|
+ handle = dlopen("libc.so.6", RTLD_LAZY); |
14 |
|
|
if (!handle) |
15 |
|
|
{ |
16 |
|
|
const char *e = dlerror(); |
17 |
|
|
+ write(2, "Z", 1); |
18 |
|
|
write(2, e, strlen(e)); |
19 |
|
|
write(2, "\n", 1); |
20 |
|
|
errno = ELIBACC; |
21 |
|
|
return -1; |
22 |
|
|
} |
23 |
|
|
lib_connect = dlsym(handle, "connect"); |
24 |
|
|
- if ((error = dlerror()) != NULL) |
25 |
|
|
+ if (!lib_connect) |
26 |
|
|
{ |
27 |
|
|
+ const char *e = dlerror(); |
28 |
|
|
+ write(2, "Z", 1); |
29 |
|
|
+ write(2, e, strlen(e)); |
30 |
|
|
+ write(2, "\n", 1); |
31 |
|
|
errno = ELIBACC; |
32 |
|
|
return -1; |
33 |
|
|
} |