git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@2460 77e5149b-7576-45b1-b177-96237e5ba77b
| ... | ... |
@@ -1,3 +1,7 @@ |
| 1 |
+Sun Oct 29 19:22:00 CET 2006 (tk) |
|
| 2 |
+--------------------------------- |
|
| 3 |
+ * clamd/session.c: VERSION now prints details for daily.inc (closes bug#107) |
|
| 4 |
+ |
|
| 1 | 5 |
Sun Oct 29 16:33:01 CET 2006 (tk) |
| 2 | 6 |
--------------------------------- |
| 3 | 7 |
* shared/cdiff.c: make cdiff_apply() compatible with old zlib versions |
| ... | ... |
@@ -278,13 +278,17 @@ int command(int desc, const struct cl_node *root, const struct cl_limits *limits |
| 278 | 278 |
const char *dbdir = cfgopt(copt, "DatabaseDirectory")->strarg; |
| 279 | 279 |
char *path; |
| 280 | 280 |
struct cl_cvd *daily; |
| 281 |
+ struct stat foo; |
|
| 281 | 282 |
|
| 282 |
- if(!(path = mmalloc(strlen(dbdir) + 11))) {
|
|
| 283 |
+ |
|
| 284 |
+ if(!(path = mmalloc(strlen(dbdir) + 30))) {
|
|
| 283 | 285 |
mdprintf(desc, "Memory allocation error - SHUTDOWN forced\n"); |
| 284 | 286 |
return COMMAND_SHUTDOWN; |
| 285 | 287 |
} |
| 286 | 288 |
|
| 287 | 289 |
sprintf(path, "%s/daily.cvd", dbdir); |
| 290 |
+ if(stat(path, &foo) == -1) |
|
| 291 |
+ sprintf(path, "%s/daily.inc/daily.info", dbdir); |
|
| 288 | 292 |
|
| 289 | 293 |
if((daily = cl_cvdhead(path))) {
|
| 290 | 294 |
time_t t = (time_t) daily->stime; |