jbenden / mod_clamav

Mod_Clamav for ProFTPd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check file downloads

opened this issue · comments

Thanks for the great mod, it is simple and really works perfect.
I would like to discuss a feature request: Would it be possible to optionally scan files on download request? Sometimes files are provided from many different sources which could be compromised. So doing a virus scan before download can make a lot of sense.

I got compilation error below;

gcc -DHAVE_CONFIG_H -DLINUX -I.. -I../include -O2 -Wall -c mod_clamav.c
mod_clamav.c:5:1: error: expected identifier or ‘(’ before ‘<’ token

^
mod_clamav.c:8:19: warning: character constant too long for its type [enabled by default]

^
mod_clamav.c:14:5: error: stray ‘\302’ in program
<title>mod_clamav/mod_clamav.c at master · jbenden/mod_clamav · GitHub</title>
^
mod_clamav.c:14:5: error: stray ‘\267’ in program
mod_clamav.c:14:5: error: stray ‘\302’ in program
mod_clamav.c:14:5: error: stray ‘\267’ in program
mod_clamav.c:101:32: warning: missing terminating ' character [enabled by default]


^
mod_clamav.c:101:7: error: missing terminating ' character

^
mod_clamav.c:251:46: error: invalid suffix "b2a45ae7f5a4f732d459de156458367" on integer constant

                                          ^

mod_clamav.c:318:19: error: invalid suffix "rc1" on floating constant
v0.14rc1
^
mod_clamav.c:338:19: error: invalid suffix "rc3" on floating constant
v0.13rc3
^
mod_clamav.c:348:19: error: invalid suffix "rc2" on floating constant
v0.13rc2
^
mod_clamav.c:368:19: error: invalid suffix "rc1" on floating constant
v0.12rc1
^
mod_clamav.c:378:19: error: invalid suffix "rc1" on floating constant
v0.11rc1
^
mod_clamav.c:468:11: error: invalid suffix "fa9" on integer constant
8212fa9
^
mod_clamav.c:475:171: error: invalid suffix "rc1." on floating constant
Mark as version 0.14rc1.
^
mod_clamav.c:659:70: error: stray ‘#’ in program
#include "conf.h"
^
mod_clamav.c:659:151: error: expected identifier or ‘(’ before ‘<’ token
#include "conf.h"
^
mod_clamav.c:659:191: error: expected identifier or ‘(’ before ‘<’ token
#include "conf.h"
^
mod_clamav.c:663:70: error: stray ‘#’ in program
#include "privs.h"
^
mod_clamav.c:663:151: error: expected identifier or ‘(’ before ‘<’ token
#include "privs.h"
^
mod_clamav.c:663:192: error: expected identifier or ‘(’ before ‘<’ token
#include "privs.h"
^
mod_clamav.c:667:70: error: stray ‘#’ in program
#include <libgen.h>
^
mod_clamav.c:667:149: error: expected identifier or ‘(’ before ‘<’ token
#include <libgen.h>
^
mod_clamav.c:667:189: error: expected identifier or ‘(’ before ‘<’ token
#include <libgen.h>
^
mod_clamav.c:671:70: error: stray ‘#’ in program
#include <sys/types.h>
^
mod_clamav.c:671:149: error: expected identifier or ‘(’ before ‘<’ token
#include <sys/types.h>
^
mod_clamav.c:671:192: error: expected identifier or ‘(’ before ‘<’ token
#include <sys/types.h>
^
mod_clamav.c:675:70: error: stray ‘#’ in program
#include "mod_clamav.h"
^
mod_clamav.c:675:151: error: expected identifier or ‘(’ before ‘<’ token
#include "mod_clamav.h"
^
mod_clamav.c:675:197: error: expected identifier or ‘(’ before ‘<’ token
#include "mod_clamav.h"
^
mod_clamav.c:696:70: error: stray ‘#’ in program
#define MOD_CLAMAV_VERSION "mod_clamav/0.14rc1"
^
mod_clamav.c:696:196: error: expected identifier or ‘(’ before ‘<’ token
#define MOD_CLAMAV_VERSION "mod_clamav/0.14rc1"
^
mod_clamav.c:696:214: error: invalid suffix "rc1" on floating constant
#define MOD_CLAMAV_VERSION "mod_clamav/0.14rc1"
^
mod_clamav.c:696:248: error: expected identifier or ‘(’ before ‘<’ token
#define MOD_CLAMAV_VERSION "mod_clamav/0.14rc1"
^
mod_clamav.c:700:91: error: expected identifier or ‘(’ before ‘<’ token
module clamav_module;
^
mod_clamav.c:721:218: error: expected identifier or ‘(’ before ‘<’ token
static int clamd_sockd = 0, is_remote = 0;
^
mod_clamav.c:725:180: error: expected identifier or ‘(’ before ‘<’ token
static char _clamd_host = NULL;
^
mod_clamav.c:729:175: error: expected identifier or ‘(’ before ‘<’ token
static int clamd_port = 0;
^
mod_clamav.c:733:291: error: expected identifier or ‘(’ before ‘<’ token
static unsigned long long clamd_minsize = 0, clamd_maxsize = 0;
^
mod_clamav.c:737:144: error: expected identifier or ‘(’ before ‘<’ token
static int clam_errno;
^
mod_clamav.c:741:182: error: expected identifier or ‘(’ before ‘<’ token
static int remove_on_failure = 0;
^
mod_clamav.c:745:229: error: expected identifier or ‘(’ before ‘<’ token
static const char *trace_channel = "clamav";
^
mod_clamav.c:745:269: error: expected identifier or ‘(’ before ‘<’ token
static const char *trace_channel = "clamav";
^
mod_clamav.c:745:284: error: expected identifier or ‘(’ before ‘<’ token
static const char *trace_channel = "clamav";
^
mod_clamav.c:766:296: error: expected identifier or ‘(’ before ‘<’ token
static unsigned long parse_nbytes(char *nbytes_str, char *units_str);
^
mod_clamav.c:770:368: error: expected identifier or ‘(’ before ‘<’ token
static int clamavd_result(int sockd, const char *abs_filename, const char *rel_filename);
^
mod_clamav.c:774:219: error: expected identifier or ‘(’ before ‘<’ token
static int clamavd_connect_check(int sockd);
^
mod_clamav.c:778:366: error: expected identifier or ‘(’ before ‘<’ token
static int clamavd_scan(int sockd, const char *abs_filename, const char *rel_filename);
^
mod_clamav.c:782:208: error: expected identifier or ‘(’ before ‘<’ token
static int clamavd_connect(void);
^
mod_clamav.c:853:153: error: stray ‘#’ in program
memset(buff, '\0', sizeof(buff));
^
mod_clamav.c:853:9: error: stray ‘\’ in program
memset(buff, '\0', sizeof(buff));
^
mod_clamav.c:853:216: error: stray ‘#’ in program
memset(buff, '\0', sizeof(buff));
^
mod_clamav.c:861:9: error: stray ‘\’ in program
if (strstr(buff, "FOUND\n")) {
^
mod_clamav.c:883:163: error: stray ‘#’ in program
pt = strrchr(buff, ':');
^
mod_clamav.c:883:197: error: stray ‘#’ in program
pt = strrchr(buff, ':');
^
mod_clamav.c:1044:169: error: stray ‘#’ in program
MOD_CLAMAV_VERSION ": Virus '%s' found in '%s'", pt, abs_filename);
^
mod_clamav.c:1044:203: error: stray ‘#’ in program
MOD_CLAMAV_VERSION ": Virus '%s' found in '%s'", pt, abs_filename);
^
mod_clamav.c:1044:218: error: stray ‘#’ in program
MOD_CLAMAV_VERSION ": Virus '%s' found in '%s'", pt, abs_filename);
^
mod_clamav.c:1044:252: error: stray ‘#’ in program
MOD_CLAMAV_VERSION ": Virus '%s' found in '%s'", pt, abs_filename);
^
mod_clamav.c:1048:9: error: stray ‘\’ in program
} else if (strstr(buff, "ERROR\n") != NULL ||
^
mod_clamav.c:1080:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
mod_clamav.c:1131:9: error: stray ‘\’ in program
if (write(sockd, "PING\n", 5) <= 0) {
^
mod_clamav.c:1225:237: error: stray ‘#’ in program
pr_log_debug(DEBUG4, MOD_CLAMAV_VERSION ": Clamd return unknown response to PING: '%s'", buff);
^
mod_clamav.c:1225:271: error: stray ‘#’ in program
pr_log_debug(DEBUG4, MOD_CLAMAV_VERSION ": Clamd return unknown response to PING: '%s'", buff);
^
mod_clamav.c:1266:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
mod_clamav.c:1373:9: error: stray ‘\’ in program
if (write(sockd, "nINSTREAM\n", 10) <= 0) {
^
mod_clamav.c:1414:178: error: stray ‘#’ in program
MOD_CLAMAV_VERSION ": Cannot open file '%s' errno=%d.", rel_filename, errno);
^
mod_clamav.c:1414:212: error: stray ‘#’ in program
MOD_CLAMAV_VERSION ": Cannot open file '%s' errno=%d.", rel_filename, errno);
^
mod_clamav.c:1606:9: error: stray ‘\’ in program
if (write(sockd, "\n", 1) <= 0) {
^
mod_clamav.c:1635:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
mod_clamav.c:1698:9: error: stray ‘\’ in program
sprintf(scancmd, "SCAN %s\n", abs_filename);
^
mod_clamav.c:1817:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
mod_clamav.c:1953:195: error: stray ‘#’ in program
MOD_CLAMAV_VERSION ": Connecting to remote Clamd host '%s' on port %d", clamd_host, clamd_port);
^
mod_clamav.c:1953:229: error: stray ‘#’ in program
MOD_CLAMAV_VERSION ": Connecting to remote Clamd host '%s' on port %d", clamd_host, clamd_port);
^
mod_clamav.c:1961:231: error: stray ‘#’ in program
pr_log_debug(DEBUG4, MOD_CLAMAV_VERSION ": Connecting to local Clamd socket '%s'", clamd_host);
^
mod_clamav.c:1961:265: error: stray ‘#’ in program
pr_log_debug(DEBUG4, MOD_CLAMAV_VERSION ": Connecting to local Clamd socket '%s'", clamd_host);
^
mod_clamav.c:2143:233: error: stray ‘#’ in program
pr_log_pri(PR_LOG_ERR, MOD_CLAMAV_VERSION ": error: Cannot resolve hostname '%s'", clamd_host);
^
mod_clamav.c:2143:267: error: stray ‘#’ in program
pr_log_pri(PR_LOG_ERR, MOD_CLAMAV_VERSION ": error: Cannot resolve hostname '%s'", clamd_host);
^
mod_clamav.c:2235:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
mod_clamav.c:2364:271: error: stray ‘#’ in program
pr_trace_msg(trace_channel, 9, "fsync(2) error on fd %d (path '%s'): %s",
^
mod_clamav.c:2364:305: error: stray ‘#’ in program
pr_trace_msg(trace_channel, 9, "fsync(2) error on fd %d (path '%s'): %s",
^
mod_clamav.c:2411:278: error: stray ‘#’ in program
pr_trace_msg(trace_channel, 9, "pr_fsio_fstat() error on fd %d (path '%s'): %s",
^
mod_clamav.c:2411:312: error: stray ‘#’ in program
pr_trace_msg(trace_channel, 9, "pr_fsio_fstat() error on fd %d (path '%s'): %s",
^
mod_clamav.c:2610:213: error: stray ‘#’ in program
pr_log_debug(DEBUG4, MOD_CLAMAV_VERSION ": absolute path is '%s', relative path is '%s'", abs_path, rel_path);
^
mod_clamav.c:2610:247: error: stray ‘#’ in program
pr_log_debug(DEBUG4, MOD_CLAMAV_VERSION ": absolute path is '%s', relative path is '%s'", abs_path, rel_path);
^
mod_clamav.c:2610:271: error: stray ‘#’ in program
pr_log_debug(DEBUG4, MOD_CLAMAV_VERSION ": absolute path is '%s', relative path is '%s'", abs_path, rel_path);
^
mod_clamav.c:2610:305: error: stray ‘#’ in program
pr_log_debug(DEBUG4, MOD_CLAMAV_VERSION ": absolute path is '%s', relative path is '%s'", abs_path, rel_path);
^
mod_clamav.c:2760:201: error: stray ‘#’ in program
MOD_CLAMAV_VERSION ": Going to virus scan absolute filename = '%s' with relative filename = '%s'.", abs_path, rel_path);
^
mod_clamav.c:2760:235: error: stray ‘#’ in program
MOD_CLAMAV_VERSION ": Going to virus scan absolute filename = '%s' with relative filename = '%s'.", abs_path, rel_path);
^
mod_clamav.c:2760:266: error: stray ‘#’ in program
MOD_CLAMAV_VERSION ": Going to virus scan absolute filename = '%s' with relative filename = '%s'.", abs_path, rel_path);
^
mod_clamav.c:2760:300: error: stray ‘#’ in program
MOD_CLAMAV_VERSION ": Going to virus scan absolute filename = '%s' with relative filename = '%s'.", abs_path, rel_path);
^
mod_clamav.c:2809:202: error: stray ‘#’ in program
MOD_CLAMAV_VERSION ": removing failed upload of filename = '%s' with relative filename = '%s'.", abs_path, rel_path);
^
mod_clamav.c:2809:236: error: stray ‘#’ in program
MOD_CLAMAV_VERSION ": removing failed upload of filename = '%s' with relative filename = '%s'.", abs_path, rel_path);
^
mod_clamav.c:2809:267: error: stray ‘#’ in program
MOD_CLAMAV_VERSION ": removing failed upload of filename = '%s' with relative filename = '%s'.", abs_path, rel_path);
^
mod_clamav.c:2809:301: error: stray ‘#’ in program
MOD_CLAMAV_VERSION ": removing failed upload of filename = '%s' with relative filename = '%s'.", abs_path, rel_path);
^
mod_clamav.c:2858:230: error: stray ‘#’ in program
pr_log_debug(DEBUG4, MOD_CLAMAV_VERSION ": No virus detected in filename = '%s'.", abs_path);
^
mod_clamav.c:2858:264: error: stray ‘#’ in program
pr_log_debug(DEBUG4, MOD_CLAMAV_VERSION ": No virus detected in filename = '%s'.", abs_path);
^
mod_clamav.c:2879:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
mod_clamav.c:3148:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
mod_clamav.c:3237:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
mod_clamav.c:3326:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
mod_clamav.c:3415:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
mod_clamav.c:3479:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
mod_clamav.c:3543:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
mod_clamav.c:3615:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
mod_clamav.c:3670:191: error: stray ‘#’ in program
char ulong_max[80] = {'\0'};
^
mod_clamav.c:3670:9: error: stray ‘\’ in program
char ulong_max[80] = {'\0'};
^
mod_clamav.c:3670:254: error: stray ‘#’ in program
char ulong_max[80] = {'\0'};
^
mod_clamav.c:3746:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
mod_clamav.c:3801:191: error: stray ‘#’ in program
char ulong_max[80] = {'\0'};
^
mod_clamav.c:3801:9: error: stray ‘\’ in program
char ulong_max[80] = {'\0'};
^
mod_clamav.c:3801:254: error: stray ‘#’ in program
char ulong_max[80] = {'\0'};
^
mod_clamav.c:3877:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
mod_clamav.c:3922:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
mod_clamav.c:3999:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
mod_clamav.c:4048:73: error: expected identifier or ‘(’ before ‘<’ token
};
^
mod_clamav.c:4101:73: error: expected identifier or ‘(’ before ‘<’ token
};
^
mod_clamav.c:4116:28: warning: missing terminating ' character [enabled by default]

                        ^

mod_clamav.c:4116:3: error: missing terminating ' character

^
mod_clamav.c:4147:18: error: expected identifier or ‘(’ before numeric constant

  • © 2016 GitHub, Inc.

  • ^
    make[1]: *_* [mod_clamav.o] Error 1
    make[1]: Leaving directory `/usr/local/directadmin/custombuild/proftpd-1.3.5a/modules'
    make: *** [modules] Error 2

    It appears you may be trying to compile HTML; instead of the raw source code.

    Closing as no response as been received.