Sandro,

I have a fix for recursion. The problem is that OnAccessExcludePath still
doesn't work. Here is a patch if you want to try it:

diff --git a/clamd/fan.c b/clamd/fan.c
index 70da61d..673f59c 100644
--- a/clamd/fan.c
+++ b/clamd/fan.c
@@ -131,7 +131,7 @@ void *fan_th(void *arg)

     if((pt = optget(tharg->opts, "OnAccessIncludePath"))->enabled) {
        while(pt) {
-           if(fanotify_mark(fan_fd, FAN_MARK_ADD, fan_mask, fan_fd,
pt->strarg) != 0) {
+           if(fanotify_mark(fan_fd, FAN_MARK_ADD|FAN_MARK_MOUNT, fan_mask,
fan_fd, pt->strarg) != 0) {
                logg("!ScanOnAccess: Can't include path '%s'\n",
pt->strarg);
                return NULL;
            } else



On Wed, Feb 12, 2014 at 1:57 PM, Sandro Poppi <spo...@gmx.net> wrote:

> Steve,
>
> Thank you for your answer. One additional question: Are there any plans
> to add recursion for OnAccessIncludePath? Would be a great feature,
> especially when users add directories to their home dir.
>
> Regards,
> Sandro
>
> Am 11.02.2014 01:02, schrieb Steven Morgan:
> > Sandro,
> >
> > Yes, that is a reasonable expectation. From reviewing the code
> > (clamd/fan.c), the current use of fanotify will not recurse into
> > sub-directories. There is a way to specify fanotify for a mount point
> > including sub-directories(FAN_MARK_MOUNT), but that appears to be
> > unimplemented at present.
> >
> > Thanks,
> > Steve
> >
> >
> > On Sat, Feb 8, 2014 at 3:40 PM, Sandro Poppi <spo...@gmx.net> wrote:
> >
> >> Hi,
> >>
> >> I'm running ClamAV 0.98.1 on Fedora linux 19. I wonder if the
> >> OnAccessIncludePath directive is recursive or not? My expectation is
> >> that when I add eg.
> >>
> >> ScanOnAccess yes
> >> OnAccessIncludePath /home
> >>
> >> and a virus (eg. eicar.com) is stored in /home/user1/tmp/eicar/
> eicar.com
> >> and accessed with vi, cp, gedit ... clamd should find it which it
> >> currently does not. When I directly add
> >>
> >> OnAccessIncludePath /home/user1/tmp/eicar
> >>
> >> clamd finds it though. The same is true when running clamdscan. Do I
> >> really need to add all directories I want to scan to
> >> OnAccessIncludePath? Or am I simply missing another option? Could this
> >> be fanotify issue?
> >>
> >> Thanks in advance,
> >> Sandro
> >> _______________________________________________
> >> Help us build a comprehensive ClamAV guide:
> >> https://github.com/vrtadmin/clamav-faq
> >> http://www.clamav.net/support/ml
> >>
> > _______________________________________________
> > Help us build a comprehensive ClamAV guide:
> > https://github.com/vrtadmin/clamav-faq
> > http://www.clamav.net/support/ml
> >
> _______________________________________________
> Help us build a comprehensive ClamAV guide:
> https://github.com/vrtadmin/clamav-faq
> http://www.clamav.net/support/ml
>
_______________________________________________
Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq
http://www.clamav.net/support/ml

Reply via email to