Ok

and paste it, maybe I forgot attach it or maybe the list server removed it.

j

------------------------------ start here 
-------------------------------------
--- session.c.orig 2005-09-02 11:07:59.000000000 +0200
+++ session.c 2005-09-02 10:52:58.000000000 +0200
@@ -108,33 +108,42 @@

} else if(!strncmp(buff, CMD7, strlen(CMD7))) { /* VERSION */
const char *dbdir;
- char *path;
+ char *dpath, *mpath;
struct cl_cvd *daily;
+ struct cl_cvd *main;

if((cpt = cfgopt(copt, "DatabaseDirectory")) || (cpt = cfgopt(copt, 
"DataDirectory")))
dbdir = cpt->strarg;
else
dbdir = cl_retdbdir();

- if(!(path = mmalloc(strlen(dbdir) + 11))) {
+ if(!(dpath = mmalloc(strlen(dbdir) + 11))) {
mdprintf(desc, "Memory allocation error - SHUTDOWN forced\n");
return COMMAND_SHUTDOWN;
}

- sprintf(path, "%s/daily.cvd", dbdir);
+ if(!(mpath = mmalloc(strlen(dbdir) + 10))) {
+ mdprintf(desc, "Memory allocation error - SHUTDOWN forced\n");
+ return COMMAND_SHUTDOWN;
+ }
+
+ sprintf(dpath, "%s/daily.cvd", dbdir);
+ sprintf(mpath, "%s/main.cvd", dbdir);

- if((daily = cl_cvdhead(path))) {
+ if((daily = cl_cvdhead(dpath)) && (main = cl_cvdhead(mpath))) {
time_t t = (time_t) daily->stime;

pthread_mutex_lock(&ctime_mutex);
- mdprintf(desc, "ClamAV "VERSION"/%d/%s", daily->version, ctime(&t));
+ mdprintf(desc, "ClamAV "VERSION"/%d/%d/%s", main->version, daily->version, 
ctime(&t));
pthread_mutex_unlock(&ctime_mutex);
cl_cvdfree(daily);
+ cl_cvdfree(main);
} else {
mdprintf(desc, "ClamAV "VERSION"\n");
}

- free(path);
+ free(dpath);
+ free(mpath);

} else if(!strncmp(buff, CMD8, strlen(CMD8))) { /* STREAM */
if(scanstream(desc, NULL, root, limits, options, copt) == CL_EMEM)
----------------------- end here --------------------------------------









On 9/8/05, Stephen Gran <[EMAIL PROTECTED]> wrote:
> 
> On Fri, Sep 02, 2005 at 12:20:46PM +0200, Justo Alonso said:
> > Why clamd version command don't show this information ??
> >
> > I attach a patch to solve this.
> >
> > in the SOURCE/clamd directory:
> >
> > patch < patch.clamav.session.c
> >
> > thanks in advance
> 
> Can you resend with the patch attached? I don't see it.
> 
> Thanks,
> --
> --------------------------------------------------------------------------
> | Stephen Gran | Is this going to involve RAW human |
> | [EMAIL PROTECTED] | ecstasy? |
> | http://www.lobefin.net/~steve | |
> --------------------------------------------------------------------------
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> 
> iD8DBQFDIE/JSYIMHOpZA44RAs/cAJ4qCR6Bk3QTmeTczNiEUv7v0eNSXgCcDx3i
> MdRnTrtUVw0YZdb5yUFYaVo=
> =5Jt2
> -----END PGP SIGNATURE-----
> 
> 
> _______________________________________________
> http://lurker.clamav.net/list/clamav-devel.html
> 
> 
>
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html

Reply via email to