Update of /cvsroot/openantivirus/samba-vscan/global
In directory sc8-pr-cvs1:/tmp/cvs-serv22231/global
Modified Files:
Tag: VSCAN_0_3
vscan-filetype.c
Log Message:
- revert my generic make rule patch...(seems to not work on FreeBSD)
- --with-single-libs was also broken :-(
- add filetype detection in configure.in
--with-filetype=yes|no|auto (default=auto)
Rainer, can you test the filetype detection stuff.
I don't have libmagic...
metze
Index: vscan-filetype.c
===================================================================
RCS file: /cvsroot/openantivirus/samba-vscan/global/vscan-filetype.c,v
retrieving revision 1.3.2.3
retrieving revision 1.3.2.4
diff -u -d -r1.3.2.3 -r1.3.2.4
--- vscan-filetype.c 19 Sep 2003 08:53:19 -0000 1.3.2.3
+++ vscan-filetype.c 24 Sep 2003 11:06:34 -0000 1.3.2.4
@@ -20,6 +20,9 @@
/* FIXME: when module works correctly, increase value of DEBUG statements */
#include "vscan-global.h"
+
+#ifdef HAVE_FILETYPE_SUPPORT
+
#include "magic.h"
@@ -59,7 +62,9 @@
vscan_syslog("could not initialise libmagic");
} else {
DEBUG(1, ("loading magic\n"));
- /* NULL = load default file, probably we need another user setting here to specifiy alternative magic files */
+ /* NULL = load default file, probably we need another user
+ * setting here to specifiy alternative magic files
+ */
if ( magic_load(filetype_magic, NULL) != 0 ) { /* error */
vscan_syslog("%s", magic_error(filetype_magic));
} else {
@@ -80,7 +85,7 @@
*
*/
-void filetype_close() {
+void filetype_close(void) {
if ( filetype_init_magic )
magic_close(filetype_magic);
@@ -145,5 +150,25 @@
DEBUG(1, ("no match - file must be scanned\n"));
return 0;
}
-
+#else /* HAVE_FILETYPE_SUPPORT */
+
+BOOL filetype_init (int flags, pstring exclude_list)
+{
+ DEBUG(4,("Sorry, samba-vscan filetype support is not compiled in\n"));
+ return True;
+}
+
+int filetype_skipscan(pstring fname)
+{
+ DEBUG(10,("Sorry, samba-vscan filetype support is not compiled in\n"));
+ return 0;
+}
+
+
+void filetype_close(void)
+{
+ return;
+}
+
+#endif /* HAVE_FILETYPE_SUPPORT */
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.