Changeset 487 for trunk/src


Ignore:
Timestamp:
Sep 13, 2015, 11:15:42 AM (9 years ago)
Author:
katerina
Message:

Fix for ticket #385 (self_test not working with exit on sigterm).

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/samhain.c

    r481 r487  
    797797  /* --- Checksum of executable. ---
    798798   */
    799   (void) sh_unix_self_check();
     799  {
     800    volatile  int sig_store = sig_termfast;
     801
     802    sig_termfast = 0;
     803    (void) sh_unix_self_check();
     804    sig_termfast = sig_store;
     805  }
    800806
    801807
  • trunk/src/sh_unix.c

    r486 r487  
    969969             sh_tiger_hash (sh.exec.path, TIGER_FILE, TIGER_NOLIM, hashbuf, sizeof(hashbuf)),
    970970             KEY_LEN+1);
    971   if (0 == sl_strncmp(sh.exec.hash,
    972                       newhash,
    973                       KEY_LEN))
    974     SL_RETURN((0), _("sh_unix_self_check"));
    975 
     971  if (0 == sl_strncmp(sh.exec.hash, newhash, KEY_LEN))
     972    {
     973      sh_error_handle(SH_ERR_INFO, FIL__, __LINE__, 0, MSG_E_SUBGEN,
     974                      _("Checksum ok"), _("sh_unix_self_check"));
     975      SL_RETURN((0), _("sh_unix_self_check"));
     976    }
    976977 
    977978  dlog(1, FIL__, __LINE__,
Note: See TracChangeset for help on using the changeset viewer.