Browse code

update

git-svn: trunk@592

Tomasz Kojm authored on 2004/06/03 05:17:00
Showing 5 changed files
... ...
@@ -1,3 +1,11 @@
1
+Wed Jun  2 22:12:08 CEST 2004 (tk)
2
+----------------------------------
3
+  * freshclam: + allow spaces in HTTPProxyUsername (requested by SL
4
+	         <milter*free.fr>)
5
+	       + ignore freshclam.conf permissions under Cygwin (Alch
6
+	         <alch*users.sourceforge.net>)
7
+  * libclamav: detect more mail file types
8
+
1 9
 Wed Jun  2 14:15:54 BST 2004 (trog)
2 10
 -----------------------------------
3 11
   * libclamav/vba_extract.c: Fix possible crash
... ...
@@ -67,7 +67,7 @@ int scanmanager(const struct optstruct *opt)
67 67
 	struct cl_limits *limits = NULL;
68 68
 	struct passwd *user = NULL;
69 69
 	struct stat sb;
70
-	char *fullpath = NULL, cwd[200];
70
+	char *fullpath = NULL, cwd[1024];
71 71
 	struct cfgstruct *copt, *cpt;
72 72
 	struct cl_cvd *d1, *d2;
73 73
 	const char *dbdir;
... ...
@@ -204,7 +204,7 @@ int scanmanager(const struct optstruct *opt)
204 204
     if(opt->filename == NULL || strlen(opt->filename) == 0) {
205 205
 
206 206
 	/* we need full path for some reasons (eg. archive handling) */
207
-	if(!getcwd(cwd, 200)) {
207
+	if(!getcwd(cwd, sizeof(cwd))) {
208 208
 	    mprintf("@Can't get absolute pathname of current working directory.\n");
209 209
 	    ret = 57;
210 210
 	} else
... ...
@@ -287,7 +287,7 @@ int scanmanager(const struct optstruct *opt)
287 287
 
288 288
 		if(compression && (thefilename[0] != '/')) {
289 289
 		    /* we need to complete the path */
290
-		    if(!getcwd(cwd, 200)) {
290
+		    if(!getcwd(cwd, sizeof(cwd))) {
291 291
 			mprintf("@Can't get absolute pathname of current working directory.\n");
292 292
 			return 57;
293 293
 		    } else {
... ...
@@ -128,11 +128,12 @@ int freshclam(struct optstruct *opt)
128 128
 	    mprintf("@Can't stat %s (critical error)\n");
129 129
 	    return 56;
130 130
 	}
131
-
131
+#ifndef C_CYGWIN
132 132
 	if(statbuf.st_mode & (S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH)) {
133 133
 	    mprintf("@Insecure permissions (for HTTPProxyPassword): %s must have no more than 0700 permissions.\n", cfgfile);
134 134
 	    return 56;
135 135
 	}
136
+#endif
136 137
     }
137 138
 
138 139
 #ifndef C_CYGWIN
... ...
@@ -98,6 +98,7 @@ static const struct cli_magic_s cli_magic[] = {
98 98
     {0,  "X-UIDL: ",			 8, "Mail",		  CL_MAILFILE},
99 99
     {0,  "X-Apparently-To: ",		17, "Mail",		  CL_MAILFILE},
100 100
     {0,  "X-Envelope-From: ",		17, "Mail",		  CL_MAILFILE},
101
+    {0,  "X-Original-To: ",		15, "Mail",		  CL_MAILFILE},
101 102
     {0,  "X-Symantec-",			11, "Symantec",		  CL_MAILFILE},
102 103
     {0,  "X-EVS",			 5, "EVS mail",		  CL_MAILFILE},
103 104
     {0,  ">From ",			 6, "Mail",		  CL_MAILFILE},
... ...
@@ -109,7 +109,7 @@ struct cfgstruct *parsecfg(const char *cfgfile)
109 109
 	    {"MaxAttempts", OPT_NUM}, /* freshclam */
110 110
 	    {"HTTPProxyServer", OPT_STR}, /* freshclam */
111 111
 	    {"HTTPProxyPort", OPT_NUM}, /* freshclam */
112
-	    {"HTTPProxyUsername", OPT_STR}, /* freshclam */
112
+	    {"HTTPProxyUsername", OPT_FULLSTR}, /* freshclam */
113 113
 	    {"HTTPProxyPassword", OPT_STR}, /* freshclam */
114 114
 	    {"NotifyClamd", OPT_OPTARG}, /* freshclam */
115 115
 	    {"OnUpdateExecute", OPT_FULLSTR}, /* freshclam */