Samba4x and samba-virusfilter

Hi to all!

I want to use samba-virusfilter with net/samba4x. But security/samba-virusfilter works only for net/samba36. Every time when I upgrade the samba I need do some actions for installing samba-virusfilter for net/samba4x. And after this samba-virusfilter works. Not perfect, but better than nothing. I was testing this method for net/samba 42 and net/samba43 last 2 years. I want to add "samba-virusfilter" as compile option for net/samba4x.

There is an algorithm of my actions to install net/samba4x with samba-virusfilter for samba 4.3.11:

1. cd /usr/ports/net/samba43
2. make config
3. make extract
4. cd ./work/samba-4.3.11/
5. wget https://github.com/fumiyas/samba-virusfilter/archive/master.zip
6. unzip ./master.zip
7. mv ./samba-virusfilter-master ./samba-virusfilter
8. after this you need to edit some samba 4 source files, here is patch files for this:
patch-wscrypt
Code:
--- wscript.orig   2016-08-31 14:47:51.000000000 +0300
+++ wscript   2016-08-31 14:48:50.000000000 +0300
@@ -155,6 +155,7 @@
  conf.RECURSE('lib/socket_wrapper')
  conf.RECURSE('lib/uid_wrapper')
  conf.RECURSE('source3')
+  conf.RECURSE('samba-virusfilter')
  conf.RECURSE('lib/texpect')
  if conf.env.with_ctdb:
  conf.RECURSE('ctdb')
patch-source3__wscrypt_build
Code:
--- source3/wscript_build.orig   2016-08-31 14:49:22.000000000 +0300
+++ source3/wscript_build   2016-08-31 14:50:39.000000000 +0300
@@ -1540,6 +1540,7 @@
bld.RECURSE('../examples/libsmbclient')
bld.RECURSE('../examples/pdb')
bld.RECURSE('../examples/VFS')
+bld.RECURSE('../samba-virusfilter')
bld.RECURSE('lib/netapi/tests')
bld.RECURSE('lib/netapi/examples')
bld.RECURSE('smbd/notifyd')
patch-buildtool__wafsamba__stalefiles.py
Code:
--- buildtools/wafsamba/stale_files.py.orig   2016-08-31 14:50:58.000000000 +0300
+++ buildtools/wafsamba/stale_files.py   2016-08-31 14:51:54.000000000 +0300
@@ -88,7 +88,7 @@
  link = os.readlink(p)
  if link[0:bin_base_len] == bin_base:
  p = link
-  if f in ['config.h']:
+  if f in ['config.h', 'virusfilter-config.h']:
  continue
  (froot, fext) = os.path.splitext(f)
  if fext not in [ '.c', '.h', '.so', '.o' ]:
9. cd /usr/ports/net/samba43
10. make
11. make install
12. cp ./work/stage/usr/local/lib/shared-modules/vfs/virusfilter_* /usr/local/lib/shared-modules/vfs/
13. make clean
14. make clean-depends

Can anybody help me with this task? What I need to do also?

P.S. Some information was taken from the installation manual samba-virusfilter.
 
Last edited:
bisi you are responding to a question that was asked almost 2 years ago. Since then this port has been removed because it had been broken for more than 6 months and failed to build for Samba 4.
 
Back
Top