Bug in samba-vscan
Angad Singh <angad-QlylgH9H1Ke6Rj/[email protected]> Thu, 12 Aug 2010 14:05:34 +0530
| Newsgroups | gmane.comp.security.virus.openantivirus.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I've been using samba-vscan along with ClamD in production for some
time and it just works great! I recently upgraded to CentOS 5.5, and
samba-vscan started throwing up errors like:
Aug 12 13:28:19 olabs1 smbd_audit: ERROR: file folder/file.ext not
found, not readable or an error occured
at the same time it would show this in the clamd log:
Thu Aug 12 13:31:07 2010 -> WARNING: lstat() failed on: folder/file.ext
I was using samba 3.0.33 with samba-vscan-0.3.6c-beta5 (tried with 0.3.6b t=
oo)
I couldn't find any solution anywhere so finally got down to the source cod=
e.
It seems earlier the VFS module subsystem returned the complete path
in the connection_struct->connectpath variable and now it only returns
a variable path, so I made the following change in=A0vscan_open and
vscan_close:
[code]
static int vscan_open(struct connection_struct *conn, PROTOTYPE_CONST
char *fname, int flags, mode_t mode)
#endif
{
SMB_STRUCT_STAT stat_buf;
pstring filepath;
/* Assemble complete file path */
#if (SMB_VFS_INTERFACE_VERSION >=3D 21)
- pstrcpy(filepath, handle->conn->connectpath);
+ pstrcpy(filepath, handle->conn->origpath);
#else
pstrcpy(filepath, conn->connectpath);
[/code]
Compiled my vscan-clamav.so and used the new one - it worked now !
Can I file this as a bug and commit it?
-Angad
---------------------------------------------------------------------------=
---
This SF.net email is sponsored by =
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev =