fumiyas / samba-virusfilter

Samba-VirusFilter - On-access anti-virus filter for Samba (DISCONTINUED. See vfs_virusfilter(8) in Samba upstream)
GNU General Public License v3.0
8 stars 7 forks source link

cannot load module #6

Closed WilliamAnthony closed 7 months ago

WilliamAnthony commented 9 years ago

@fumiyas @luke-dixon Hi, I'm trying to use samba-virusfilter on my ubuntu 14.04 running samba 4.1.6. After building module and setting the configuration like the example, I got this error when I tried to access the share. I guess I should missed something when compiling the source (located at /home/william/temp/samba-4.1.6), but I have no idea what it is.

[2015/06/30 11:58:10.229378,  0] ../lib/util/modules.c:48(load_module)
  Error loading module '/usr/lib/x86_64-linux-gnu/samba/vfs/svf-clamav.so': /home/william/temp/samba-4.1.6/bin/shared/private/libcliauth.so: symbol MD5Update, version SAMBA_UTIL_0.0.1 not defined in file libsamba-util.so.0 with link time reference
[2015/06/30 11:58:10.249167,  0] ../source3/smbd/vfs.c:184(vfs_init_custom)
  error probing vfs module 'svf-clamav': NT_STATUS_UNSUCCESSFUL
[2015/06/30 11:58:10.249228,  0] ../source3/smbd/vfs.c:349(smbd_vfs_init)
  smbd_vfs_init: vfs_init_custom failed for svf-clamav
[2015/06/30 11:58:10.249253,  0] ../source3/smbd/service.c:640(make_connection_snum)
  vfs_init failed for service IPC$

I've checked the file is exists

william@william:~$ ls -ag /usr/lib/x86_64-linux-gnu/samba/vfs/svf-clamav.so
-rwxr-xr-x 1 root 62072 Jun 30 11:24 /usr/lib/x86_64-linux-gnu/samba/vfs/svf-clamav.so

Thanks.

luke-dixon commented 9 years ago

Hi there,

Thanks for giving this a go! Sorry it is so hard to build.

I assume, as the modules are in /usr/lib/x86_64-linux-gnu/samba/vfs, that you are using the package Ubuntu supplies.

I had quite a bit of trouble building it to work with Ubuntu's package. In the end what I did was download and rebuild their samba package. It was something like:

sudo apt-get install build-essential quilt unzip debhelper
sudo apt-get build-dep samba
apt-get source samba
curl https://codeload.github.com/fumiyas/samba-virusfilter/zip/master > samba-virusfilter-master.zip
unzip samba-virusfilter-master.zip
mv samba-virusfilter-master samba-4.1.6+dfsg/samba-virusfilter
curl https://gist.github.com/luke-dixon/4c514d40d8de05ce3fdc/download | gzip -d -c > samba-virus-filter-ubuntu-trusty.patch
cd samba-4.1.6+dfsg
quilt import ../samba-virus-filter-ubuntu-trusty.patch
quilt push -a

fakeroot debian/rules clean
fakeroot debian/rules binary
cd ..

The svf_*.so files end up in the samba-vfs-modules package. You could install that package or just copy them from samba-4.1.6+dfsg/debian/samba-vfs-modules/usr/lib/x86_64-linux-gnu/samba/vfs/.

Hope this helps.

WilliamAnthony commented 9 years ago

Yes, thanks for your great help...

I manually download samba source from http://archive.ubuntu.com/ubuntu/pool/main/s/samba/ It could be the cause of my error, because using apt-get source samba, there are automated patches applying in the end of process.

fumiyas commented 7 months ago

Please retry with the latest Samba release and bundled vfs_virusfilter(8) module, and report to upstream if you see a problem.