View | Details | Raw Unified | Return to bug 84137
Collapse All | Expand All

(-)p3scan.new/Makefile Tue Jul 26 22:41:04 2005 (-3 / +3 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=      p3scan
8
PORTNAME=      p3scan
9
PORTVERSION=   1.0
9
PORTVERSION=   2.1
10
PORTREVISION=  2
10
PORTREVISION=  0
11
CATEGORIES=    mail net
11
CATEGORIES=    mail net
12
MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE}
13
MASTER_SITE_SUBDIR=    ${PORTNAME}
13
MASTER_SITE_SUBDIR=    ${PORTNAME}
Lines 38-44 Link Here
38
do-install:
38
do-install:
39
       ${INSTALL_PROGRAM} ${WRKSRC}/p3scan ${PREFIX}/sbin/
39
       ${INSTALL_PROGRAM} ${WRKSRC}/p3scan ${PREFIX}/sbin/
40
       ${INSTALL_DATA} ${WRKSRC}/p3scan.conf ${PREFIX}/etc/p3scan.conf.sample
40
       ${INSTALL_DATA} ${WRKSRC}/p3scan.conf ${PREFIX}/etc/p3scan.conf.sample
41
       ${INSTALL_DATA} ${WRKSRC}/p3scan.mail ${PREFIX}/etc/p3scan.mail.sample
41
       ${INSTALL_DATA} ${WRKSRC}/p3scan-en.mail ${PREFIX}/etc/p3scan.mail.sample
42
       ${INSTALL_SCRIPT} ${FILESDIR}/p3scan.sh ${PREFIX}/etc/rc.d/
42
       ${INSTALL_SCRIPT} ${FILESDIR}/p3scan.sh ${PREFIX}/etc/rc.d/
43
.for f in ${MAN8}
43
.for f in ${MAN8}
44
       ${INSTALL_MAN} ${WRKSRC}/${f}.gz ${MAN8PREFIX}/man/man8/
44
       ${INSTALL_MAN} ${WRKSRC}/${f}.gz ${MAN8PREFIX}/man/man8/
(-)p3scan.new/distinfo Tue Jul 26 22:41:04 2005 (-2 / +2 lines)
Lines 1-2 Link Here
1
MD5 (p3scan-1.0.tar.gz) = d5d354f85727667e781bc5e05e4ffb4d
1
MD5 (p3scan-2.1.tar.gz) = 5e261548e522f3ac2583870b6e02aecd
2
SIZE (p3scan-1.0.tar.gz) = 180274
2
SIZE (p3scan-2.1.tar.gz) = 348717
(-)p3scan.new/files/patch-Makefile Tue Jul 26 22:41:04 2005 (-20 / +29 lines)
Lines 1-25 Link Here
1
--- Makefile.orig      Wed Jan 21 11:33:02 2004
1
--- Makefile.orig      Tue Jul 26 13:25:59 2005
2
+++ Makefile   Wed Feb 18 10:43:15 2004
2
+++ Makefile   Tue Jul 26 15:00:51 2005
3
@@ -26,12 +26,12 @@
3
@@ -34,20 +34,20 @@
4
 # along with this program; if not, write to the Free Software
4
 LOGFAC="LOG_DAEMON"
5
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
5
 LOGSET=-DLOGOPT=${LOGOPT} -DLOGFAC=${LOGFAC}
6
 
6
 LANG=en
7
-PREFIX=/usr
8
-MANDIR=$(PREFIX)/man/man8
9
-CC=gcc
7
-CC=gcc
10
-#CFLAGS=-Wall -ggdb
8
+CC?=gcc
11
-CFLAGS=-Wall -O2
9
 SYSINS=ginstall
10
-CFLAGS=-Wall -O2 ${LOGSET}
12
-LDFLAGS=-L. -lripmime -lpcre #-static
11
-LDFLAGS=-L. -lripmime -lpcre #-static
13
+PREFIX?=      /usr
12
+CFLAGS+=-Wall -O2 ${LOGSET} -I${PREFIX}/include -I/usr/local/include
14
+MANDIR?=      $(PREFIX)/man/man8
13
+LDFLAGS+=-L. -lripmime -lpcre ${_LDFLAGS} #-static
15
+CC?=          gcc
14
 
16
+#CFLAGS=      -Wall -ggdb
15
 PREFIX=/usr
17
+CFLAGS+=      -Wall -O2 -I${PREFIX}/include
16
 #MANDIR=$(PREFIX)/share/man/man8
18
+LDFLAGS+=     -L. -lripmime -lpcre ${_LDFLAGS}
17
-MANDIR=$(PREFIX)/man/man8
18
+MANDIR?=$(PREFIX)/man/man8
19
 piddir=/var/run/$(PROGS)
20
 datadir=/var/spool/$(PROGS)
21
 notify=/var/spool/$(PROGS)/notify
22
-user=mail.mail
23
-userdir=/etc/$(PROGS)
24
-docdir=/usr/doc/$(DISTNAME)
25
+user=mail:mail
26
+userdir=/usr/local/etc/$(PROGS)
27
+docdir=/usr/local/doc/$(DISTNAME)
28
 # End user options
19
 
29
 
20
 OBJECTS=getline.o parsefile.o p3scan.o \
30
 OBJECTS=getline.o parsefile.o p3scan.o \
21
       scanner_basic.o scanner_avpd.o scanner_trophie.o
31
@@ -71,8 +71,8 @@
22
@@ -62,8 +62,8 @@
23
 
32
 
24
 dep depend .dep:
33
 dep depend .dep:
25
       @echo "creating depencies"
34
       @echo "creating depencies"
Lines 28-36 Link Here
28
+      rm -f .tmp.dep
37
+      rm -f .tmp.dep
29
+      @find . -name "*.c"   -maxdepth 1 -print0 | xargs -n 1 -0t $(CC) -M $(CFLAGS)  >>.tmp.dep
38
+      @find . -name "*.c"   -maxdepth 1 -print0 | xargs -n 1 -0t $(CC) -M $(CFLAGS)  >>.tmp.dep
30
       mv .tmp.dep .dep
39
       mv .tmp.dep .dep
31
           
40
 
32
 install: p3scan
41
 install: p3scan
33
@@ -143,9 +143,9 @@
42
@@ -148,9 +148,9 @@
34
 
43
 
35
 fulltags:
44
 fulltags:
36
       @#VIM Users know why! *g*
45
       @#VIM Users know why! *g*
(-)p3scan.new/files/patch-getline.c Tue Jul 26 22:41:04 2005 (-4 / +8 lines)
Lines 1-11 Link Here
1
--- getline.c.orig     Tue Feb 17 21:58:12 2004
1
--- getline.c.orig     Tue Jul 26 13:29:05 2005
2
+++ getline.c  Tue Feb 17 21:58:17 2004
2
+++ getline.c  Tue Jul 26 11:10:51 2005
3
@@ -30,7 +30,7 @@
3
@@ -33,11 +33,11 @@
4
 #include <stdio.h>
4
 #include <stdio.h>
5
 #include <unistd.h>
5
 #include <unistd.h>
6
 #include <string.h>
6
 #include <string.h>
7
-#include <malloc.h>
7
-#include <malloc.h>
8
+#include <stdlib.h>
9
 #include <stdarg.h>
8
 #include <stdarg.h>
10
 #include <fcntl.h>
9
 #include <fcntl.h>
11
 #include <sys/time.h>
10
 #include <sys/time.h>
11
 #include <errno.h>
12
+#include <stdlib.h>
13
 
14
 #include "getline.h"
15
 
(-)p3scan.new/files/patch-p3scan.c Tue Jul 26 22:41:04 2005 (-51 / +57 lines)
Lines 1-9 Link Here
1
--- p3scan.c.orig      Wed Jan 21 01:26:48 2004
1
--- p3scan.c.orig      Tue Jul 26 15:39:29 2005
2
+++ p3scan.c   Wed Feb 18 13:32:33 2004
2
+++ p3scan.c   Tue Jul 26 15:38:58 2005
3
@@ -30,34 +30,39 @@
3
@@ -36,36 +36,37 @@
4
  *
4
 TODO: Wanted: white-list support
5
  */
5
 TODO: Wanted: no iptables support
6
 
6
 */
7
-#include <stdio.h>
7
-#include <stdio.h>
8
-#include <stdlib.h>
8
-#include <stdlib.h>
9
-#include <string.h>
9
-#include <string.h>
Lines 43-59 Link Here
43
 #include <libgen.h>
43
 #include <libgen.h>
44
 #include <errno.h>
44
 #include <errno.h>
45
 #include <dirent.h>
45
 #include <dirent.h>
46
+#ifdef __FreeBSD__
46
-#include <sys/statvfs.h>
47
 #include <assert.h>
48
 #include <sys/select.h>
47
+#include <sys/ucred.h>
49
+#include <sys/ucred.h>
48
+#include <sys/mount.h>
50
+#include <sys/mount.h>
49
+#else
51
+
50
+#include <linux/netfilter_ipv4.h>
51
 #include <sys/statvfs.h>
52
+#endif
53
 
52
 
54
 #include "p3scan.h"
53
 #include "p3scan.h"
55
 #include "getline.h"
54
 #include "getline.h"
56
@@ -81,8 +86,8 @@
55
@@ -94,13 +95,13 @@
57
 #define VIRUS_SCANNER_VIRUSCODE  1
56
 #define VIRUS_SCANNER_VIRUSCODE  1
58
 #define PID_FILE                 "/var/run/p3scan/p3scan.pid"
57
 #define PID_FILE                 "/var/run/p3scan/p3scan.pid"
59
 #define SYSLOG_NAME              "p3scan"
58
 #define SYSLOG_NAME              "p3scan"
Lines 63-80 Link Here
63
+#define VIRUS_TEMPLATE           "/usr/local/etc/p3scan/p3scan.mail"
62
+#define VIRUS_TEMPLATE           "/usr/local/etc/p3scan/p3scan.mail"
64
 #define DEBUG                    0
63
 #define DEBUG                    0
65
 #define QUIET                    0
64
 #define QUIET                    0
66
 #define OVERWRITE                0
65
 #define OVERWRITE                NULL
67
@@ -340,11 +345,24 @@
66
 #define CHECKSPAM                0
68
 #define MOVEIT "/bin/mv"
67
-#define SPAMCHECK                "/usr/bin/spamc"
68
+#define SPAMCHECK                "/usr/local/bin/spamc"
69
 #define MINSPACE                 0
70
 #define DELIT                    0
71
 #define NEWLINE                  '\n'
72
@@ -507,10 +508,21 @@
69
    FILE * scanner;
73
    FILE * scanner;
70
    static char  line[4096*16];
74
    static char  line[4096*16];
75
    //static char  line[4096];
71
-   struct statvfs fs;
76
-   struct statvfs fs;
72
    int kbfree;
77
    unsigned long kbfree;
73
    struct linebuf *filebuf;
78
    int htmlfd;
74
    int res, htmlfd, html, toggle;
75
 
79
 
76
+#ifdef __FreeBSD__
80
+   struct statfs fs;
77
+    struct statfs fs;
78
+    if ((ret=statfs(config->virusdir,&fs))!=0) {
81
+    if ((ret=statfs(config->virusdir,&fs))!=0) {
79
+      do_log(LOG_EMERG, "Unable to get available space!");
82
+      do_log(LOG_EMERG, "Unable to get available space!");
80
+      return SCANNER_RET_CRIT; // Should never reach here, but keep it clean. :)
83
+      return SCANNER_RET_CRIT; // Should never reach here, but keep it clean. :)
Lines 84-115 Link Here
84
+      do_log(LOG_CRIT, "Not enough space! Available space: %d", kbfree);
87
+      do_log(LOG_CRIT, "Not enough space! Available space: %d", kbfree);
85
+      return SCANNER_RET_CRIT;
88
+      return SCANNER_RET_CRIT;
86
+    }
89
+    }
87
+#else
88
+   struct statvfs fs;
89
+
90
+
90
   /* See if we have enough room to process the message based upon
91
+
91
    what the user determines is enough room in p3scan.conf */
92
    ret=checktimeout(p);
92
    if ( statvfs( config->virusdir, &fs ) == SCANNER_RET_ERR){
93
    if (ret < 0) return SCANNER_RET_CRIT;
93
@@ -356,6 +374,7 @@
94
    /* See if we have enough room to process the message based upon
94
       do_log(LOG_CRIT, "Not enough space! Available space: %d", kbfree);
95
@@ -521,7 +533,7 @@
95
       return SCANNER_RET_CRIT;
96
       do_log(LOG_EMERG, "Unable to get available space!");
97
       return SCANNER_RET_CRIT; // Should never reach here, but keep it clean. :)
96
    }
98
    }
97
+#endif
99
-   kbfree=(fs.f_bavail * fs.f_frsize / 1024);
98
 
100
+   kbfree=(fs.f_bavail * fs.f_bsize / 1024);
99
    /* This is where we should scan for spam - before demime to
101
    if ( config->freespace != 0 && kbfree < config->freespace ){
100
       give SpamAssassin the virgin message */
102
       p->errmsg=1;
101
@@ -820,8 +839,8 @@
103
       do_log(LOG_CRIT, "Not enough space! Available space: %d", kbfree);
102
    do_log(LOG_NOTICE, "Connection from %s:%i", inet_ntoa(p->client_addr.sin_addr), ntohs(p->client_addr.sin_port));
104
@@ -1179,8 +1191,10 @@
103
 
105
 
104
    p->server_addr.sin_family = AF_INET;
106
    p->server_addr.sin_family = AF_INET;
105
-   if (getsockopt(p->client_fd, SOL_IP, SO_ORIGINAL_DST, &p->server_addr, &p->socksize)){
107
    if (htonl(INADDR_ANY) == config->targetaddr.sin_addr.s_addr) {
106
-      do_log(LOG_CRIT, "No IP-Conntrack-data (getsockopt failed)");
108
-      if (getsockopt(p->client_fd, SOL_IP, SO_ORIGINAL_DST, &p->server_addr, &p->socksize)){
109
-         do_log(LOG_CRIT, "No IP-Conntrack-data (getsockopt failed)");
110
+//      if (getsockopt(p->client_fd, SOL_IP, SO_ORIGINAL_DST, &p->server_addr, &p->socksize)){
111
+//         do_log(LOG_CRIT, "No IP-Conntrack-data (getsockopt failed)");
107
+   if (getsockname(p->client_fd, (struct sockaddr*)&p->server_addr, &p->socksize)){
112
+   if (getsockname(p->client_fd, (struct sockaddr*)&p->server_addr, &p->socksize)){
108
+      do_log(LOG_CRIT, "No IP-Conntrack-data (getsockname failed)");
113
+      do_log(LOG_CRIT, "No IP-Conntrack-data (getsockname failed)");
109
       return 1;
114
          return 1;
110
    }
115
       }
111
    do_log(LOG_NOTICE, "Real-server adress is %s:%i", inet_ntoa(p->server_addr.sin_addr), ntohs(p->server_addr.sin_port));
116
       /* try to avoid loop */
112
@@ -1534,7 +1553,7 @@
117
@@ -2041,7 +2055,7 @@
113
    char * responsemsg;
118
    char * responsemsg;
114
    int virusdirlen;
119
    int virusdirlen;
115
    char chownit[100];
120
    char chownit[100];
Lines 118-131 Link Here
118
    int len;
123
    int len;
119
    int ret;
124
    int ret;
120
    FILE * chowncmd;
125
    FILE * chowncmd;
121
@@ -1574,8 +1593,8 @@
126
@@ -2080,7 +2094,10 @@
122
       };
127
       if (!config->debug){
123
       // chown /var/run/p3scan/p3scan.pid mail.mail
128
          len=strlen(CHOWNCMD)+1+strlen(config->runasuser)+1+strlen(config->runasuser)+1+strlen(config->pidfile)+1;
124
       len=strlen(CHOWNCMD)+1+strlen(config->runasuser)+1+strlen(config->runasuser)+1+strlen(config->pidfile)+1;
129
          //do_log(LOG_DEBUG, "%s %s.%s %s=%i",CHOWNCMD, config->runasuser, config->runasuser, config->pidfile, len);
125
-      do_log(LOG_DEBUG, "%s %s.%s %s=%i",CHOWNCMD, config->runasuser, config->runasuser, config->pidfile, len);
130
-         snprintf(chownit, len, "%s %s.%s %s", CHOWNCMD, config->runasuser, config->runasuser, config->pidfile);
126
-      snprintf(chownit, len, "%s %s.%s %s", CHOWNCMD, config->runasuser, config->runasuser, config->pidfile);
131
+//         snprintf(chownit, len, "%s %s.%s %s", CHOWNCMD, config->runasuser, config->runasuser, config->pidfile);
127
+      do_log(LOG_DEBUG, "%s %s:%s %s=%i",CHOWNCMD, config->runasuser, config->runasuser, config->pidfile, len);
132
+         do_log(LOG_DEBUG, "%s %s:%s %s=%i",CHOWNCMD, config->runasuser, config->runasuser, config->pidfile, len);
128
+      snprintf(chownit, len, "%s %s:%s %s", CHOWNCMD, config->runasuser, config->runasuser, config->pidfile);
133
+         snprintf(chownit, len, "%s %s:%s %s", CHOWNCMD, config->runasuser, config->runasuser, config->pidfile);
129
       if ((chowncmd=popen(chownit, "r"))==NULL){
134
+
130
          do_log(LOG_ALERT, "Can't '%s' !!!", chowncmd);
135
          if ((chowncmd=popen(chownit, "r"))==NULL){
131
          return SCANNER_RET_ERR;
136
             do_log(LOG_ALERT, "Can't '%s' !!!", chowncmd);
137
             return SCANNER_RET_ERR;
(-)p3scan.new/files/patch-parsefile.c Tue Jul 26 22:41:04 2005 (-3 / +9 lines)
Lines 1-10 Link Here
1
--- parsefile.c.orig   Tue Feb 17 21:58:27 2004
1
--- parsefile.c.orig Wed Jan  5 20:53:04 2005
2
+++ parsefile.c        Tue Feb 17 21:59:39 2004
2
+++ parsefile.c      Tue Jul 26 11:10:08 2005
3
@@ -33,7 +33,6 @@
3
@@ -33,11 +33,12 @@
4
 #include <stdio.h>
4
 #include <stdio.h>
5
 #include <stdlib.h>
5
 #include <stdlib.h>
6
 #include <fcntl.h>
6
 #include <fcntl.h>
7
-#include <malloc.h>
7
-#include <malloc.h>
8
+#include <stdlib.h>
8
 #include <string.h>
9
 #include <string.h>
9
 #include <sys/stat.h>
10
 #include <sys/stat.h>
10
 #include "parsefile.h"
11
 #include "parsefile.h"
12
 #include "getline.h"
13
+#include <netinet/in.h>
14
15
 #define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
16
(-)p3scan.new/files/patch-ripmime::build_ripOLE Tue Jul 26 22:41:04 2005 (-2 / +2 lines)
Lines 1-5 Link Here
1
--- ripmime/build_ripOLE.orig  Wed Jul 16 21:18:54 2003
1
--- ripmime/build_ripOLE.orig  Wed Jan  5 20:53:04 2005
2
+++ ripmime/build_ripOLE       Wed Feb 18 10:31:19 2004
2
+++ ripmime/build_ripOLE       Tue Jul 26 12:48:42 2005
3
@@ -1,4 +1,4 @@
3
@@ -1,4 +1,4 @@
4
 #!/bin/sh
4
 #!/bin/sh
5
 cd ripOLE
5
 cd ripOLE
(-)p3scan.new/files/patch-ripmime::build_tnef Tue Jul 26 22:41:04 2005 (-2 / +2 lines)
Lines 1-5 Link Here
1
--- ripmime/build_tnef.orig    Sat Nov 15 20:39:05 2003
1
--- ripmime/build_tnef.orig    Wed Jan  5 20:53:04 2005
2
+++ ripmime/build_tnef Wed Feb 18 10:31:43 2004
2
+++ ripmime/build_tnef Tue Jul 26 12:48:14 2005
3
@@ -1,3 +1,3 @@
3
@@ -1,3 +1,3 @@
4
 #!/bin/sh
4
 #!/bin/sh
5
 cd tnef
5
 cd tnef
(-)p3scan.new/files/patch-ripmime::tnef::Makefile Tue Jul 26 22:41:04 2005 (-12 / +6 lines)
Lines 1-19 Link Here
1
--- ripmime/tnef/Makefile.orig Sat Nov 15 20:39:06 2003
1
--- ripmime/tnef/Makefile.orig Tue Jul 26 14:31:25 2005
2
+++ ripmime/tnef/Makefile      Wed Feb 18 11:03:29 2004
2
+++ ripmime/tnef/Makefile      Tue Jul 26 14:32:30 2005
3
@@ -1,13 +1,13 @@
3
@@ -4,8 +4,8 @@
4
 
5
-CC=cc
6
+CC?=cc
7
 
8
 # Possible platforms are SUN, HPUX, DEC, SGI, AIX, Linux and MSDOS
9
 # The main definitions are for 32/16 bits and for byte order, the 
4
 # The main definitions are for 32/16 bits and for byte order, the 
10
 # default is big endian.  You can do -D__TNEF_BYTE_ORDER 1234 for little
5
 # default is big endian.  You can do -D__TNEF_BYTE_ORDER 1234 for little
11
 # endian
6
 # endian
12
-PLATFORM=-D___TNEF_BYTE_ORDER=4321 
7
-PLATFORM=-D___TNEF_BYTE_ORDER=4321 
8
-CFLAGS=-Wall -g -O2 -I.
13
+PLATFORM=-D___TNEF_BYTE_ORDER=_BYTE_ORDER -include /usr/include/machine/endian.h 
9
+PLATFORM=-D___TNEF_BYTE_ORDER=_BYTE_ORDER -include /usr/include/machine/endian.h 
14
 #CFLAGS = -O2 -ggdb
10
+CFLAGS+=-Wall -g -O2 -I.
15
-CFLAGS = -Wall -g -I..
16
+CFLAGS += -Wall -g -I..
17
 
18
 
11
 
19
 default: config.h tnef.h tnef.c
12
 default: config.h tnef.h tnef.c
13
       $(CC) $(CFLAGS) $(PLATFORM) -c tnef.c
(-)p3scan.new/files/patch-scanner_avpd.c Tue Jul 26 22:41:04 2005 (-13 / +3 lines)
Lines 1-5 Link Here
1
--- scanner_avpd.c.orig        Thu Dec  4 02:58:25 2003
1
--- scanner_avpd.c.orig      Wed Jan  5 20:53:04 2005
2
+++ scanner_avpd.c     Wed Feb 18 12:50:42 2004
2
+++ scanner_avpd.c   Tue Jul 26 12:44:34 2005
3
@@ -39,12 +39,12 @@
3
@@ -39,12 +39,12 @@
4
 #include <time.h>
4
 #include <time.h>
5
 #include <sys/time.h>
5
 #include <sys/time.h>
Lines 11-25 Link Here
11
 #include <dirent.h>
11
 #include <dirent.h>
12
 #include <ctype.h>
12
 #include <ctype.h>
13
+#include <netinet/in.h>
13
+#include <netinet/in.h>
14
 
14
15
 #include "p3scan.h"
15
 #include "p3scan.h"
16
 
17
@@ -81,7 +81,7 @@
18
    if (avp_fd!=-1 && connected==-1){
19
       do_log(LOG_DEBUG, "Trying to connect to socket");
20
       if (connect(avp_fd, (struct sockaddr *)(&avp_socket),
21
-      sizeof(avp_socket.sun_family) + strlen(NodeCtl)) >= 0){
22
+              SUN_LEN(&avp_socket)) >= 0){
23
          connected=1;
24
          do_log(LOG_DEBUG, "avp_socket_connect connected to kavdaemon");
25
          return 0;
(-)p3scan.new/files/patch-scanner_basic.c Thu Jan 1 03:00:00 1970 (-13 lines)
Lines 1-13 Link Here
1
--- scanner_basic.c.orig       Tue Feb 17 21:58:49 2004
2
+++ scanner_basic.c    Tue Feb 17 22:20:28 2004
3
@@ -34,8 +34,9 @@
4
 #include <string.h>
5
 #include <sys/wait.h>
6
 #include <sys/stat.h>
7
+#include <netinet/in.h>
8
 #include <errno.h>
9
-#include <malloc.h>
10
+#include <stdlib.h>
11
 #include <pcre.h>
12
 
13
 #include "p3scan.h"
(-)p3scan.new/files/patch-scanner_sample.c Tue Jul 26 22:41:04 2005 (-6 / +9 lines)
Lines 1-11 Link Here
1
--- scanner_sample.c.orig      Tue Feb 17 21:58:55 2004
1
--- scanner_sample.c.orig    Wed Jan  5 20:53:04 2005
2
+++ scanner_sample.c   Tue Feb 17 21:59:01 2004
2
+++ scanner_sample.c Tue Jul 26 11:11:27 2005
3
@@ -31,7 +31,7 @@
3
@@ -31,10 +31,9 @@
4
  */
4
  */
5
 
5
6
 #include <stdio.h>
6
 #include <stdio.h>
7
-#include <malloc.h>
7
-#include <malloc.h>
8
+#include <stdlib.h>
9
 #include <sys/un.h>
8
 #include <sys/un.h>
10
 #include <sys/socket.h>
9
 #include <sys/socket.h>
11
 
10
-
11
+#include <stdlib.h>
12
13
 /* we need p3scan.h */
14
 #include "p3scan.h"
(-)p3scan.new/files/patch-scanner_trophie.c Tue Jul 26 22:41:04 2005 (-13 / +3 lines)
Lines 1-5 Link Here
1
--- scanner_trophie.c.orig     Thu Dec  4 02:57:56 2003
1
--- scanner_trophie.c.orig   Wed Jan  5 20:53:04 2005
2
+++ scanner_trophie.c  Wed Feb 18 12:51:22 2004
2
+++ scanner_trophie.c        Tue Jul 26 12:44:51 2005
3
@@ -37,11 +37,11 @@
3
@@ -37,11 +37,11 @@
4
 #include <sys/wait.h>
4
 #include <sys/wait.h>
5
 #include <sys/stat.h>
5
 #include <sys/stat.h>
Lines 10-24 Link Here
10
 #include <stdarg.h>
10
 #include <stdarg.h>
11
 #include <ctype.h>
11
 #include <ctype.h>
12
+#include <netinet/in.h>
12
+#include <netinet/in.h>
13
 
13
14
 #include "p3scan.h"
14
 #include "p3scan.h"
15
 
16
@@ -68,7 +68,7 @@
17
     if (trophie_fd!=-1 && connected==-1){
18
       do_log(LOG_DEBUG, "Trying to connect to socket");
19
       if (connect(trophie_fd, (struct sockaddr *)(&trophie_socket),
20
-         sizeof(trophie_socket.sun_family) + strlen(config->virusscanner)) >= 0){
21
+         SUN_LEN(&trophie_socket)) >= 0){
22
          connected=1;
23
          do_log(LOG_DEBUG, "trophie_socket_connect connected");
24
          return 0;
(-)p3scan.new/pkg-message Tue Jul 26 22:41:04 2005 (+4 lines)
Lines 16-19 Link Here
16
while 192.168.0.254 is the IP of your internal interface, 8110 is the
16
while 192.168.0.254 is the IP of your internal interface, 8110 is the
17
default port of P3scan, and 192.168.0.0/24 is the IP range of your LAN.
17
default port of P3scan, and 192.168.0.0/24 is the IP range of your LAN.
18
18
19
20
Don't forget  chown -R <clamavuser> /var/run/p3scan /var/spool/p3scan
21
<clamavuser> must be same as in running clamd.
22
19
**********************************************************************
23
**********************************************************************

Return to bug 84137