Cannot override /root Myrule

Help
2013-03-30
2013-04-04
  • Andy Morris
    Andy Morris
    2013-03-30

    Added the following rule to the bottom of /etc/afick.conf:
    /root MyRule -m
    However if the mtime of /root changes then afick will report the mtime change!

    Note:
    Freshly installed afick3.3.1 from rpm at source forge onto Centos5.8
    The standard afick.conf has:
    allow_overload := yes
    MyRule = p+d+i+n+u+g+s+b+md5+m
    /root MyRule
    above my config.

    Seems like I cannot override the /root rule and this is somewhat confirmed by 2 things:
    1. If I add a rule to the top of afick.conf like:
    /root DIR
    Then run 'afick -u' it will not pickup on mtime changes.

    1. If I set debug=2 (or more) then I get the following insight into afick:
      DEBUG1: config line = allow_overload := yes
      DEBUG2: (check_overload) found directive allow_overload : 1
      [snip]
      DEBUG1: config line = /root DIR
      DEBUG1: config line = /root MyRule
      DEBUG2: overload rule for /root with /root MyRule (line 188)
      [snip]
      DEBUG1: config line = ! /root
      DEBUG2: overload rule for /root with ! /root (line 236)
      [snip]
      DEBUG2: # resolved /root p+i+n+u+g
      DEBUG1: /root DIR
      [snip]
      DEBUG2: (parcours) change masq to pinug for /root
      In this case there are 3 definitions for /root: The "/root DIR" that I added to the top of afick.conf, the "/root MyRule" that was supplied with afick.conf, and the "! /root" that I added to the cottom of afick.conf. It's the first version (/root DIR) that is used and that is confirmed by "resolved /root p+i+n+u+g" and afick behaviour.

    Can this be logged as a bug. I can supply full logs if required and/or create a minimalist config to reproduce the problem.
    Andy

     
  • Andy Morris
    Andy Morris
    2013-03-30

    I just created a minimal example to quickly reproduce this issue.
    Add 2 lines to afick.conf:
    /root/.ssh DIR
    /root/.ssh Logs
    Then run:
    afick --print_rule | grep .ssh
    It will show:
    DEBUG1: /root/.ssh DIR

    Demonstrating that the /root/.ssh rule was not overridden by the subsequent rule.

     
    • eric gerbier
      eric gerbier
      2013-04-04

      Hi,

      You are right : this is a bug !

      I have fixed it, and I'm currently writing tests to check afick's behavior.

      ----- Mail original -----

      I just created a minimal example to quickly reproduce this issue.
      Add 2 lines to afick.conf:
      /root/.ssh DIR
      /root/.ssh Logs
      Then run:
      afick --print_rule | grep .ssh
      It will show:
      DEBUG1: /root/.ssh DIR

      Demonstrating that the /root/.ssh rule was not overridden by the
      subsequent rule.