Changeset 203
- Timestamp:
- Dec 7, 2008, 7:26:17 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r202 r203 35 35 AC_SUBST(BUILD_CC) 36 36 37 if test "x$GCC" = "xyes"; then38 GCC_STACK_PROTECT_LIB39 GCC_STACK_PROTECT_CC40 GCC_PIE_CC41 fi42 43 37 AC_HEADER_STDC 44 38 dnl … … 49 43 50 44 51 AC_MSG_CHECKING([for host-specific issues])45 AC_MSG_CHECKING([for OS specific issues]) 52 46 mydebugflag=no 53 47 myneedg3=no … … 57 51 sh_use_lcaps="undef" 58 52 dnmalloc_ok=yes 53 sh_use_pie=yes 59 54 60 55 case "$host_os" in … … 64 59 AC_DEFINE(HOST_IS_LINUX) 65 60 AC_DEFINE(HAVE_EXT2_IOCTLS) 66 AC_MSG_RESULT( LINUXuse ioctl to get e2fs flags)61 AC_MSG_RESULT(use ioctl to get e2fs flags) 67 62 case "$host_cpu" in 68 63 i*86*) … … 80 75 CFLAGS="$CFLAGS -O2 -assume noaligned_objects" 81 76 myneedg3=yes 82 AC_MSG_RESULT( OSF1compiler needs assume noaligned_objects)77 AC_MSG_RESULT(compiler needs assume noaligned_objects) 83 78 else 84 79 AC_MSG_RESULT(none) … … 89 84 AC_DEFINE(HOST_IS_CYGWIN) 90 85 dnmalloc_ok=no 91 AC_MSG_RESULT( CYGWINno trusted paths and no dnmalloc)86 AC_MSG_RESULT(no trusted paths and no dnmalloc) 92 87 ;; 93 88 94 89 *darwin*) 95 90 AC_DEFINE(HOST_IS_DARWIN) 96 AC_MSG_RESULT( DARWINcheck resource forks)91 AC_MSG_RESULT(check resource forks) 97 92 ;; 98 93 94 *freebsd7*) 95 AC_DEFINE(HOST_IS_FREEBSD) 96 selectconfig=freebsd 97 case "$host_cpu" in 98 amd64) 99 sh_use_pie=no 100 dnmalloc_ok=no 101 AC_MSG_RESULT([no dnmalloc and broken compiler toolchain]) 102 ;; 103 *) 104 AC_MSG_RESULT(none) 105 ;; 106 esac 107 ;; 108 99 109 *freebsd*) 100 110 AC_DEFINE(HOST_IS_FREEBSD) … … 107 117 selectconfig=freebsd 108 118 dnmalloc_ok=no 109 AC_MSG_RESULT( OpenBSDdnmalloc does not work with pthreads)119 AC_MSG_RESULT(dnmalloc does not work with pthreads) 110 120 ;; 111 121 … … 113 123 mynetbsd=yes 114 124 selectconfig=netbsd 115 AC_MSG_RESULT( NETBSDbug with libresolve)125 AC_MSG_RESULT(bug with libresolve) 116 126 ;; 117 127 … … 122 132 i*86) 123 133 AC_DEFINE(HOST_IS_I86SOLARIS) 124 AC_MSG_RESULT( SOLARIS I86vsnprintf prototype)134 AC_MSG_RESULT(vsnprintf prototype) 125 135 ;; 126 136 *) … … 195 205 AC_DEFINE_UNQUOTED(UID_CAST, ${uid_cast}) 196 206 197 dnl Test whether gcc supports -Wno-empty-body198 dnl Suppresses warnings from glibc pthread_cleanup_pop199 dnl200 GCC_WEMPTY_BODY201 207 202 208 … … 316 322 AC_HEADER_EGREP(comp_t, sys/acct.h, AC_DEFINE(HAVE_COMP_T, , 317 323 [Define if <sys/acct.h> uses the COMP_T type.])) 324 AC_HEADER_EGREP([struct acct_v3], sys/acct.h, AC_DEFINE(HAVE_ACCT_V3, , 325 [Define if <sys/acct.h> has struct acct_v3.])) 318 326 ) 319 327 … … 624 632 625 633 AM_SA_SIGACTION_WORKS 634 635 if test "x$GCC" = "xyes"; then 636 GCC_STACK_PROTECT_LIB 637 GCC_STACK_PROTECT_CC 638 GCC_PIE_CC 639 fi 626 640 627 641 dnl ***************************************** … … 975 989 ) 976 990 977 if test x$enable_static = xyes; then978 :979 else980 LDFLAGS="$LDFLAGS $PIE_LDFLAGS"981 CFLAGS="$CFLAGS $PIE_CFLAGS"982 fi983 984 991 if test x"${mytclient}" = x-DSH_STANDALONE -o x"${mytclient}" = x-DSH_WITH_CLIENT; 985 992 then … … 993 1000 CHECK_ZLIB() 994 1001 fi 1002 1003 if test x$enable_static = xyes; then 1004 : 1005 else 1006 if test x$sh_use_pie = xyes; then 1007 LDFLAGS="$LDFLAGS $PIE_LDFLAGS" 1008 CFLAGS="$CFLAGS $PIE_CFLAGS" 1009 fi 1010 fi 1011 995 1012 996 1013 # … … 1440 1457 LIBS="-lpcre $LIBS" 1441 1458 ], 1442 AC_MSG_ERROR([The --enable-logfile-monitor option requires libpcre. For compiling the pcre development package is needed.]) 1459 [ 1460 AC_CHECK_HEADER(pcre/pcre.h, 1461 [ 1462 AC_DEFINE(USE_LOGFILE_MONITOR, 1, [Define if you want the logfile monitor module.]) 1463 AC_DEFINE(HAVE_PCRE_PCRE_H, 1, [Define if you have pcre/pcre.h.]) 1464 LIBS="-lpcre $LIBS" 1465 ], 1466 AC_MSG_ERROR([The --enable-logfile-monitor option requires libpcre. For compiling the pcre development package is needed.]) 1467 ) 1468 ] 1443 1469 ) 1444 1470 fi … … 1584 1610 1585 1611 fi 1612 1613 dnl Test whether gcc supports -Wno-empty-body 1614 dnl Suppresses warnings from glibc pthread_cleanup_pop 1615 dnl 1616 GCC_WEMPTY_BODY 1586 1617 1587 1618 AC_MSG_CHECKING([which random module to use]) -
trunk/docs/Changelog
r202 r203 1 1 2.5.1: 2 * workaround for freebsd7 amd64 lossage (compiler toolchain, 3 no mmap to 32bit address space) 4 * samhain-install.sh: check for presence of stealth_template.ps 5 before trying to create it 2 6 * use -Wno-empty-body if supported to suppress warnings about 3 7 glibc pthread_cleanup_pop implementation -
trunk/samhain-install.sh.in
r191 r203 1415 1415 IFS=${OIFS} 1416 1416 1417 if test x"${CONVERT}" = x 1418 then 1419 echo "${0}: cannot find ImageMagick convert utility in PATH=${PATH}" 1420 exit 1 1421 fi 1422 1423 PATH=${OPATH} 1424 1425 if test -f stealth_template.jpg 1426 then 1427 test -z "$verbose" || echo " ${CONVERT} +compress stealth_template.jpg stealth_template.ps" 1428 "${CONVERT}" +compress stealth_template.jpg stealth_template.ps 1429 else 1430 echo "${0}: cannot find file stealth_template.jpg" 1431 exit 1 1432 fi 1417 if test -f stealth_template.ps 1418 then 1419 PATH=${OPATH} 1420 else 1421 if test x"${CONVERT}" = x 1422 then 1423 echo "${0}: cannot find ImageMagick convert utility in PATH=${PATH}" 1424 exit 1 1425 fi 1426 1427 PATH=${OPATH} 1428 1429 if test -f stealth_template.jpg 1430 then 1431 test -z "$verbose" || echo " ${CONVERT} +compress stealth_template.jpg stealth_template.ps" 1432 "${CONVERT}" +compress stealth_template.jpg stealth_template.ps 1433 else 1434 echo "${0}: cannot find file stealth_template.jpg" 1435 exit 1 1436 fi 1437 fi 1433 1438 1434 1439 -
trunk/src/make-tests.sh
r172 r203 20 20 #include <stdio.h> 21 21 #include "CuTest.h" 22 #include "config.h" 22 23 23 24 ' -
trunk/src/samhain.c
r174 r203 824 824 ino = (long) buf.st_ino; 825 825 826 if (NULL == (dp = opendir( "/proc")))826 if (NULL == (dp = opendir(_("/proc")))) 827 827 { 828 828 return NULL; -
trunk/src/sh_gpg.c
r198 r203 257 257 char cc3[32]; 258 258 char cc4[SH_PATHBUF+32]; 259 char cc5[32] = "--no-tty";259 char cc5[32]; 260 260 #endif 261 261 … … 283 283 /* sl_strlcpy (cc4, sh.effective.home, SH_PATHBUF+32); */ 284 284 sl_strlcpy (cc4, homedir, SH_PATHBUF+32); 285 sl_strlcat (cc4, _("/.gnupg"), SH_PATHBUF+32); 285 sl_strlcat (cc4, _("/.gnupg"), SH_PATHBUF+32); 286 sl_strlcpy (cc5, _("--no-tty"), 32); 286 287 287 288 /* fprintf(stderr, "YULE: homedir=%s\n", homedir); */ … … 416 417 envp[0] = malloc (len); /* free() ok */ 417 418 if (envp[0] != NULL) 418 sl_snprintf (envp[0], len, "HOME=%s", sh.effective.home);419 sl_snprintf (envp[0], len, _("HOME=%s"), sh.effective.home); 419 420 envp[1] = NULL; 420 421 } -
trunk/src/sh_log_check.c
r199 r203 14 14 15 15 /* Debian/Ubuntu: libpcre3-dev */ 16 #ifdef HAVE_PCRE_PCRE_H 17 #include <pcre/pcre.h> 18 #else 16 19 #include <pcre.h> 20 #endif 17 21 18 22 #include "samhain.h" -
trunk/src/sh_log_evalrule.c
r186 r203 15 15 16 16 /* Debian/Ubuntu: libpcre3-dev */ 17 #ifdef HAVE_PCRE_PCRE_H 18 #include <pcre/pcre.h> 19 #else 17 20 #include <pcre.h> 21 #endif 22 23 #ifndef PCRE_NO_AUTO_CAPTURE 24 #define PCRE_NO_AUTO_CAPTURE 0 25 #endif 18 26 19 27 #include "samhain.h" -
trunk/src/sh_log_parse_apache.c
r186 r203 29 29 30 30 /* Debian/Ubuntu: libpcre3-dev */ 31 #ifdef HAVE_PCRE_PCRE_H 32 #include <pcre/pcre.h> 33 #else 31 34 #include <pcre.h> 35 #endif 32 36 33 37 #include "samhain.h" -
trunk/src/sh_log_parse_pacct.c
r199 r203 227 227 sh_string * sh_read_pacct (sh_string * record, struct sh_logfile * logfile) 228 228 { 229 #if defined(__linux__) 229 #if defined(__linux__) && defined(HAVE_ACCT_V3) 230 230 # define STRUCT_ACCT struct acct_v3 231 231 #else -
trunk/src/sh_processcheck.c
r183 r203 196 196 char * tmp; 197 197 198 sl_snprintf (path, sizeof(path), "/proc/%ld/exe", (unsigned long) pid);198 sl_snprintf (path, sizeof(path), _("/proc/%ld/exe"), (unsigned long) pid); 199 199 200 200 if (0 == retry_lstat(FIL__, __LINE__, path, &sbuf) && S_ISLNK(sbuf.st_mode)) … … 203 203 } 204 204 205 sl_snprintf (path, sizeof(path), "/proc/%ld/file", (unsigned long) pid);205 sl_snprintf (path, sizeof(path), _("/proc/%ld/file"), (unsigned long) pid); 206 206 207 207 if (0 == retry_lstat(FIL__, __LINE__, path, &sbuf) && S_ISLNK(sbuf.st_mode)) … … 210 210 } 211 211 212 sl_snprintf (path, sizeof(path), "/proc/%ld/path/a.out", (unsigned long) pid);212 sl_snprintf (path, sizeof(path), _("/proc/%ld/path/a.out"), (unsigned long) pid); 213 213 214 214 if (0 == retry_lstat(FIL__, __LINE__, path, &sbuf) && S_ISLNK(sbuf.st_mode)) -
trunk/src/sh_unix.c
r200 r203 2083 2083 int r; 2084 2084 2085 while((r = waitpid(pid, &status, W CONTINUED|WUNTRACED)) != pid && r != -1) ;2085 while((r = waitpid(pid, &status, WUNTRACED)) != pid && r != -1) ; 2086 2086 2087 2087 #if !defined(USE_UNO) -
trunk/src/sh_userfiles.c
r149 r203 215 215 * So, compare longest strings first */ 216 216 if( s == NULL ) /* The default */ new->level = default_level; 217 else if ( strstr(s, "attributes")!= NULL ) new->level = SH_LEVEL_ATTRIBUTES;218 else if ( strstr(s, "allignore") != NULL ) new->level = SH_LEVEL_ALLIGNORE;219 else if ( strstr(s, "noignore") != NULL ) new->level = SH_LEVEL_NOIGNORE;220 else if ( strstr(s, "logfiles") != NULL ) new->level = SH_LEVEL_LOGFILES;221 else if ( strstr(s, "readonly") != NULL ) new->level = SH_LEVEL_READONLY;222 else if ( strstr(s, "loggrow") != NULL ) new->level = SH_LEVEL_LOGGROW;223 else if ( strstr(s, "user0") != NULL ) new->level = SH_LEVEL_USER0;224 else if ( strstr(s, "user1") != NULL ) new->level = SH_LEVEL_USER1;225 else if ( strstr(s, "user2") != NULL ) new->level = SH_LEVEL_USER2;226 else if ( strstr(s, "user3") != NULL ) new->level = SH_LEVEL_USER3;227 else if ( strstr(s, "user4") != NULL ) new->level = SH_LEVEL_USER4;228 else if ( strstr(s, "prelink") != NULL ) new->level = SH_LEVEL_PRELINK;217 else if ( strstr(s, _("attributes"))!= NULL ) new->level = SH_LEVEL_ATTRIBUTES; 218 else if ( strstr(s, _("allignore")) != NULL ) new->level = SH_LEVEL_ALLIGNORE; 219 else if ( strstr(s, _("noignore")) != NULL ) new->level = SH_LEVEL_NOIGNORE; 220 else if ( strstr(s, _("logfiles")) != NULL ) new->level = SH_LEVEL_LOGFILES; 221 else if ( strstr(s, _("readonly")) != NULL ) new->level = SH_LEVEL_READONLY; 222 else if ( strstr(s, _("loggrow")) != NULL ) new->level = SH_LEVEL_LOGGROW; 223 else if ( strstr(s, _("user0")) != NULL ) new->level = SH_LEVEL_USER0; 224 else if ( strstr(s, _("user1")) != NULL ) new->level = SH_LEVEL_USER1; 225 else if ( strstr(s, _("user2")) != NULL ) new->level = SH_LEVEL_USER2; 226 else if ( strstr(s, _("user3")) != NULL ) new->level = SH_LEVEL_USER3; 227 else if ( strstr(s, _("user4")) != NULL ) new->level = SH_LEVEL_USER4; 228 else if ( strstr(s, _("prelink")) != NULL ) new->level = SH_LEVEL_PRELINK; 229 229 else /* The default */ new->level = default_level; 230 230 -
trunk/src/slib.c
r200 r203 1094 1094 { 1095 1095 #ifndef HAVE_STRSTR 1096 insigned int i;1096 unsigned int i; 1097 1097 size_t needle_len; 1098 1098 size_t haystack_len; -
trunk/test/testhash.sh
r196 r203 37 37 fi 38 38 # 39 ${TOP_SRCDIR}/configure --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-debug --enable-logfile-monitor39 ${TOP_SRCDIR}/configure --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-debug 40 40 # 41 41 fail=0
Note:
See TracChangeset
for help on using the changeset viewer.