On Tue, Nov 04, 2003 at 05:16:50PM -0500, Ed Phillips wrote: > On Tue, 4 Nov 2003, Ed Phillips wrote: > > > I added a declaration of "virnum" in the function called out below... and > > the compile continued to success. > > > > However, "make install" fails to create the following directories: > > > > <install>/share/clamav/{main.cvd,daily.cvd} > > > > ...they have to be created manually. > > Ahh... their not directories... their files... but they have to be there > in some form for "make install" to continue... and they're not.
I think the problem is the lines to install the databases have been commented out so as not to overwrite existing databases on upgrade, but the chown/chmod lines are still present and for you are causing problems on a new installation. Using silent mode fixes this issue. You've spotted the problem in server.c and clamd.c aswell. Breaks more platforms than just Solaris. The typo in clamscan.1 (--infected) still exists (one liner attached), would be nice to fix before next stable... -- Damien
diff -Nru clamav-devel-20031104.vanilla/database/Makefile.am clamav-devel-20031104/database/Makefile.am --- clamav-devel-20031104.vanilla/database/Makefile.am 2003-10-26 17:00:58.000000000 +1100 +++ clamav-devel-20031104/database/Makefile.am 2003-11-05 13:54:04.409556000 +1100 @@ -31,12 +31,12 @@ chmod 775 $(DESTDIR)$(DBINST); \ chown ${CLAMAVUSER} $(DESTDIR)$(DBINST); \ chgrp ${CLAMAVGROUP} $(DESTDIR)$(DBINST); \ - chmod 664 $(DESTDIR)$(DBINST)/main.cvd; \ - chown ${CLAMAVUSER} $(DESTDIR)$(DBINST)/main.cvd; \ - chgrp ${CLAMAVGROUP} $(DESTDIR)$(DBINST)/main.cvd; \ - chmod 664 $(DESTDIR)$(DBINST)/daily.cvd; \ - chown ${CLAMAVUSER} $(DESTDIR)$(DBINST)/daily.cvd; \ - chgrp ${CLAMAVGROUP} $(DESTDIR)$(DBINST)/daily.cvd; \ + chmod -f 664 $(DESTDIR)$(DBINST)/main.cvd; \ + chown -f ${CLAMAVUSER} $(DESTDIR)$(DBINST)/main.cvd; \ + chgrp -f ${CLAMAVGROUP} $(DESTDIR)$(DBINST)/main.cvd; \ + chmod -f 664 $(DESTDIR)$(DBINST)/daily.cvd; \ + chown -f ${CLAMAVUSER} $(DESTDIR)$(DBINST)/daily.cvd; \ + chgrp -f ${CLAMAVGROUP} $(DESTDIR)$(DBINST)/daily.cvd; \ chmod 664 $(DESTDIR)$(DBINST)/mirrors.txt; \ chown ${CLAMAVUSER} $(DESTDIR)$(DBINST)/mirrors.txt; \ chgrp ${CLAMAVGROUP} $(DESTDIR)$(DBINST)/mirrors.txt; \ diff -Nru clamav-devel-20031104.vanilla/database/Makefile.in clamav-devel-20031104/database/Makefile.in --- clamav-devel-20031104.vanilla/database/Makefile.in 2003-10-26 17:00:58.000000000 +1100 +++ clamav-devel-20031104/database/Makefile.in 2003-11-05 13:54:17.562729000 +1100 @@ -253,12 +253,12 @@ chmod 775 $(DESTDIR)$(DBINST); \ chown ${CLAMAVUSER} $(DESTDIR)$(DBINST); \ chgrp ${CLAMAVGROUP} $(DESTDIR)$(DBINST); \ - chmod 664 $(DESTDIR)$(DBINST)/main.cvd; \ - chown ${CLAMAVUSER} $(DESTDIR)$(DBINST)/main.cvd; \ - chgrp ${CLAMAVGROUP} $(DESTDIR)$(DBINST)/main.cvd; \ - chmod 664 $(DESTDIR)$(DBINST)/daily.cvd; \ - chown ${CLAMAVUSER} $(DESTDIR)$(DBINST)/daily.cvd; \ - chgrp ${CLAMAVGROUP} $(DESTDIR)$(DBINST)/daily.cvd; \ + chmod -f 664 $(DESTDIR)$(DBINST)/main.cvd; \ + chown -f ${CLAMAVUSER} $(DESTDIR)$(DBINST)/main.cvd; \ + chgrp -f ${CLAMAVGROUP} $(DESTDIR)$(DBINST)/main.cvd; \ + chmod -f 664 $(DESTDIR)$(DBINST)/daily.cvd; \ + chown -f ${CLAMAVUSER} $(DESTDIR)$(DBINST)/daily.cvd; \ + chgrp -f ${CLAMAVGROUP} $(DESTDIR)$(DBINST)/daily.cvd; \ chmod 664 $(DESTDIR)$(DBINST)/mirrors.txt; \ chown ${CLAMAVUSER} $(DESTDIR)$(DBINST)/mirrors.txt; \ chgrp ${CLAMAVGROUP} $(DESTDIR)$(DBINST)/mirrors.txt; \
diff -Nru clamav-devel-20031104.vanilla/clamd/clamd.c clamav-devel-20031104/clamd/clamd.c --- clamav-devel-20031104.vanilla/clamd/clamd.c 2003-10-24 10:20:55.000000000 +1000 +++ clamav-devel-20031104/clamd/clamd.c 2003-11-05 13:53:38.790573000 +1100 @@ -49,7 +49,7 @@ time_t currtime; struct cl_node *root = NULL; const char *dbdir, *cfgfile; - int ret, virnum = 0, tcpsock; + int ret, virnum, tcpsock; /* initialize some important variables */ @@ -176,6 +176,7 @@ logg("Reading databases from %s\n", dbdir); + virnum = 0; if((ret = cl_loaddbdir(dbdir, &root, &virnum))) { fprintf(stderr, "ERROR: %s\n", cl_strerror(ret)); logg("!%s\n", cl_strerror(ret)); diff -Nru clamav-devel-20031104.vanilla/clamd/server.c clamav-devel-20031104/clamd/server.c --- clamav-devel-20031104.vanilla/clamd/server.c 2003-11-04 10:47:40.000000000 +1100 +++ clamav-devel-20031104/clamd/server.c 2003-11-05 13:53:38.808644000 +1100 @@ -123,6 +123,7 @@ short int need_wait = 0, do_loop = 0, db_problem = 0; const char *dbdir; struct cl_stat dbstat; + int virnum; /* ignore all signals (except for SIGSEGV) */
diff -Nru clamav-devel-20031104.vanilla/docs/clamscan.1 clamav-devel-20031104/docs/clamscan.1 --- clamav-devel-20031104.vanilla/docs/clamscan.1 2003-07-30 01:41:17.000000000 +1000 +++ clamav-devel-20031104/docs/clamscan.1 2003-11-05 14:14:01.000000000 +1100 @@ -54,6 +54,7 @@ .TP \fB\-\-mbox\fR Enable scanning of mbox and Maildir files. (also treat stdin as a mailbox, for backward compatibility). +.TP \fB\-i, \-\-infected\fR Print infected files only. .TP
pgp00000.pgp
Description: PGP signature