Changeset 183


Ignore:
Timestamp:
Oct 26, 2008, 12:59:48 PM (12 years ago)
Author:
katerina
Message:

Support for logfile monitoring (ticket #122). Also improved some configure error messages.

Location:
trunk
Files:
8 added
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.in

    r181 r183  
    118118        rijndael-boxes-fst.h sh_socket.h sh_ignore.h sh_prelude.h \
    119119        sh_mounts.h sh_userfiles.h sh_static.h sh_prelink.h \
    120         sh_processcheck.h sh_portcheck.h sh_pthread.h sh_string.h
     120        sh_processcheck.h sh_portcheck.h sh_pthread.h sh_string.h \
     121        sh_log_check.h sh_log_evalrule.h
    121122
    122123
     
    153154        $(srcsrc)/sh_processcheck.c \
    154155        $(srcsrc)/sh_pthread.c $(srcsrc)/sh_string.c \
    155         $(srcsrc)/dnmalloc.c \
     156        $(srcsrc)/sh_log_parse_syslog.c $(srcsrc)/sh_log_parse_pacct.c \
     157        $(srcsrc)/sh_log_parse_apache.c $(srcsrc)/sh_log_evalrule.c \
     158        $(srcsrc)/sh_log_check.c $(srcsrc)/dnmalloc.c \
    156159        $(srcsrc)/t-test1.c
    157160
     
    168171        sh_mounts.o sh_userfiles.o sh_prelink.o sh_static.o \
    169172        sh_processcheck.o sh_portcheck.o sh_port2proc.o \
     173        sh_log_parse_syslog.o sh_log_parse_pacct.o sh_log_parse_apache.o \
     174        sh_log_evalrule.o sh_log_check.o \
    170175        sh_pthread.o sh_string.o dnmalloc.o
    171176
     
    16651670sh_entropy.o: $(srcsrc)/sh_entropy.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_calls.h $(srcinc)/sh_pthread.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/CuTest.h
    16661671sh_forward.o: $(srcsrc)/sh_forward.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_forward.h $(srcinc)/sh_srp.h $(srcinc)/sh_fifo.h $(srcinc)/sh_tools.h $(srcinc)/sh_entropy.h $(srcinc)/sh_html.h $(srcinc)/sh_mail.h $(srcinc)/sh_socket.h $(srcinc)/sh_static.h $(srcinc)/rijndael-api-fst.h $(srcinc)/sh_readconf.h $(srcinc)/zAVLTree.h $(srcinc)/sh_extern.h
    1667 sh_modules.o: $(srcsrc)/sh_modules.c Makefile config_xor.h $(srcinc)/sh_modules.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utmp.h $(srcinc)/sh_mounts.h $(srcinc)/sh_userfiles.h $(srcinc)/sh_kern.h $(srcinc)/sh_suidchk.h $(srcinc)/sh_processcheck.h $(srcinc)/sh_portcheck.h
     1672sh_modules.o: $(srcsrc)/sh_modules.c Makefile config_xor.h $(srcinc)/sh_modules.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utmp.h $(srcinc)/sh_mounts.h $(srcinc)/sh_userfiles.h $(srcinc)/sh_kern.h $(srcinc)/sh_suidchk.h $(srcinc)/sh_processcheck.h $(srcinc)/sh_portcheck.h $(srcinc)/sh_logmon.h
    16681673sh_utmp.o: $(srcsrc)/sh_utmp.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_utmp.h $(srcinc)/sh_pthread.h
    16691674sh_kern.o: $(srcsrc)/sh_kern.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_kern.h sh_ks_xor.h $(srcinc)/sh_unix.h $(srcinc)/sh_hash.h
     
    17141719t-test1.o: $(srcsrc)/t-test1.c Makefile config.h $(srcinc)/malloc.h
    17151720sh_port2proc.o: $(srcsrc)/sh_port2proc.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error_min.h $(srcinc)/sh_utils.h $(srcinc)/sh_pthread.h
     1721sh_log_parse_syslog.o: $(srcsrc)/sh_log_parse_syslog.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h
     1722sh_log_parse_pacct.o: $(srcsrc)/sh_log_parse_pacct.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h
     1723sh_log_parse_apache.o: $(srcsrc)/sh_log_parse_apache.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h
     1724sh_log_evalrule.o: $(srcsrc)/sh_log_evalrule.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h $(srcinc)/zAVLTree.h
     1725sh_log_check.o: $(srcsrc)/sh_log_check.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h $(srcinc)/sh_modules.h
  • trunk/aclocal.m4

    r171 r183  
    409409x_libraries=NONE
    410410DESTDIR=
    411 SH_ENABLE_OPTS="db-reload xml-log message-queue login-watch process-check port-check mounts-check userfiles debug ptrace static network udp nocl stealth micro-stealth install-name identity khide suidcheck base largefile mail external-scripts encrypt srp dnmalloc"
     411SH_ENABLE_OPTS="db-reload xml-log message-queue login-watch process-check port-check mounts-check logfile-monitor userfiles debug ptrace static network udp nocl stealth micro-stealth install-name identity khide suidcheck base largefile mail external-scripts encrypt srp dnmalloc"
    412412SH_WITH_OPTS="prelude libprelude-prefix database libwrap cflags libs console altconsole timeserver alttimeserver rnd egd-socket port logserver altlogserver kcheck gpg checksum fp recipient sender trusted tmp-dir config-file log-file pid-file state-dir data-file html-file"
    413413
  • trunk/configure.ac

    r181 r183  
    242242  AC_EGREP_HEADER(ut_type, utmp.h, AC_DEFINE(HAVE_UTTYPE) )
    243243fi
     244
     245dnl
     246dnl figure out where acct.h lives
     247dnl and whether fields are int/comp_t
     248dnl
     249dnl GNU Accounting Utilities
     250dnl Copyright (C) 1993, 1996, 1997, 2003, 2005 Free Software Foundation, Inc.
     251dnl The GNU Accounting Utilities are free software; you can redistribute
     252dnl them and/or modify them under the terms of the GNU General Public
     253dnl License as published by the Free Software Foundation; either version
     254dnl 2, or (at your option) any later version.
     255dnl
     256AC_CHECK_HEADER(sys/acct.h,
     257                AC_DEFINE(HAVE_SYS_ACCT_H, ,
     258                          [Define if you have the <sys/acct.h> header file.])
     259                AC_HEADER_EGREP(ac_utime, sys/acct.h,
     260                                AC_DEFINE(HAVE_ACUTIME, ,
     261                                          [Define if <sys/acct.h> has the AC_UTIME field.])
     262                                AC_HEADER_EGREP(comp_t.*ac_utime, sys/acct.h,
     263                                                AC_DEFINE(ACUTIME_COMPT, ,
     264                                                          [Define if <sys/acct.h>'s AC_UTIME field is a COMP_T.]))
     265                )
     266                AC_HEADER_EGREP(ac_stime, sys/acct.h,
     267                                AC_DEFINE(HAVE_ACSTIME, ,
     268                                          [Define if <sys/acct.h> has the AC_STIME field.])
     269                                AC_HEADER_EGREP(comp_t.*ac_stime, sys/acct.h,
     270                                                AC_DEFINE(ACSTIME_COMPT, ,
     271                                                          [Define if <sys/acct.h>'s AC_STIME field is a COMP_T.]))
     272                )
     273                AC_HEADER_EGREP(ac_etime, sys/acct.h,
     274                                AC_DEFINE(HAVE_ACETIME, ,
     275                                          [Define if <sys/acct.h> has the AC_ETIME field.])
     276                                AC_HEADER_EGREP(comp_t.*ac_etime, sys/acct.h,
     277                                                AC_DEFINE(ACETIME_COMPT, ,
     278                                                          [Define if <sys/acct.h>'s AC_ETIME field is a COMP_T.]))
     279                )
     280                AC_HEADER_EGREP(ac_io,    sys/acct.h,
     281                                AC_DEFINE(HAVE_ACIO, ,
     282                                          [Define if <sys/acct.h> has the AC_IO field.])
     283                                AC_HEADER_EGREP(comp_t.*ac_io,    sys/acct.h,
     284                                                AC_DEFINE(ACIO_COMPT, ,
     285                                                          [Define if <sys/acct.h>'s AC_IO field is a COMP_T.]))
     286                )
     287                AC_HEADER_EGREP(ac_mem,   sys/acct.h,
     288                                AC_DEFINE(HAVE_ACMEM, ,
     289                                          [Define if <sys/acct.h> has the AC_MEM field.])
     290                                AC_HEADER_EGREP(comp_t.*ac_mem,   sys/acct.h,
     291                                                AC_DEFINE(ACMEM_COMPT, ,
     292                                                          [Define if <sys/acct.h>'s AC_MEM field is a COMP_T.]))
     293                )
     294                AC_HEADER_EGREP(ac_minflt,   sys/acct.h,
     295                                AC_HEADER_EGREP(ac_majflt,   sys/acct.h,
     296                                                AC_HEADER_EGREP(ac_swaps,   sys/acct.h,
     297                                                                AC_DEFINE(HAVE_PAGING, ,
     298                                                                          [Define if <sys/acct.h> has the AC_MINFLT, AC_MAJFLT and AC_SWAPS fields.])
     299                                                                AC_HEADER_EGREP(comp_t.*ac_minflt, sys/acct.h,
     300                                                                                AC_DEFINE(ACMINFLT_COMPT, ,
     301                                                                                          [Define if <sys/acct.h>'s AC_MINFLT field is a COMP_T.]))
     302                                                                AC_HEADER_EGREP(comp_t.*ac_mayflt, sys/acct.h,
     303                                                                                AC_DEFINE(ACMAJFLT_COMPT, ,
     304                                                                                          [Define if <sys/acct.h>'s AC_MAJFLT field is a COMP_T.]))
     305                                                                AC_HEADER_EGREP(comp_t.*ac_swaps, sys/acct.h,
     306                                                                                AC_DEFINE(ACSWAPS_COMPT, ,
     307                                                                                          [Define if <sys/acct.h>'s AC_SWAPS field is a COMP_T.]))
     308                                                )
     309                                )
     310                )
     311                AC_HEADER_EGREP(comp_t,   sys/acct.h, AC_DEFINE(HAVE_COMP_T, ,
     312                                                                [Define if <sys/acct.h> uses the COMP_T type.]))
     313 )
     314
    244315
    245316dnl need to check because AIX 4.2 does not have it
     
    589660then
    590661        AC_MSG_RESULT([no])
    591         AC_MSG_ERROR([No ps in /usr/ucb /bin /usr/bin])
     662        AC_MSG_ERROR([Cannot find ps in any of /usr/ucb /bin /usr/bin])
    592663fi
    593664AC_DEFINE_UNQUOTED([PSPATH], _("$PS"), [Path to ps])
     
    687758           elif test "x${enable_message_queue}" != xno; then
    688759               echo "${enableval}" | grep ['[^0123456789]'] >/dev/null 2>&1 &&
    689                    AC_MSG_ERROR([--enable-message-queue: MODE must be numeric])
     760                   AC_MSG_ERROR([With --enable-message-queue=MODE, MODE must be numeric])
    690761               echo "${enableval}" | \
    691762                   grep ['0[0123456789][0123456789][0123456789]'] >/dev/null 2>&1 ||
    692                    AC_MSG_ERROR([--enable-message-queue: MODE must be an octal (0nnn) number])
     763                   AC_MSG_ERROR([With --enable-message-queue=MODE, MODE must be an octal (0nnn) number])
    693764               AC_DEFINE(WITH_MESSAGE_QUEUE)
    694765               AC_DEFINE_UNQUOTED(MESSAGE_QUEUE_MODE, ${enable_message_queue})
     
    762833     AC_CHECK_HEADER(tcpd.h,
    763834                     [],
    764                      [ AC_MSG_ERROR([Could not find tcpd.h for libwrap. You must first install tcp_wrappers]) ])
     835                     [ AC_MSG_ERROR([Could not find tcpd.h for libwrap. You need to install tcp_wrappers.]) ])
    765836     AC_TRY_LINK([ #include <tcpd.h>
    766837                   int allow_severity; int deny_severity; ],
     
    810881dnl                             [sh_use_lcaps="no"])
    811882        else
    812                 AC_MSG_ERROR([--enable-network=WHAT: WHAT must be client, server, or no])
     883                AC_MSG_ERROR([With --enable-network=WHAT, WHAT must be client, server, or no])
    813884        fi
    814885        ],
     
    9631034               case "$sh_libprelude_version" in
    9641035               0.8*)
    965                 AC_MSG_ERROR([Libprelude 0.8 is too old, 0.9.6 or higher is required.])
     1036                AC_MSG_ERROR([You have Libprelude 0.8, which is too old. Version 0.9.6 or higher is required.])
    9661037               ;;
    9671038               *)
     
    9951066        [
    9961067        if test x"$enable_xml_log" != xyes; then
    997                 AC_MSG_ERROR([--with-database:  --enable-xml-log required])
     1068                AC_MSG_ERROR([With --with-database,  --enable-xml-log is required as well.])
    9981069        fi
    9991070        if test "x${withval}" = "xmysql"; then
     
    11011172                fi
    11021173                echo
    1103                 AC_MSG_ERROR([libmysql not found or unuseable])
     1174                AC_MSG_ERROR([Could not find libmysql, or it is not useable.])
    11041175          fi
    11051176          AC_CHECK_HEADERS(mysql/mysql.h)
     
    12841355
    12851356        else
    1286           AC_MSG_ERROR([--with-database: unsupported database ${withval}])
     1357          AC_MSG_ERROR([Option --with-database=database used with unsupported database ${withval}])
    12871358        fi
    12881359        ]
     
    13531424        ]
    13541425)
     1426
     1427AC_ARG_ENABLE(logfile-monitor,
     1428        [  --enable-logfile-monitor             monitor logfiles [[no]]],
     1429        [
     1430        if test "x${enable_logfile_monitor}" = xyes; then
     1431           AC_CHECK_HEADER(pcre.h,
     1432                           [
     1433                           AC_DEFINE(USE_LOGFILE_MONITOR, 1, [Define if you want the logfile monitor module.])
     1434                           LIBS="-lpcre $LIBS"
     1435                           ],
     1436                           AC_MSG_ERROR([The --enable-logfile-monitor option requires libpcre. For compiling the pcre development package is needed.])
     1437           )
     1438        fi
     1439        ]
     1440)
     1441
    13551442
    13561443AC_ARG_ENABLE(process-check,
     
    15071594    * )
    15081595      AC_MSG_RESULT([invalid argument])
    1509       AC_MSG_ERROR([--with-rnd: there is no random module ${use_static_rnd}])
     1596      AC_MSG_ERROR([Option --with-rnd=module used with unsupported module ${use_static_rnd}])
    15101597      ;;
    15111598esac
     
    16051692        [
    16061693        echo "${withval}" | grep ['[^0123456789]'] >/dev/null 2>&1 &&
    1607                 AC_MSG_ERROR([--with-port: PORT must be numeric])
     1694                AC_MSG_ERROR([For --with-port=PORT, PORT must be numeric.])
    16081695        myport=${withval}
    16091696        ],
     
    16571744        fi
    16581745        if test "x${enableval}" = "xstop" || test "x${enableval}" = "xstart"; then
    1659           AC_MSG_ERROR([--enable-nocl: start/stop/reload/restart/status are reserved words])
     1746          AC_MSG_ERROR([For --enable-nocl=PW start/stop/reload/restart/status are reserved words.])
    16601747        fi
    16611748        if test "x${enableval}" = "xreload" || test "x${enableval}" = "xrestart"; then
    1662           AC_MSG_ERROR([--enable-nocl: start/stop/reload/restart/status are reserved words])
     1749          AC_MSG_ERROR([For --enable-nocl=PW start/stop/reload/restart/status are reserved words.])
    16631750        fi
    16641751        if test "x${enableval}" = "xstatus"; then
    1665           AC_MSG_ERROR([--enable-nocl: start/stop/reload/restart/status are reserved words])
     1752          AC_MSG_ERROR([For --enable-nocl=PW start/stop/reload/restart/status are reserved words.])
    16661753        fi
    16671754        if test "x${enableval}" = "xno"; then
    1668           AC_MSG_ERROR([--enable-nocl: use of --enable-nocl=no is ambiguous])
     1755          AC_MSG_ERROR([With --enable-nocl=PW, the use of --enable-nocl=no is ambiguous.])
    16691756        fi
    16701757        nocl_code="${enable_nocl}"
     
    16781765        if test "x${enableval}" != "xyes"; then
    16791766                echo "${enableval}" | grep ['[^0123456789]'] >/dev/null 2>&1 &&
    1680                         AC_MSG_ERROR([--enable-stealth: XOR_VAL must be numeric])
     1767                        AC_MSG_ERROR([For --enable-stealth=XOR_VAL, XOR_VAL must be numeric.])
    16811768                if test "${enableval}" -lt 127 || test "${enableval}" -gt 255; then
    16821769                        if test x"${enableval}" = x0
     
    16841771                                :
    16851772                        else
    1686                                 AC_MSG_ERROR([--enable-stealth: XOR_VAL must be in the range 127 to 255])
     1773                                AC_MSG_ERROR([For --enable-stealth=XOR_VAL, XOR_VAL must be in the range 127 to 255.])
    16871774                        fi
    16881775                fi
     
    17041791        if test "x${enableval}" != "xyes"; then
    17051792                echo "${enableval}" | grep ['[^0123456789]'] >/dev/null 2>&1 &&
    1706                         AC_MSG_ERROR([--enable-micro-stealth: XOR_VAL must be numeric])
     1793                        AC_MSG_ERROR([For --enable-micro-stealth=XOR_VAL, XOR_VAL must be numeric.])
    17071794                if test "${enableval}" -lt 127 || test "${enableval}" -gt 255; then
    17081795                        if test x"${enableval}" = x0
     
    17101797                                :
    17111798                        else
    1712                                 AC_MSG_ERROR([--enable-micro-stealth: XOR_VAL must be in the range 127 to 255])
     1799                                AC_MSG_ERROR([For --enable-micro-stealth=XOR_VAL, XOR_VAL must be in the range 127 to 255.])
    17131800                        fi
    17141801                fi
     
    17501837        fi
    17511838        echo "${myident}" | grep ['[^0123456789]'] >/dev/null 2>&1 || \
    1752                 AC_MSG_ERROR([--enable-identity: need username, not UID])
     1839                AC_MSG_ERROR([With --enable-identity=USER, please supply a username, not a UID.])
    17531840        myident_uid=`(cat /etc/passwd; ypcat passwd) 2>/dev/null |\
    17541841          grep "^${myident}:" | awk -F: '{ print $3; }'`
    17551842        if test x"${myident_uid}" = x; then
    1756           AC_MSG_WARN([--enable-identity: user ${myident} will be added upon install])
     1843          AC_MSG_WARN([Option --enable-identity used, user ${myident} will be added upon install.])
    17571844          need_user_install=1
    17581845        fi
     
    17941881           sh_syscalltable=`egrep '(D|d|R|r) sys_call_table' ${khidemap} | awk '{print $1}'`
    17951882           if test x"$sh_syscalltable" = x; then
    1796                 AC_MSG_ERROR([--enable-khide: symbol sys_call_table not found in ${khidemap}])
     1883                AC_MSG_ERROR([Option --enable-khide cannot be used since the symbol sys_call_table was not found in ${khidemap}.])
    17971884           fi
    17981885           sh_syscalltable="0x${sh_syscalltable}"
    17991886           install_name_len=`echo ${install_name} | awk '{ print(length()); }'`
    18001887           if test "${install_name_len}" -gt 15 ; then
    1801                 AC_MSG_ERROR([--enable-khide: install_name exceeds 15 char length limit])
     1888                AC_MSG_ERROR([If --enable-khide is used, install_name must not exceed a length of 15 chars.])
    18021889           fi
    18031890           AC_DEFINE(SH_USE_LKM)
     
    18331920                sh_list_modules=`egrep 'd modules$' ${khidemap} | awk '{print $1}'`
    18341921                if test x"$sh_list_modules" = x; then
    1835                         AC_MSG_ERROR([--enable-khide: symbol modules not found in ${khidemap}])
     1922                        AC_MSG_ERROR([Option --enable-khide cannot be used, since the symbol modules was not found in ${khidemap}.])
    18361923                fi
    18371924                sh_list_modules="0x${sh_list_modules}"
     
    19262013                        :
    19272014                else
    1928                         AC_MSG_ERROR([--with-kcheck: cannot find system map ${systemmap}])
     2015                        AC_MSG_ERROR([Option --with-kcheck=systemmap cannot be used, because system map ${systemmap} does not exist.])
    19292016                fi
    19302017        fi
     
    19422029        AC_MSG_RESULT(${my_key_A} ${my_key_B})
    19432030        if test "x${my_key_A}" = x; then
    1944                 AC_MSG_ERROR([--enable-base: first base key has zero length])
     2031                AC_MSG_ERROR([Option --enable-base=B1,B2 used with invalid first base key (zero length).])
    19452032        fi
    19462033        if test "x${my_key_B}" = x; then
    1947                 AC_MSG_ERROR([--enable-base: second base key has zero length])
     2034                AC_MSG_ERROR([Option --enable-base=B1,B2 used with invalid second base key (zero length).])
    19482035        fi
    19492036        echo "${my_key_A}" | grep ['[^0123456789]'] >/dev/null 2>&1 &&
    1950                 AC_MSG_ERROR([--enable-base: base key must be numeric in the range 0 to 2147483647])
     2037                AC_MSG_ERROR([For --enable-base=B1,B2,  B1 and B2 must be numeric in the range 0 to 2147483647.])
    19512038        echo "${my_key_B}" | grep ['[^0123456789]'] >/dev/null 2>&1 &&
    1952                 AC_MSG_ERROR([--enable-base: base key must be numeric in the range 0 to 2147483647])
     2039                AC_MSG_ERROR([For --enable-base=B1,B2,  B1 and B2 must be numeric in the range 0 to 2147483647.])
    19532040        ],
    19542041        [
     
    20922179                else
    20932180                        if test "x${mychk}" = "x"; then
    2094                                 AC_MSG_ERROR([--with-checksum: gpg CHKSUM not specified])
     2181                                AC_MSG_ERROR([Option --with-checksum=CHKSUM: checksum CHKSUM of the gpg binary not specified.])
    20952182                        fi
    20962183                fi
     
    21192206                        echo "${withval0}" | \
    21202207                        grep ['[^0123456789abcdefABCDEF]'] >/dev/null 2>&1 &&
    2121                         AC_MSG_ERROR([--with-fp: invalid character(s) in FINGERPRINT=${withval0}])
     2208                        AC_MSG_ERROR([In option --with-fp=FINGERPRINT, there is an invalid character(s) in FINGERPRINT=${withval0}.])
    21222209                        sh_len=`echo ${withval0} | wc -c | sed 's% %%g'`
    21232210                        sh_len0=`expr ${sh_len} \- 1`
     
    21292216                                echo "${myfp}" | sed 's,.*:,,g' | sed 's, ,,g' | sed 's,\(.\),\1:,g' | awk '{ split($0, arr, ":"); m = length($1)/2; print "#ifndef FINGERPRINT_H"; print "#define FINGERPRINT_H"; printf "char gpgfp[%d];\n", m+1; for (i=1; i <= m; i++) printf "gpgfp[%d] = %c%s%c;\n", i-1, 39, arr[i], 39; printf "gpgfp[%d] = %c%c0%c;\n", m, 39, 92, 39; print "#endif"; }' > sh_gpg_fp.h
    21302217                        else
    2131                                 AC_MSG_ERROR([--with-fp: length (${sh_len0}) of FINGERPRINT ${withval0} incorrect])
     2218                                AC_MSG_ERROR([In option --with-fp=FINGERPRINT, the length (${sh_len0}) of FINGERPRINT ${withval0} is incorrect.])
    21322219                        fi
    21332220                else
    2134                         AC_MSG_ERROR([--with-fp: usage error ... FINGERPRINT=yes])
     2221                        AC_MSG_ERROR([For option --with-fp=FINGERPRINT, FINGERPRINT=yes is invalid, please specify a valid key fingerprint.])
    21352222                fi
    21362223        fi
     
    21552242                if test "x${sh_tmp}" != "x1"
    21562243                then
    2157                         AC_MSG_ERROR([--with-recipient: invalid mail address ${sh_item}])
     2244                        AC_MSG_ERROR([Option --with-recipient=ADDR used with invalid mail address ${sh_item}.])
    21582245                fi
    21592246                ;;
    21602247                *)
    2161                 AC_MSG_ERROR([--with-recipient: invalid mail address ${sh_item}])
     2248                AC_MSG_ERROR([Option --with-recipient=ADDR used with invalid mail address ${sh_item}.])
    21622249                ;;
    21632250                esac
     
    21922279        do
    21932280                echo "${sh_tmp1}" | grep ['[^0123456789]'] >/dev/null 2>&1 &&
    2194                         AC_MSG_ERROR([--with-trusted: non-numeric UID in ${withval}])
     2281                        AC_MSG_ERROR([Option --with-trusted=UID used with non-numeric UID in ${withval}.])
    21952282                if test "x${sh_tmp1}" = "x0"
    21962283                then
     
    23882475                        echo "It should be REQ_FROM_SERVER/some/local/path"
    23892476                fi
    2390                 AC_MSG_ERROR([--with-data-file: invalid path ${withval}])
     2477                AC_MSG_ERROR([Option --with-data-file=FILE used with invalid path ${withval}.])
    23912478        fi
    23922479        ],
  • trunk/depend.dep

    r180 r183  
    1818sh_entropy.o: $(srcsrc)/sh_entropy.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_calls.h $(srcinc)/sh_pthread.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/CuTest.h
    1919sh_forward.o: $(srcsrc)/sh_forward.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_forward.h $(srcinc)/sh_srp.h $(srcinc)/sh_fifo.h $(srcinc)/sh_tools.h $(srcinc)/sh_entropy.h $(srcinc)/sh_html.h $(srcinc)/sh_mail.h $(srcinc)/sh_socket.h $(srcinc)/sh_static.h $(srcinc)/rijndael-api-fst.h $(srcinc)/sh_readconf.h $(srcinc)/zAVLTree.h $(srcinc)/sh_extern.h
    20 sh_modules.o: $(srcsrc)/sh_modules.c Makefile config_xor.h $(srcinc)/sh_modules.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utmp.h $(srcinc)/sh_mounts.h $(srcinc)/sh_userfiles.h $(srcinc)/sh_kern.h $(srcinc)/sh_suidchk.h $(srcinc)/sh_processcheck.h $(srcinc)/sh_portcheck.h
     20sh_modules.o: $(srcsrc)/sh_modules.c Makefile config_xor.h $(srcinc)/sh_modules.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utmp.h $(srcinc)/sh_mounts.h $(srcinc)/sh_userfiles.h $(srcinc)/sh_kern.h $(srcinc)/sh_suidchk.h $(srcinc)/sh_processcheck.h $(srcinc)/sh_portcheck.h $(srcinc)/sh_logmon.h
    2121sh_utmp.o: $(srcsrc)/sh_utmp.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_utmp.h $(srcinc)/sh_pthread.h
    2222sh_kern.o: $(srcsrc)/sh_kern.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_kern.h sh_ks_xor.h $(srcinc)/sh_unix.h $(srcinc)/sh_hash.h
     
    6969dnmalloc.o: $(srcsrc)/dnmalloc.c Makefile config.h
    7070sh_port2proc.o: $(srcsrc)/sh_port2proc.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error_min.h $(srcinc)/sh_utils.h $(srcinc)/sh_pthread.h
     71sh_log_parse_syslog.o: $(srcsrc)/sh_log_parse_syslog.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h
     72sh_log_parse_pacct.o: $(srcsrc)/sh_log_parse_pacct.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h
     73sh_log_parse_apache.o: $(srcsrc)/sh_log_parse_apache.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h
     74sh_log_evalrule.o: $(srcsrc)/sh_log_evalrule.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h $(srcinc)/zAVLTree.h
     75sh_log_check.o: $(srcsrc)/sh_log_check.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h $(srcinc)/sh_modules.h
  • trunk/depend.sum

    r180 r183  
    1 2749055739
     13470897936
  • trunk/docs/Changelog

    r181 r183  
    1 2.4.7:
     12.5.0:
     2        * fixed constness in trustfile interface
    23        * remove libprelude 0.8 support (obsolete)
    34        * sh_forward.c: increase TIME_OUT_DEF to 900 secs
  • trunk/include/sh_cat.h

    r170 r183  
    157157#ifdef SH_USE_USERFILES
    158158 MSG_USERFILES_SUMMARY,
     159#endif
     160
     161#ifdef USE_LOGFILE_MONITOR
     162 MSG_LOGMON_CHKS,
     163 MSG_LOGMON_CHKE,
     164 MSG_LOGMON_MISS,
     165 MSG_LOGMON_EOPEN,
     166 MSG_LOGMON_EREAD,
     167 MSG_LOGMON_REP,
     168 MSG_LOGMON_SUM,
    159169#endif
    160170
  • trunk/include/sh_string.h

    r169 r183  
    1919/* concat string to sh_string
    2020 */
    21 sh_string * sh_string_cat_lchar(sh_string * s, char * str, size_t len);
     21sh_string * sh_string_cat_lchar(sh_string * s, const char * str, size_t len);
     22
     23/* add char array to end of string */
     24sh_string * sh_string_add_from_char(sh_string * s, const char * str);
    2225
    2326/* set sh_string from string
    2427 */
    25 sh_string * sh_string_set_from_char(sh_string * s, char * str);
     28sh_string * sh_string_set_from_char(sh_string * s, const char * str);
    2629
    2730/* create new sh_string from array of given length
    2831 */
    29 sh_string * sh_string_new_from_lchar(char * str, size_t len);
     32sh_string * sh_string_new_from_lchar(const char * str, size_t len);
    3033
    31 #define sh_string_copy(a) ((a) ? sh_string_new_from_lchar(((a)->str), ((a)->len)) : NULL)
     34#define sh_string_copy(a)  ((a) ? sh_string_new_from_lchar(((a)->str), ((a)->len)) : NULL)
     35#define sh_string_add(a,b) ((a && b) ? sh_string_add_from_lchar((a), ((b)->str), ((b)->len)) : NULL)
    3236
    3337/* create new sh_string from three arrays of given length
    3438 */
    35 sh_string * sh_string_new_from_lchar3(char * str1, size_t len1,
    36                                       char * str2, size_t len2,
    37                                       char * str3, size_t len3);
     39sh_string * sh_string_new_from_lchar3(const char * str1, size_t len1,
     40                                      const char * str2, size_t len2,
     41                                      const char * str3, size_t len3);
    3842
    3943/* Truncate to desired length.
     
    4549sh_string * sh_string_grow(sh_string * s, size_t increase);
    4650
     51/* Read a string from a file, with maxlen. Return 0 on EOF,
     52 * -1 on error, and -2 if a line exceeds maxlen.
     53 */
     54size_t sh_string_read(sh_string * s, FILE * fp, size_t maxlen);
     55
     56/* Split array at delim in at most nfields fields.
     57 * Empty fields are returned as empty (zero-length) strings.
     58 * Leading and trailing WS are removed from token.
     59 * The number of fields is returned in 'nfields', their
     60 * lengths in 'lengths'.
     61 * A single delimiter will return two empty fields.
     62 */
     63char ** split_array(char *line, unsigned int * nfields,
     64                    char delim, size_t * lengths);
     65
     66/* Split array at whitespace in at most nfields fields.
     67 * Multiple whitespaces are collapsed.
     68 * Empty fields are returned as empty (zero-length) strings.
     69 * The number of fields is returned in nfields.
     70 * An empty string will return zero fields.
     71 * If nfields < actual fields, last string will be remainder.
     72 */
     73char ** split_array_ws(char *line, unsigned int * nfields, size_t * lengths);
     74
     75/* Replaces fields in s with 'replacement'. Fields are given
     76 * in the ordered array ovector, comprising ovecnum pairs
     77 * ovector[i], ovector[i+1] which list offset of first char
     78 * of field, offset of first char after field (this is how
     79 * the pcre library does it).
     80 */ 
     81sh_string * sh_string_replace(const sh_string * s,
     82                              const int * ovector, int ovecnum,
     83                              const char * replacement, size_t rlen);
     84
    4785#endif
  • trunk/include/sh_unix.h

    r174 r183  
    243243/* check a file
    244244 */
    245 int tf_trust_check (char * file, int mode);
     245int tf_trust_check (const char * file, int mode);
    246246
    247247/* initialize group vector
  • trunk/include/slib.h

    r174 r183  
    405405  /* Check whether file is trustworthy.
    406406   */
    407   int sl_trustfile(char * path, uid_t * ok, uid_t * bad);
     407  int sl_trustfile(const char * path, uid_t * ok, uid_t * bad);
    408408
    409409  /* Check whether file is trustworthy.
    410410   */
    411   int sl_trustfile_euid(char * filename, uid_t euid);
     411  int sl_trustfile_euid(const char * filename, uid_t euid);
    412412
    413413  /* purge list of trusted users
  • trunk/src/sh_cat.c

    r180 r183  
    9797#ifdef SH_USE_KERN
    9898  /* FreeBSD */
    99   { MSG_KERN_POLICY, SH_ERR_SEVERE,  EVENT, N_("msg=\"POLICY KERNEL BSD syscall table: new: %#lx old: %#lx\" syscall=\"%03d %s\"") },
    100   { MSG_KERN_POL_CO, SH_ERR_SEVERE,  EVENT, N_("msg=\"POLICY KERNEL BSD syscall code: new: %#x,%#x old: %#x,%#x\" syscall=\"%03d %s\"") },
     99  { MSG_KERN_POLICY, SH_ERR_SEVERE,  EVENT, N_("msg=\"POLICY [Kernel] BSD syscall table: new: %#lx old: %#lx\" syscall=\"%03d %s\"") },
     100  { MSG_KERN_POL_CO, SH_ERR_SEVERE,  EVENT, N_("msg=\"POLICY [Kernel] BSD syscall code: new: %#x,%#x old: %#x,%#x\" syscall=\"%03d %s\"") },
    101101
    102102  /* Linux */
     
    143143  { MSG_MNT_CHECK,   SH_ERR_INFO,    RUN,   N_("msg=\"Checking mounts\"")},
    144144  { MSG_MNT_MEMLIST, SH_ERR_ERR,     RUN,   N_("msg=\"Cannot read mount list from memory\"")},
    145   { MSG_MNT_MNTMISS, SH_ERR_WARN,    EVENT, N_("msg=\"Mount missing\" path=\"%s\"")},
    146   { MSG_MNT_OPTMISS, SH_ERR_WARN,    EVENT, N_("msg=\"Mount option missing\" path=\"%s\" option=\"%s\"")},
     145  { MSG_MNT_MNTMISS, SH_ERR_WARN,    EVENT, N_("msg=\"POLICY [Mounts] Mount missing\" path=\"%s\"")},
     146  { MSG_MNT_OPTMISS, SH_ERR_WARN,    EVENT, N_("msg=\"POLICY [Mounts] Mount option missing\" path=\"%s\" option=\"%s\"")},
    147147#endif
    148148
    149149#ifdef SH_USE_USERFILES
    150150  { MSG_USERFILES_SUMMARY,SH_ERR_INFO,    RUN,   N_("msg=\"Checked for users files\"") },
     151#endif
     152
     153#ifdef USE_LOGFILE_MONITOR
     154  { MSG_LOGMON_CHKS, SH_ERR_INFO,    RUN,   N_("msg=\"Checking logfile %s\"") },
     155  { MSG_LOGMON_CHKE, SH_ERR_INFO,    RUN,   N_("msg=\"Finished logfile %s, %lu new records processed\"") },
     156  { MSG_LOGMON_MISS, SH_ERR_ERR,     RUN,   N_("msg=\"Missing logfile %s\"") },
     157  { MSG_LOGMON_EOPEN,SH_ERR_ERR,     RUN,   N_("msg=\"Cannot open logfile %s\"") },
     158  { MSG_LOGMON_EREAD,SH_ERR_ERR,     RUN,   N_("msg=\"Error while reading logfile %s\"") },
     159  { MSG_LOGMON_REP,  SH_ERR_SEVERE,  EVENT, N_("msg=\"POLICY [Logfile] %s\" time=\"%s\" host=\"%s\" path=\"%s\"") },
     160  { MSG_LOGMON_SUM,  SH_ERR_SEVERE,  EVENT, N_("msg=\"POLICY [Logfile] %s\" host=\"%s\" path=\"%s\"") },
    151161#endif
    152162
     
    413423
    414424#ifdef SH_USE_KERN
    415   { MSG_KERN_POLICY, SH_ERR_SEVERE,  EVENT, N_("msg=<POLICY KERNEL BSD syscall table: new: %#lx old: %#lx>, syscall=<%03d %s>") },
    416   { MSG_KERN_POL_CO, SH_ERR_SEVERE,  EVENT, N_("msg=<POLICY KERNEL BSD syscall code: new: %#x,%#x old: %#x,%#x>, syscall=<%03d %s>") },
     425  { MSG_KERN_POLICY, SH_ERR_SEVERE,  EVENT, N_("msg=<POLICY [Kernel] BSD syscall table: new: %#lx old: %#lx>, syscall=<%03d %s>") },
     426  { MSG_KERN_POL_CO, SH_ERR_SEVERE,  EVENT, N_("msg=<POLICY [Kernel] BSD syscall code: new: %#x,%#x old: %#x,%#x>, syscall=<%03d %s>") },
    417427
    418428  { MSG_KERN_SYSCALL,SH_ERR_SEVERE,  EVENT, N_("msg=<POLICY [Kernel] SYSCALL modified> syscall=<%03d %s>, %s") },
     
    461471  { MSG_MNT_CHECK,   SH_ERR_INFO,    RUN,   N_("msg=<Checking mounts>")},
    462472  { MSG_MNT_MEMLIST, SH_ERR_ERR,     RUN,   N_("msg=<Cannot read mount list from memory>")},
    463   { MSG_MNT_MNTMISS, SH_ERR_WARN,    EVENT, N_("msg=<Mount missing>, path=<%s>")},
    464   { MSG_MNT_OPTMISS, SH_ERR_WARN,    EVENT, N_("msg=<Mount option missing>, path=<%s>, option=<%s>")},
     473  { MSG_MNT_MNTMISS, SH_ERR_WARN,    EVENT, N_("msg=<POLICY [Mounts] Mount missing>, path=<%s>")},
     474  { MSG_MNT_OPTMISS, SH_ERR_WARN,    EVENT, N_("msg=<POLICY [Mounts] Mount option missing>, path=<%s>, option=<%s>")},
    465475#endif
    466476
    467477#ifdef SH_USE_USERFILES
    468478  { MSG_USERFILES_SUMMARY,SH_ERR_INFO,    RUN,   N_("msg=<Checked for users files>") },
     479#endif
     480
     481#ifdef USE_LOGFILE_MONITOR
     482  { MSG_LOGMON_CHKS, SH_ERR_INFO,    RUN,   N_("msg=<Checking logfile %s>") },
     483  { MSG_LOGMON_CHKE, SH_ERR_INFO,    RUN,   N_("msg=<Finished logfile %s, %lu new records processed>") },
     484  { MSG_LOGMON_MISS, SH_ERR_ERR,     RUN,   N_("msg=<Missing logfile %s>") },
     485  { MSG_LOGMON_EOPEN,SH_ERR_ERR,     RUN,   N_("msg=<Cannot open logfile %s>") },
     486  { MSG_LOGMON_EREAD,SH_ERR_ERR,     RUN,   N_("msg=<Error while reading logfile %s>") },
     487  { MSG_LOGMON_REP,  SH_ERR_SEVERE,  EVENT, N_("msg=<POLICY [Logfile] %s> time=<%s> host=<%s> path=<%s>") },
     488  { MSG_LOGMON_SUM,  SH_ERR_SEVERE,  EVENT, N_("msg=<POLICY [Logfile] %s> host=<%s> path=<%s>") },
    469489#endif
    470490
  • trunk/src/sh_getopt.c

    r182 r183  
    535535  if (num > 0) fputc (',', stdout);
    536536  fputs (_(" ports"), stdout); ++num;
     537#endif
     538#ifdef USE_LOGFILE_MONITOR
     539  if (num > 0) fputc (',', stdout);
     540  fputs (_(" logfile monitor"), stdout); ++num;
    537541#endif
    538542  if (num == 0)
  • trunk/src/sh_modules.c

    r149 r183  
    1616#include "sh_processcheck.h"
    1717#include "sh_portcheck.h"
     18#include "sh_logmon.h"
    1819
    1920sh_mtype modList[] = {
     
    130131#endif
    131132
     133#ifdef USE_LOGFILE_MONITOR
     134  {
     135    N_("LOGMON"),
     136    -1,
     137    sh_log_check_init,
     138    sh_log_check_timer,
     139    sh_log_check_check,
     140    sh_log_check_cleanup,
     141    sh_log_check_reconf,
     142
     143    N_("[LogMon]"),
     144    sh_log_check_table,
     145    PTHREAD_MUTEX_INITIALIZER,
     146  },
     147#endif
     148
    132149  {
    133150    NULL,
  • trunk/src/sh_processcheck.c

    r170 r183  
    13111311      clean_list (&list_fake);
    13121312    }
     1313
    13131314  SH_MUTEX_UNLOCK(mutex_proc_check);
    13141315
  • trunk/src/sh_string.c

    r171 r183  
    108108
    109109    setnext:
    110       lengths[i] = (a-s);
     110      lengths[i] = (size_t) (a-s); /* a >= s always */
    111111      arr[i] = s;
    112112      ++i;
     
    184184                }
    185185            }
    186           lengths[i] = (a-s);
     186          lengths[i] = (size_t)(a-s); /* a >= s always */
    187187          arr[i]     = s;
    188188          ++i;
     
    266266}
    267267
    268 sh_string * sh_string_cat_lchar(sh_string * s, char * str, size_t len)
     268sh_string * sh_string_cat_lchar(sh_string * s, const char * str, size_t len)
    269269{
    270270  if (sl_ok_adds(len, s->siz) == SL_TRUE)
     
    283283}
    284284
    285 sh_string * sh_string_set_from_char(sh_string * s, char * str)
     285sh_string * sh_string_set_from_char(sh_string * s, const char * str)
    286286{
    287287  size_t len = strlen(str);
     
    296296}
    297297
    298 sh_string * sh_string_new_from_lchar(char * str, size_t len)
     298sh_string * sh_string_add_from_char(sh_string * s, const char * str)
     299{
     300  size_t len   = strlen(str);
     301  size_t avail = (s->siz - s->len);
     302
     303  if ((len+1) > avail)
     304    {
     305      (void) sh_string_grow(s, ((len+1) - avail) );
     306    }
     307  memcpy(&(s->str[s->len]), str, (len+1));
     308  s->len += len;
     309  return s;
     310}
     311
     312sh_string * sh_string_new_from_lchar(const char * str, size_t len)
    299313{
    300314  sh_string * s;
     
    308322}
    309323
    310 sh_string * sh_string_new_from_lchar3(char * str1, size_t len1,
    311                                       char * str2, size_t len2,
    312                                       char * str3, size_t len3)
     324sh_string * sh_string_new_from_lchar3(const char * str1, size_t len1,
     325                                      const char * str2, size_t len2,
     326                                      const char * str3, size_t len3)
    313327{
    314328  sh_string * s;
  • trunk/src/sh_unix.c

    r175 r183  
    10641064
    10651065#if defined(HOST_IS_CYGWIN) || defined(__cygwin__) || defined(__CYGWIN32__) || defined(__CYGWIN__)
    1066 int tf_trust_check (char * file, int mode)
     1066int tf_trust_check (const char * file, int mode)
    10671067{
    10681068  (void) file;
     
    10711071}
    10721072#else
    1073 int tf_trust_check (char * file, int mode)
     1073int tf_trust_check (const char * file, int mode)
    10741074{
    10751075  char * tmp;
  • trunk/src/slib.c

    r174 r183  
    26522652static struct sl_trustfile_store * sl_trusted_files = NULL;
    26532653
    2654 void sl_add_trusted_file(char * filename, uid_t teuid)
     2654static void sl_add_trusted_file(const char * filename, uid_t teuid)
    26552655{
    26562656  struct sl_trustfile_store *new = SH_ALLOC(sizeof(struct sl_trustfile_store));
     
    26642664}
    26652665
    2666 char * sl_check_trusted_file(char * filename, uid_t teuid)
     2666static const char * sl_check_trusted_file(const char * filename, uid_t teuid)
    26672667{
    26682668  struct sl_trustfile_store *new = sl_trusted_files;
     
    26782678}
    26792679
    2680 void sl_clear_trusted_file(struct sl_trustfile_store * file)
     2680static void sl_clear_trusted_file(struct sl_trustfile_store * file)
    26812681{
    26822682  if (file)
     
    26902690}
    26912691
    2692 int sl_trustfile_euid(char * filename, uid_t teuid)
     2692int sl_trustfile_euid(const char * filename, uid_t teuid)
    26932693{
    26942694  long          status;
  • trunk/src/trustfile.c

    r171 r183  
    319319
    320320/* not static to circumvent stupid gcc 4 bug */
    321 int getfname(char *fname, char *rbuf, int rsz)
     321int getfname(const char *fname, char *rbuf, int rsz)
    322322{
    323323#ifndef TRUST_MAIN
     
    678678}
    679679
    680 int sl_trustfile(char *fname, uid_t *okusers, uid_t *badusers)
     680int sl_trustfile(const char *fname, uid_t *okusers, uid_t *badusers)
    681681{
    682682  char fexp[MAXFILENAME];       /* file name fully expanded        */
  • trunk/test/testcompile.sh

    r172 r183  
    304304        [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
    305305        #
    306         ${TOP_SRCDIR}/configure --quiet  --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test  --enable-static --enable-suidcheck --enable-process-check > /dev/null 2>> test_log
     306        ${TOP_SRCDIR}/configure --quiet  --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test  --enable-static --enable-suidcheck --enable-process-check --enable-logfile-monitor > /dev/null 2>> test_log
    307307        #
    308308        let "num = num + 1" >/dev/null
     
    390390        # test standalone compilation with --with-nocl=PW
    391391        #
    392         TEST="${S}standalone w/nocl${E}"
    393         #
    394         if test -r "Makefile"; then
    395                 $MAKE clean
    396         fi
    397         #
    398         ${TOP_SRCDIR}/configure --quiet  --prefix=$PW_DIR --enable-nocl="owl" --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log   
     392        TEST="${S}standalone w/nocl w/logmon${E}"
     393        #
     394        if test -r "Makefile"; then
     395                $MAKE clean
     396        fi
     397        #
     398        ${TOP_SRCDIR}/configure --quiet  --prefix=$PW_DIR --enable-nocl="owl" --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test  --enable-logfile-monitor > /dev/null 2>> test_log   
    399399        #
    400400        let "num = num + 1" >/dev/null
     
    468468
    469469        #
    470         # test standalone compilation w/logwatch
     470        # test standalone compilation w/loginwatch
    471471        #
    472472        TEST="${S}standalone w/login-watch${E}"
     
    637637        [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
    638638        #
    639         ${TOP_SRCDIR}/configure --quiet --enable-network=client  --enable-static --enable-srp --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test   --with-timeserver=127.0.0.1 > /dev/null 2>> test_log   
     639        ${TOP_SRCDIR}/configure --quiet --enable-network=client  --enable-static --enable-srp --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test   --with-timeserver=127.0.0.1   --enable-logfile-monitor > /dev/null 2>> test_log   
    640640        #
    641641        let "num = num + 1" >/dev/null
     
    693693            fi
    694694            #
    695             ${TOP_SRCDIR}/configure --quiet --enable-network=client  --enable-srp --with-gpg=$GPG  --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log   
     695            ${TOP_SRCDIR}/configure --quiet --enable-network=client  --enable-srp --with-gpg=$GPG  --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test   --enable-logfile-monitor > /dev/null 2>> test_log   
    696696            #
    697697            let "num = num + 1" >/dev/null
     
    757757        fi
    758758        #
    759         ${TOP_SRCDIR}/configure --quiet --enable-network=client --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log   
     759        ${TOP_SRCDIR}/configure --quiet --enable-network=client --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test   --enable-logfile-monitor > /dev/null 2>> test_log   
    760760        #
    761761        let "num = num + 1" >/dev/null
Note: See TracChangeset for help on using the changeset viewer.