samba-vscan/global vscan-fileaccesslog.c, 1.8.2.4, 1.8.2.5 vscan-message.c, 1.10.2.1, 1.10.2.2 vscan-quarantine.c, 1.4.2.3, 1.4.2.4

Rainer Link <[email protected]> Sat, 19 May 2007 17:59:44 +0000
Newsgroups gmane.comp.security.virus.openantivirus.cvs
Message-ID <[email protected]>
Update of /cvsroot/openantivirus/samba-vscan/global
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26105

Modified Files:
      Tag: VSCAN_0_3
	vscan-fileaccesslog.c vscan-message.c vscan-quarantine.c 
Log Message:
first batch of fixes for Samba 3.0.25 (or later)


Index: vscan-fileaccesslog.c
===================================================================
RCS file: /cvsroot/openantivirus/samba-vscan/global/vscan-fileaccesslog.c,v
retrieving revision 1.8.2.4
retrieving revision 1.8.2.5
diff -u -d -r1.8.2.4 -r1.8.2.5
--- vscan-fileaccesslog.c	13 Jul 2005 14:58:43 -0000	1.8.2.4
+++ vscan-fileaccesslog.c	19 May 2007 17:59:42 -0000	1.8.2.5
@@ -103,7 +103,11 @@
                         /* match ... */
                         /* move to end of list */
                         DLIST_REMOVE(Lrufiles, curr);
-                        DLIST_ADD_END(Lrufiles, curr, tmp);
+			#if (SMB_VFS_INTERFACE_VERSION >= 21)
+			 DLIST_ADD_END(Lrufiles, curr, struct lrufiles_struct *);
+			#else
+                         DLIST_ADD_END(Lrufiles, curr, tmp);
+			#endif
                         LrufilesEnd = curr;
                         /* return it */
                         return curr;
@@ -170,7 +174,11 @@
 		}
 		
 		DEBUG(10, ("adding new entry to list...\n"));
-		DLIST_ADD_END(Lrufiles, new_entry, tmp);
+		#if (SMB_VFS_INTERFACE_VERSION >= 21)
+ 		 DLIST_ADD_END(Lrufiles, new_entry, struct lrufiles_struct *);
+		#else
+		 DLIST_ADD_END(Lrufiles, new_entry, tmp);
+		#endif
 		LrufilesEnd = new_entry;
 		lrufiles_count++;
 		DEBUG(10, ("entry '%s' added, count '%d'\n", fname, lrufiles_count));

Index: vscan-quarantine.c
===================================================================
RCS file: /cvsroot/openantivirus/samba-vscan/global/vscan-quarantine.c,v
retrieving revision 1.4.2.3
retrieving revision 1.4.2.4
diff -u -d -r1.4.2.3 -r1.4.2.4
--- vscan-quarantine.c	5 Feb 2005 14:08:39 -0000	1.4.2.3
+++ vscan-quarantine.c	19 May 2007 17:59:42 -0000	1.4.2.4
@@ -27,7 +27,11 @@
  
 #if (SMB_VFS_INTERFACE_VERSION >= 6)
 int vscan_delete_virus(vfs_handle_struct *handle, connection_struct *conn, char *virus_file) {
-	int rc = SMB_VFS_NEXT_UNLINK(handle, conn, virus_file);
+	#if (SMB_VFS_INTERFACE_VERSION >= 21)
+         int rc = SMB_VFS_NEXT_UNLINK(handle, virus_file);
+        #else 
+	 int rc = SMB_VFS_NEXT_UNLINK(handle, conn, virus_file);
+	#endif
 #else 
 int vscan_delete_virus(struct vfs_ops *ops, struct connection_struct *conn, char *virus_file) {
 	int rc = ops->unlink(conn, virus_file);
@@ -86,7 +90,9 @@
 	}
 	
 	/* now do the actual quarantine, i.e. renaming */
-#if (SMB_VFS_INTERFACE_VERSION >= 6)
+#if (SMB_VFS_INTERFACE_VERSION >= 21)
+	rc = SMB_VFS_NEXT_RENAME(handle, virus_file, q_file);
+#elif (SMB_VFS_INTERFACE_VERSION >= 6)
 	rc = SMB_VFS_NEXT_RENAME(handle, conn, virus_file, q_file);
 #else
 	rc = ops->rename(conn, virus_file, q_file);

Index: vscan-message.c
===================================================================
RCS file: /cvsroot/openantivirus/samba-vscan/global/vscan-message.c,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -u -d -r1.10.2.1 -r1.10.2.2
--- vscan-message.c	14 Jul 2003 13:09:16 -0000	1.10.2.1
+++ vscan-message.c	19 May 2007 17:59:42 -0000	1.10.2.2
@@ -79,7 +79,11 @@
        	make_nmb_name(&calling, myname, 0x0);
        	make_nmb_name(&called , remote_machine, name_type);
 
+#if (SMB_VFS_INTERFACE_VERSION >= 21)
+       	if (!(cli=cli_initialise()) || (cli_set_port(cli, port) == 0) || !cli_connect(cli, remote_machine, &ip)) {
+#else
        	if (!(cli=cli_initialise(NULL)) || (cli_set_port(cli, port) == 0) || !cli_connect(cli, remote_machine, &ip)) {
+#endif
                	DEBUG(5,("Connection to %s failed\n", remote_machine));
                	return 1;
        	}


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/