Changeset 159 for trunk


Ignore:
Timestamp:
Jan 16, 2008, 11:12:13 PM (17 years ago)
Author:
katerina
Message:

Fix for ticket #87 (option --with-checksum broken).

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_error.c

    r144 r159  
    134134  if (s[0] == '/')
    135135    {
    136       foo = sh_tiger_hash_gpg (s, TIGER_FILE, 0);
     136      foo = sh_tiger_hash_gpg (s, TIGER_FILE, TIGER_NOLIM);
    137137      fprintf (stdout, _("%s\n"),  foo);
    138138      SH_FREE(foo);
  • trunk/src/sh_gpg.c

    r153 r159  
    129129
    130130#if defined(WITH_PGP)
    131   test_gpg = sh_tiger_hash_gpg (DEFAULT_PGP_PATH, checkfd, 0);
    132 #else
    133   test_gpg = sh_tiger_hash_gpg (DEFAULT_GPG_PATH, checkfd, 0);
     131  test_gpg = sh_tiger_hash_gpg (DEFAULT_PGP_PATH, checkfd, TIGER_NOLIM);
     132#else
     133  test_gpg = sh_tiger_hash_gpg (DEFAULT_GPG_PATH, checkfd, TIGER_NOLIM);
    134134#endif
    135135 
  • trunk/test/testhash.sh

    r146 r159  
    2323LOGFILE="$PW_DIR/.samhain_log"; export LOGFILE
    2424
    25 MAXTEST=1; export MAXTEST
     25MAXTEST=2; export MAXTEST
    2626
    2727testhash ()
     
    8181            return 1
    8282        fi
     83        #
     84        #
     85        #
     86        TEST="${S}files${E}"
     87        #
     88        case $SCRIPTDIR in
     89            /*)
     90                testpath="${SCRIPTDIR}/testtiger.txt";;
     91            *)
     92                testpath="`pwd`/${SCRIPTDIR}/testtiger.txt";;
     93        esac
     94        #
     95        RESU=`./samhain -H ${testpath}`
     96        #
     97        if test x"$RESU" = x"${testpath}: 8125E439 4E7E20F9 24FD8E37  BC4D90C7 FC67F40C 1681F05D"; then
     98            [ -z "$quiet" ] && log_ok   2 ${MAXTEST};
     99        else
     100            [ -z "$quiet" ] && log_fail 2 ${MAXTEST};
     101            return 1
     102        fi
     103        #
    83104        log_end "HASH FUNCTION"
    84105        return 0
  • trunk/test/testrun_1b.sh

    r100 r159  
    3636        fi
    3737        #
    38         #
    39         ${TOP_SRCDIR}/configure ${BUILDOPTS} >/dev/null 2>/dev/null
     38        # Bootstrapping
     39        #
     40        ${TOP_SRCDIR}/configure >/dev/null 2>/dev/null
     41        if test x$? = x0; then
     42                [ -z "$verbose" ] ||     log_msg_ok "configure (bootstrap)...";
     43                $MAKE  > /dev/null 2>&1
     44                if test x$? = x0; then
     45                    [ -z "$verbose" ] || log_msg_ok "make (bootstrap)...";
     46                else
     47                    [ -z "$quiet" ] &&   log_msg_fail "make (bootstrap)...";
     48                    return 1
     49                fi
     50
     51        else
     52                [ -z "$quiet" ] &&       log_msg_fail "configure (bootstrap)...";
     53                return 1
     54        fi
     55        #
     56        #
     57        ${TOP_SRCDIR}/configure ${BUILDOPTS} 2>/dev/null | \
     58            egrep 'use existing [./[:alnum:]]+ for gpg checksum' >/dev/null
    4059        #
    4160        #
     
    5978        tail -n "+$SKIP" ${SCRIPTDIR}/test.sh >/dev/null 2>&1
    6079        if [ $? -eq 0 ]; then
    61             tail -n "+$SKIP" ${SCRIPTDIR}/test.sh | gunzip -c - | tar xf - &&  \
     80            tail -n "+$SKIP" ${SCRIPTDIR}/test.sh | gunzip -c - 2>/dev/null | tar xf - &&  \
    6281                mv "./testrc.gpg.asc" "$RCFILE"
    6382        else
    64             tail "+$SKIP" ${SCRIPTDIR}/test.sh | gunzip -c - | tar xf - &&  \
     83            tail "+$SKIP" ${SCRIPTDIR}/test.sh | gunzip -c - 2>/dev/null | tar xf - &&  \
    6584                mv "./testrc.gpg.asc" "$RCFILE"
    6685        fi
     
    214233            # -------------  first test -------------
    215234            #
    216             BUILDOPTS="--quiet $TRUST --enable-debug --with-gpg=${GPG} --with-checksum=no --enable-micro-stealth=137 --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE  --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file"
     235            BUILDOPTS="--quiet $TRUST --enable-debug --with-gpg=${GPG} --with-checksum --enable-micro-stealth=137 --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE  --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file"
    217236            testrun1b_internal "${BUILDOPTS}"
    218237            do_test_1b
     
    234253                log_skip 2 $MAXTEST 'ImageMagick convert not found in $PATH'
    235254            else
    236                 BUILDOPTS="--quiet $TRUST --enable-debug --with-gpg=${GPG} --with-checksum=no --enable-stealth=137 --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE  --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file"
     255                BUILDOPTS="--quiet $TRUST --enable-debug --with-gpg=${GPG} --with-checksum --enable-stealth=137 --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE  --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file"
    237256                testrun1b_internal "${BUILDOPTS}" "$CONVERT"
    238257                do_test_1b
     
    260279                log_skip 3 $MAXTEST 'logging to prelude (or use --really-all)'
    261280            else
    262                 BUILDOPTS="--quiet $TRUST --enable-debug --with-prelude --with-gpg=${GPG} --with-checksum=no --enable-micro-stealth=137 --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE  --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file"
     281                BUILDOPTS="--quiet $TRUST --enable-debug --with-prelude --with-gpg=${GPG} --with-checksum --enable-micro-stealth=137 --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE  --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file"
    263282                testrun1b_internal "${BUILDOPTS} CFLAGS=-DSH_NOFAILOVER=1"
    264283                do_test_1b_2
Note: See TracChangeset for help on using the changeset viewer.