Changeset 162
- Timestamp:
- Feb 1, 2008, 1:03:47 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile.in
r161 r162 1696 1696 sh_async.o: $(srcsrc)/sh_async.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_calls.h $(srcinc)/sh_error.h 1697 1697 sh_processcheck.o: $(srcsrc)/sh_processcheck.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_modules.h $(srcinc)/sh_processcheck.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_extern.h $(srcinc)/sh_calls.h $(srcinc)/sh_pthread.h $(srcinc)/CuTest.h 1698 sh_portcheck.o: $(srcsrc)/sh_portcheck.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_mem.h $(srcinc)/sh_calls.h $(srcinc)/sh_utils.h $(srcinc)/sh_modules.h $(srcinc)/sh_ pthread.h $(srcinc)/CuTest.h1698 sh_portcheck.o: $(srcsrc)/sh_portcheck.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_mem.h $(srcinc)/sh_calls.h $(srcinc)/sh_utils.h $(srcinc)/sh_modules.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/CuTest.h 1699 1699 sh_pthread.o: $(srcsrc)/sh_pthread.c Makefile config_xor.h $(srcinc)/sh_pthread.h $(srcinc)/sh_calls.h $(srcinc)/sh_modules.h -
trunk/configure.ac
r158 r162 13 13 dnl start 14 14 dnl 15 AM_INIT_AUTOMAKE(samhain, 2.4. 2)15 AM_INIT_AUTOMAKE(samhain, 2.4.3) 16 16 AC_CANONICAL_HOST 17 17 … … 207 207 sys/select.h sys/socket.h netinet/in.h \ 208 208 regex.h glob.h \ 209 linux/ext2_fs.h linux/fs.h ext2fs/ext2_fs.h \209 linux/ext2_fs.h linux/fs.h ext2fs/ext2_fs.h asm/segment.h \ 210 210 elf.h linux/elf.h \ 211 211 paths.h arpa/nameser.h arpa/nameser_compat.h \ … … 1751 1751 if test x"$kernel_version" = xLINUX26 1752 1752 then 1753 1753 AC_MSG_CHECKING([for modlist_lock]) 1754 1754 sh_modlist_lock=`egrep ['[bd] modlist_lock$'] ${khidemap} | awk '{print $1}'` 1755 1755 if test x"$sh_modlist_lock" = x; then 1756 echo "--enable-khide: symbol modlist_lock not found in ${khidemap}"1756 AC_MSG_RESULT(no) 1757 1757 else 1758 1758 sh_modlist_lock="0x${sh_modlist_lock}" 1759 AC_MSG_RESULT([${sh_modlist_lock}]) 1759 1760 AC_DEFINE_UNQUOTED(SH_MODLIST_LOCK, ${sh_modlist_lock}, [The address of the modules list spinlock]) 1760 1761 fi 1761 1762 1763 AC_MSG_CHECKING([for module_mutex]) 1762 1764 sh_modlist_mutex=`egrep ['[bd] module_mutex$'] ${khidemap} | awk '{print $1}'` 1763 1765 if test x"$sh_modlist_mutex" = x; then 1764 echo "--enable-khide: symbol module_mutex not found in ${khidemap}"1766 AC_MSG_RESULT(no) 1765 1767 else 1766 1768 sh_modlist_mutex="0x${sh_modlist_mutex}" 1769 AC_MSG_RESULT([${sh_modlist_mutex}]) 1767 1770 AC_DEFINE_UNQUOTED(SH_MODLIST_MUTEX, ${sh_modlist_mutex}, [The address of the modules list mutex]) 1768 1771 fi … … 1792 1795 AC_MSG_WARN([--enable-khide: headers for the currently-running kernel.]) 1793 1796 fi 1797 1798 AC_MSG_CHECKING([for 2.4 vanilla kernel]) 1794 1799 sh_is_vanilla_kernel=yes 1795 1800 if test -f /lib/modules/${kvers}/build/include/linux/sched.h; then … … 1797 1802 fi 1798 1803 if test x"${sh_is_vanilla_kernel}" = xno; then 1799 echo "This is not a 2.4 vanilla kernel"1804 AC_MSG_RESULT(no) 1800 1805 else 1806 AC_MSG_RESULT(yes) 1801 1807 AC_DEFINE(SH_VANILLA_KERNEL) 1802 1808 fi 1809 1803 1810 fi 1804 1811 ] -
trunk/depend.dep
r149 r162 58 58 sh_prelink.o: $(srcsrc)/sh_prelink.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_extern.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h 59 59 sh_static.o: $(srcsrc)/sh_static.c Makefile config_xor.h $(srcinc)/sh_pthread.h 60 sh_portcheck.o: $(srcsrc)/sh_portcheck.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_mem.h $(srcinc)/sh_calls.h $(srcinc)/sh_utils.h $(srcinc)/sh_modules.h $(srcinc)/sh_ pthread.h $(srcinc)/CuTest.h60 sh_portcheck.o: $(srcsrc)/sh_portcheck.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_mem.h $(srcinc)/sh_calls.h $(srcinc)/sh_utils.h $(srcinc)/sh_modules.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/CuTest.h 61 61 sh_processcheck.o: $(srcsrc)/sh_processcheck.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_modules.h $(srcinc)/sh_processcheck.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_extern.h $(srcinc)/sh_calls.h $(srcinc)/sh_pthread.h $(srcinc)/CuTest.h 62 62 sh_prelude_old.o: $(srcsrc)/sh_prelude_old.c Makefile config_xor.h $(srcinc)/slib.h $(srcinc)/sh_mem.h $(srcinc)/sh_cat.h $(srcinc)/sh_error_min.h $(srcinc)/sh_prelude.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h -
trunk/depend.sum
r149 r162 1 1156805991 1 2613935365 -
trunk/docs/Changelog
r161 r162 1 1 2.4.3: 2 * sh_kern.c: don't require asm/segment.h for kernel check module 3 * use global var with pid of initial thread instead of getpid(), 4 since LinuxThreads returns different value in each thread (problem 5 reported by Steffen Mueller) 6 * sh_kern.c: no inode check for pci rom (creates spurious messages) 7 * slib.c: eliminate prototype for vsnprintf (compile problem reported 8 by eddy_cs) 2 9 * Makefile.in: fix missing dependency on 'encode' for $(OBJECTS) 3 10 (reported by Matthias Ehrmann) 4 11 5 2.4.2 :12 2.4.2 (17-01-2008): 6 13 * fix broken option --with-checksum (reported by halosfan), 7 14 regression test added -
trunk/include/samhain.h
r156 r162 249 249 250 250 char prg_name[8]; 251 252 UINT64 pid; 251 253 252 254 sh_sh_df exec; -
trunk/src/samhain.c
r160 r162 362 362 sh.prg_name[7] = '\0'; 363 363 #endif 364 365 sh.pid = (UINT64) getpid(); 364 366 365 367 /* The flags. -
trunk/src/sh_hash.c
r160 r162 1206 1206 { 1207 1207 dlog(1, FIL__, __LINE__, 1208 _("The checksum of the file signature database has changed since startup.\n")); 1208 _("The checksum of the file signature database has changed since startup: %s -> %s\n"), 1209 sh.data.hash, sh_tiger_hash (file_path('D', 'R'), fd, TIGER_NOLIM, 1210 hashbuf, sizeof(hashbuf))); 1209 1211 sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_E_AUTH, 1210 1212 ( (NULL == file_path('D', 'R')) ? _("(null)") : -
trunk/src/sh_kern.c
r146 r162 266 266 * Interrupt Descriptor Table 267 267 */ 268 268 #ifdef HAVE_ASM_SEGMENT_H 269 269 #include <asm/segment.h> 270 #endif 270 271 271 272 #define SH_MAXIDT 256 … … 276 277 { 277 278 switch (segment) { 279 #ifdef __KERNEL_CS 278 280 case __KERNEL_CS: 279 281 return _("KERNEL_CS"); 282 #endif 283 #ifdef __KERNEL_DS 280 284 case __KERNEL_DS: 281 285 return _("KERNEL_DS"); 286 #endif 287 #ifdef __USER_CS 282 288 case __USER_CS: 283 289 return _("USER_CS"); 290 #endif 291 #ifdef __USER_DS 284 292 case __USER_DS: 285 293 return _("USER_DS"); 294 #endif 286 295 default: 287 296 return _("unknown"); … … 903 912 (void) sl_strlcpy (theFile.fullpath, pcipath, PATH_MAX); 904 913 theFile.check_mask = sh_files_maskof(SH_LEVEL_READONLY); 905 theFile.check_mask &= ~(MODI_MTM|MODI_CTM );914 theFile.check_mask &= ~(MODI_MTM|MODI_CTM|MODI_INO); 906 915 CLEAR_SH_FFLAG_REPORTED(theFile.file_reported); 907 916 theFile.attr_string = NULL; … … 938 947 struct stat buf; 939 948 int fd; 949 int status; 940 950 941 951 if (0 == stat(pcipath, &buf)) … … 945 955 */ 946 956 fd = open ( pcipath, O_RDWR ); 947 write( fd, "1", 1 ); 957 do { 958 status = write( fd, "1", 1 ); 959 } while (status < 0 && errno == EINTR); 948 960 close ( fd ); 949 961 … … 951 963 952 964 fd = open ( pcipath, O_RDWR ); 953 write( fd, "0", 1 ); 965 do { 966 status = write( fd, "0", 1 ); 967 } while (status < 0 && errno == EINTR); 954 968 close ( fd ); 955 969 } -
trunk/src/sh_portcheck.c
r149 r162 129 129 #include "sh_utils.h" 130 130 #include "sh_modules.h" 131 #include "sh_static.h" 131 132 #include "sh_pthread.h" 132 133 … … 897 898 898 899 SH_MUTEX_LOCK(mutex_resolv); 899 hent = gethostbyname(portchk_hostname);900 hent = sh_gethostbyname(portchk_hostname); 900 901 901 902 while (hent && hent->h_addr_list[i] && (iface_list.used < SH_IFACE_MAX)) -
trunk/src/sh_unix.c
r160 r162 1866 1866 1867 1867 setsid(); /* should not fail */ 1868 sh.pid = (UINT64) getpid(); 1868 1869 1869 1870 switch (aud_fork(FIL__, __LINE__)) { … … 1876 1877 */ 1877 1878 sh_unix_memlock(); 1879 sh.pid = (UINT64) getpid(); 1878 1880 1879 1881 } else { … … 3844 3846 sl_close(fd); 3845 3847 3846 if (status == (int) getpid())3848 if (status > 0 && (unsigned int) status == sh.pid) 3847 3849 { 3848 3850 if (filename != NULL) … … 4007 4009 SL_ENTER(_("sh_unix_lock")); 4008 4010 4009 sprintf (myPid, "%ld\n", (long) getpid());/* known to fit */4011 sprintf (myPid, "%ld\n", (long) sh.pid); /* known to fit */ 4010 4012 4011 4013 fd = sl_open_safe_rdwr (lockfile, SL_YESPRIV); /* fails if file exists */ -
trunk/src/slib.c
r144 r162 577 577 } 578 578 579 #if !defined(HOST_IS_I86SOLARIS)580 #if !defined (_GNU_SOURCE) && !defined(__linux__)581 /* flawfinder: ignore */582 extern int vsnprintf ( char *str, size_t n,583 const char *format, va_list ap );584 #endif585 #endif586 579 587 580 #if !defined (VA_COPY) -
trunk/test/testhash.sh
r159 r162 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 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 40 40 # 41 41 fail=0
Note:
See TracChangeset
for help on using the changeset viewer.