~ubuntu-branches/ubuntu/saucy/clamav/saucy-backports

« back to all changes in this revision

Viewing changes to debian/patches/0009-Workaround-a-bug-in-libc-on-Hurd.patch

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman
  • Date: 2014-07-15 01:08:10 UTC
  • mfrom: (0.35.47 sid)
  • Revision ID: package-import@ubuntu.com-20140715010810-ru66ek4fun2iseba
Tags: 0.98.4+dfsg-2~ubuntu13.10.1
No-change backport to saucy (LP: #1341962)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 13c80a6deadcd78e62c66bd8e178ead7d049bed6 Mon Sep 17 00:00:00 2001
 
2
From: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
 
3
Date: Sat, 21 Jun 2014 17:02:06 +0200
 
4
Subject: Workaround a bug in libc on Hurd
 
5
 
 
6
The send() function, when asked to send 0 characters, doesn't trigger a corresponding recv(), except on Hurd.
 
7
 
 
8
This breaks the communication between clamd and clamdscan.
 
9
 
 
10
See: https://bugs.debian.org/752237
 
11
---
 
12
 clamd/scanner.c | 3 ++-
 
13
 1 file changed, 2 insertions(+), 1 deletion(-)
 
14
 
 
15
diff --git a/clamd/scanner.c b/clamd/scanner.c
 
16
index 06e2d1d..95656e2 100644
 
17
--- a/clamd/scanner.c
 
18
+++ b/clamd/scanner.c
 
19
@@ -118,6 +118,7 @@ int scan_callback(STATBUF *sb, char *filename, const char *msg, enum cli_ftw_rea
 
20
 
 
21
     /* detect disconnected socket, 
 
22
      * this should NOT detect half-shutdown sockets (SHUT_WR) */
 
23
+#if !defined(__GNU__)
 
24
     if (send(scandata->conn->sd, &ret, 0, 0) == -1 && errno != EINTR) {
 
25
        logg("$Client disconnected while command was active!\n");
 
26
        thrmgr_group_terminate(scandata->conn->group);
 
27
@@ -125,7 +126,7 @@ int scan_callback(STATBUF *sb, char *filename, const char *msg, enum cli_ftw_rea
 
28
            free(filename);
 
29
        return CL_BREAK;
 
30
     }
 
31
-
 
32
+#endif
 
33
     if (thrmgr_group_need_terminate(scandata->conn->group)) {
 
34
        logg("^Client disconnected while scanjob was active\n");
 
35
        if (reason == visit_file)