freshclam -c fix

git-svn: trunk@191
remotes/push_mirror/metadata
Tomasz Kojm 22 years ago
parent e44b9ae92c
commit 938504c708
  1. 5
      clamav-devel/ChangeLog
  2. 6
      clamav-devel/freshclam/freshclam.c
  3. 8
      clamav-devel/freshclam/manager.c
  4. 2
      clamav-devel/freshclam/options.c

@ -1,3 +1,8 @@
Fri Jan 16 07:39:55 CET 2004 (tk)
---------------------------------
* freshclam: removed -c for --config-file (conflicted with -c for --checks).
Problem reported by Richard Stevenson <richard*endace.com>.
Thu Jan 15 15:31:13 CET 2004 (tk)
---------------------------------
* clamd: "ThreadTimeout 0" now properly disables the limit (thanks to

@ -284,7 +284,7 @@ void help(void)
mprintf("\n");
mprintf(" Clam AntiVirus: freshclam "VERSION"\n");
mprintf(" (c) 2002, 2003 Tomasz Kojm <tkojm@clamav.net>\n\n");
mprintf(" (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net>\n\n");
mprintf(" --help -h show help\n");
mprintf(" --version -V print version number and exit\n");
@ -294,12 +294,12 @@ void help(void)
mprintf(" --stdout write to stdout instead of stderr\n");
mprintf(" (this help is always written to stdout)\n");
mprintf("\n");
mprintf(" --config-file=FILE -c FILE Read configuration from FILE.\n");
mprintf(" --config-file=FILE Read configuration from FILE.\n");
mprintf(" --log=FILE -l FILE log into FILE\n");
mprintf(" --log-verbose log additional information\n");
mprintf(" --daemon -d run in daemon mode\n");
mprintf(" --user=USER -u USER run as USER\n");
mprintf(" --checks=#n -c #n #n checks by day, 1 <= n <= 50\n");
mprintf(" --checks=#n -c #n number of checks per day, 1 <= n <= 50\n");
mprintf(" --datadir=DIRECTORY download new databases into DIRECTORY\n");
#ifdef BUILD_CLAMD
mprintf(" --daemon-notify[=/path/clamav.conf] send RELOAD command to clamd\n");

@ -262,7 +262,7 @@ int wwwconnect(const char *server, const char *proxy, int pport, char *ip)
int socketfd, port;
struct sockaddr_in name;
struct hostent *host;
char *portpt, *proxycpy = NULL, ipaddr[16];
char ipaddr[16];
unsigned char *ia;
const char *hostpt;
@ -330,7 +330,7 @@ int wwwconnect(const char *server, const char *proxy, int pport, char *ip)
/* TODO: use a HEAD instruction to see if the file has been changed */
struct cl_cvd *remote_cvdhead(const char *file, int socketfd, const char *hostname, const char *proxy, const char *user, const char *pass)
{
char cmd[512], head[513], buffer[FILEBUFF], *ch, *tmp, *userpass;
char cmd[512], head[513], buffer[FILEBUFF], *ch, *tmp;
int i, j, bread, cnt;
char *remotename = NULL, *authorization = NULL;
struct cl_cvd *cvd;
@ -504,7 +504,9 @@ int get_database(const char *dbfile, int socketfd, const char *file, const char
write(fd, buffer, bread);
mprintf("Downloading %s [%c]\r", dbfile, rotation[rot]);
fflush(stdout);
rot = ++rot % 4;
/* rot = ++rot % 4; -> operation on `rot' may be undefined (why ?) */
rot %= 4;
rot++;
}
mprintf("Downloading %s [*]\n", dbfile);

@ -48,7 +48,7 @@ int main(int argc, char **argv)
{"stdout", 0, 0, 0},
{"daemon", 0, 0, 'd'},
{"user", 1, 0, 'u'}, /* not used */
{"config-file", 1, 0, 'c'},
{"config-file", 1, 0, 0},
{"checks", 1, 0, 'c'},
{"http-proxy", 1, 0, 0},
{"proxy-user", 1, 0, 0},

Loading…
Cancel
Save