Changeset 579
- Timestamp:
- May 14, 2023, 10:08:17 PM (18 months ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/config.h.in
r576 r579 690 690 #undef HAVE_MEMMOVE 691 691 692 /* Define to 1 if you have the <memory.h> header file. */693 #undef HAVE_MEMORY_H694 695 692 /* Define to 1 if you have the `memset' function. */ 696 693 #undef HAVE_MEMSET … … 824 821 /* Define to 1 if you have the <stdint.h> header file. */ 825 822 #undef HAVE_STDINT_H 823 824 /* Define to 1 if you have the <stdio.h> header file. */ 825 #undef HAVE_STDIO_H 826 826 827 827 /* Define to 1 if you have the <stdlib.h> header file. */ … … 926 926 #undef HAVE_SYS_SYSMACROS_H 927 927 928 /* Define to 1 if you have the <sys/time.h> header file. */ 929 #undef HAVE_SYS_TIME_H 930 928 931 /* Define to 1 if you have the <sys/types.h> header file. */ 929 932 #undef HAVE_SYS_TYPES_H … … 1070 1073 #undef STAT_MACROS_BROKEN 1071 1074 1072 /* Define to 1 if you have the ANSI C header files. */ 1075 /* Define to 1 if all of the C90 standard headers exist (not just the ones 1076 required in a freestanding environment). This macro is provided for 1077 backward compatibility; new code need not use it. */ 1073 1078 #undef STDC_HEADERS 1074 1079 … … 1082 1087 #undef TIGER_OPT_ASM 1083 1088 1084 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ 1089 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. This 1090 macro is obsolete. */ 1085 1091 #undef TIME_WITH_SYS_TIME 1086 1092 … … 1124 1130 #endif 1125 1131 1126 /* Enable large inode numbers on Mac OS X 10.5. */1127 #ifndef _DARWIN_USE_64_BIT_INODE1128 # define _DARWIN_USE_64_BIT_INODE 11129 #endif1130 1131 1132 /* Number of bits in a file offset, on hosts where this is settable. */ 1132 1133 #undef _FILE_OFFSET_BITS … … 1152 1153 /* Define to the equivalent of the C99 'restrict' keyword, or to 1153 1154 nothing if this is not supported. Do not define if restrict is 1154 supported directly. */1155 supported only directly. */ 1155 1156 #undef restrict 1156 /* Work around a bug in Sun C++: it does not support _Restrict or 1157 __restrict__, even though the corresponding Sun C compiler ends up with 1158 "#define restrict _Restrict" or "#define restrict __restrict__" in the 1159 previous line. Perhaps some future version of Sun C++ will work with 1160 restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ 1161 #if defined __SUNPRO_CC && !defined __RESTRICT 1157 /* Work around a bug in older versions of Sun C++, which did not 1158 #define __restrict__ or support _Restrict or __restrict__ 1159 even though the corresponding Sun C compiler ended up with 1160 "#define restrict _Restrict" or "#define restrict __restrict__" 1161 in the previous line. This workaround can be removed once 1162 we assume Oracle Developer Studio 12.5 (2016) or later. */ 1163 #if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ 1162 1164 # define _Restrict 1163 1165 # define __restrict__ -
trunk/configure.ac
r578 r579 12 12 dnl start 13 13 dnl 14 AM_INIT_AUTOMAKE(samhain, 4.4. 9)14 AM_INIT_AUTOMAKE(samhain, 4.4.10) 15 15 AC_DEFINE([SAMHAIN], 1, [Application is samhain]) 16 16 AC_CANONICAL_HOST … … 1711 1711 fi 1712 1712 mydebugit="yes" 1713 elif test "x${enable_debug}" = "xmem"; then 1714 AC_DEFINE(MEM_DEBUG) 1715 AC_DEFINE(SH_ABORT_ON_ERROR, 1, [Use abort]) 1716 if test "x${myneedg3}" = "xyes"; then 1717 mydebugdef="-g3" 1718 else 1719 mydebugdef="-g" 1720 fi 1721 mydebugit="yes" 1713 1722 elif test "x${enable_debug}" = "xgdb"; then 1714 1723 AC_DEFINE(SH_ABORT_ON_ERROR, 1, [Use abort]) -
trunk/docs/Changelog
r578 r579 1 4.4.10: 2 * fix for (very minor) memleak in sh_unix.c: sh_check_rotated_log() 3 * fix for memleak in sh_files.c: sh_files_checkdir(), not all cases for 4 scandir() covered (issue reported by T. Greulich) 5 1 6 4.4.9: 2 7 * fix for double newline stripping when reading from database -
trunk/src/samhain.c
r550 r579 777 777 sh_hash_hashdelete(); 778 778 sh_files_hle_reg (NULL); 779 (void) sh_ignore_clean (); 779 780 /* 780 781 * Only flush on exit if running as deamon. -
trunk/src/sh_dbIO.c
r578 r579 1415 1415 lpath = ll; 1416 1416 else 1417 /* cppcheck-suppress uninitvar */ 1417 1418 lpath = linkpath; 1418 1419 -
trunk/src/sh_files.c
r565 r579 2315 2315 { 2316 2316 ++theDir->NumDirs; 2317 #if defined(SH_USE_SCANDIR) 2318 free(entryList[entry]); /* scandir() mallocs entries */ 2319 #endif 2317 2320 continue; 2318 2321 } … … 2320 2323 { 2321 2324 ++theDir->NumDirs; 2325 #if defined(SH_USE_SCANDIR) 2326 free(entryList[entry]); /* scandir() mallocs entries */ 2327 #endif 2322 2328 continue; 2323 2329 } -
trunk/src/sh_mem.c
r516 r579 77 77 #endif 78 78 79 /* define MEM_LOG to an absolute filename to enable this */ 79 /* define MEM_LOG to enable this */ 80 /* #define MEM_LOG 1 */ 80 81 #ifdef MEM_LOG 81 82 void sh_mem_dump () … … 83 84 memlist_t * this = memlist; 84 85 FILE * fd; 85 86 static unsigned int nr = 0; 87 char filename[256]; 88 89 snprintf(filename, sizeof(filename), "sh_mem_dump.%04u.%lu", nr, (unsigned long) sh.pid); 90 86 91 SH_MUTEX_RECURSIVE_INIT(mutex_mem); 87 92 SH_MUTEX_RECURSIVE_LOCK(mutex_mem); 88 93 89 fd = fopen( MEM_LOG, "w");94 fd = fopen(filename, "w"); 90 95 if (!fd) 91 96 { 92 perror( MEM_LOG);97 perror(filename); 93 98 _exit(EXIT_FAILURE); 94 99 } … … 103 108 104 109 SH_MUTEX_RECURSIVE_UNLOCK(mutex_mem); 105 _exit(EXIT_SUCCESS); 110 ++nr; 111 /* _exit(EXIT_SUCCESS); */ 112 return; 106 113 } 107 114 #else -
trunk/src/sh_sig.c
r571 r579 1695 1695 #elif defined(WITH_SIGNIFY) 1696 1696 return sh_signify_check_signature (file, what); 1697 #else 1698 return -1; 1697 1699 #endif 1698 1700 } … … 1704 1706 #elif defined(WITH_SIGNIFY) 1705 1707 return sh_signify_extract_signed(fd, SIG_DATASIG); 1708 #else 1709 return -1; 1706 1710 #endif 1707 1711 } … … 1713 1717 #elif defined(WITH_SIGNIFY) 1714 1718 return sh_signify_extract_signed(fd, SIG_DATAONLY); 1719 #else 1720 return -1; 1715 1721 #endif 1716 1722 } … … 1722 1728 #elif defined(WITH_SIGNIFY) 1723 1729 return sh_signify_msg_start(line); 1730 #else 1731 return -1; 1724 1732 #endif 1725 1733 } … … 1731 1739 #elif defined(WITH_SIGNIFY) 1732 1740 return sh_signify_msg_startdata(line); 1741 #else 1742 return -1; 1733 1743 #endif 1734 1744 } … … 1740 1750 #elif defined(WITH_SIGNIFY) 1741 1751 return sh_signify_msg_end(line); 1752 #else 1753 return -1; 1742 1754 #endif 1743 1755 } … … 1749 1761 #elif defined(WITH_SIGNIFY) 1750 1762 return sh_signify_data_end(line); 1763 #else 1764 return -1; 1751 1765 #endif 1752 1766 } -
trunk/src/sh_unix.c
r570 r579 3603 3603 } 3604 3604 } 3605 SH_FREE(rotated_file); 3606 } 3605 } 3606 if (rotated_file) { 3607 SH_FREE(rotated_file); 3608 } 3607 3609 } 3608 3610 return retval; … … 4872 4874 if (0 == retry_lstat(FIL__, __LINE__, path, &buf)) 4873 4875 SL_RETURN( S_TRUE, _("sh_unix_file_exists")); 4874 else 4875 4876 4877 SL_RETURN( S_FALSE, _("sh_unix_file_exists")); 4876 4878 } 4877 4879 … … 4888 4890 if (retry_fstat(FIL__, __LINE__, fd, &buf) == -1) 4889 4891 SL_RETURN( (-1), _("sh_unix_device_readable")); 4890 elseif ( S_ISCHR(buf.st_mode) && 0 != (S_IROTH & buf.st_mode) )4892 if ( S_ISCHR(buf.st_mode) && 0 != (S_IROTH & buf.st_mode) ) 4891 4893 SL_RETURN( (0), _("sh_unix_device_readable")); 4892 else 4893 4894 4895 SL_RETURN( (-1), _("sh_unix_device_readable")); 4894 4896 } 4895 4897
Note:
See TracChangeset
for help on using the changeset viewer.