Changeset 487 for trunk


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
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/Changelog

    r486 r487  
    114.1.0:
    2         * fix safe_logger() - uses the logger utility with a non-posix option
     2        * fix call of self_check for exit on sigterm
     3        * fix safe_logger() - uses the logger utility with a non-posix option
    34        * fix missing reporting on shell expansion capability in --version
    45        * fix missing error message on invalid list for skipchecksum
  • 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__,
  • trunk/test/testhash.sh

    r481 r487  
    6363        fi
    6464        #
    65         ${TOP_SRCDIR}/configure --enable-debug=gdb --quiet $TRUST --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file --enable-db-reload '--enable-login-watch' '--enable-mounts-check' ${C_LOGFILE} '--enable-port-check' '--enable-suidcheck' '--enable-message-queue'
     65        ${TOP_SRCDIR}/configure --enable-debug=gdb --quiet $TRUST --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file --enable-db-reload '--enable-login-watch' '--enable-mounts-check' ${C_LOGFILE} '--enable-port-check' '--enable-message-queue'
    6666        #
    6767        fail=0
Note: See TracChangeset for help on using the changeset viewer.