Changeset 422 for trunk


Ignore:
Timestamp:
Dec 21, 2012, 7:56:16 PM (12 years ago)
Author:
katerina
Message:

Fix for tickets #326, #327.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r420 r422  
    1212dnl start
    1313dnl
    14 AM_INIT_AUTOMAKE(samhain, 3.0.8)
     14AM_INIT_AUTOMAKE(samhain, 3.0.9)
    1515AC_DEFINE([SAMHAIN], 1, [Application is samhain])
    1616AC_CANONICAL_HOST
  • trunk/docs/Changelog

    r421 r422  
    113.0.9:
     2        * Fixed a Cygwin compile warning
     3        * Change logic in samhain.c to make sure inotify doesn't cause
     4          excessive full scans
     5        * Add option IgnoreTimestampsOnly in Windows registry check (ignore
     6          changes if only timestamp has changed)
    27        * Fix the probe command (misses clients if their startup message
    38          has been missed)
  • trunk/src/samhain.c

    r416 r422  
    19881988       */
    19891989      if      (sh.flag.checkSum == SH_CHECK_INIT ||
    1990                (sh.flag.inotify & SH_INOTIFY_DOSCAN) != 0 ||
    19911990               (sh.flag.checkSum == SH_CHECK_CHECK &&
    19921991                (sh.flag.isdaemon == S_FALSE && sh.flag.loop == S_FALSE)))
     
    19971996        }
    19981997      else if (sh.flag.checkSum == SH_CHECK_CHECK ||
     1998               (sh.flag.inotify & SH_INOTIFY_DOSCAN) != 0 ||
    19991999               (sh.flag.update == S_TRUE &&
    20002000                (sh.flag.isdaemon == S_TRUE || sh.flag.loop == S_TRUE)))
  • trunk/src/sh_getopt.c

    r415 r422  
    562562  if (num > 0) fputc (',', stdout);
    563563  fputs (_(" logfile monitor"), stdout); ++num;
     564#endif
     565#if defined(USE_REGISTRY_CHECK)
     566  if (num > 0) fputc ('\n', stdout);
     567  fputs (_(" Windows registry"), stdout); ++num;
    564568#endif
    565569  if (num == 0)
  • trunk/src/sh_ipvx.c

    r380 r422  
    8787int sh_ipvx_isany (struct sh_sockaddr * a)
    8888{
     89#if defined(HOST_IS_CYGWIN)
     90  /*
     91   * Cygwin implementation gives 'missing braces around initializer'
     92   * warning, thus replace it with correct version.
     93   */
     94#undef IN6ADDR_ANY_INIT
     95#define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }
     96#endif
     97
    8998#if defined(USE_IPVX)
    9099  struct in6_addr anyaddr = IN6ADDR_ANY_INIT;
  • trunk/src/sh_registry.c

    r403 r422  
    5858static int sh_reg_add_stop (const char *s);
    5959static int sh_reg_add_ign (const char *s);
     60static int sh_reg_ign_time (const char *s);
    6061
    6162#define STOP_FALSE  0
     
    7778    },
    7879    {
     80        N_("ignoretimestamponly"),
     81        sh_reg_ign_time,
     82    },
     83    {
    7984        N_("singlekey"),
    8085        sh_reg_add_key,
     
    105110static time_t   sh_reg_check_interval = SH_REGISTRY_INTERVAL;
    106111static int      sh_reg_check_severity = SH_ERR_SEVERE;
     112static int      ShRegIgnTime          = S_FALSE;
    107113
    108114struct regkeylist {
     
    128134
    129135  SL_RETURN((value), _("sh_reg_set_active"));
     136}
     137
     138static int sh_reg_ign_time(const char *s)
     139{
     140  int value;
     141   
     142  SL_ENTER(_("sh_reg_ign_time"));
     143
     144  value = sh_util_flagval(s, &ShRegIgnTime);
     145
     146  SL_RETURN((value), _("sh_reg_ign_time"));
    130147}
    131148
     
    710727          doUpdate = S_TRUE;
    711728        }
    712       else if (save.val0 != totalSize ||
    713                ((time_t) save.val1) != fTime ||
     729      else if (save.val0 != totalSize || 
    714730               save.val2 != cSubKeys ||
    715731               save.val3 != cValues ||
    716                0 != strcmp(save.checksum, hashbuf))
     732               0 != strcmp(save.checksum, hashbuf) ||
     733               ( (((time_t) save.val1) != fTime) && (ShRegIgnTime == S_FALSE)) )
    717734        {
    718735          /* Change detected */
Note: See TracChangeset for help on using the changeset viewer.