Legend:
- Unmodified
- Added
- Removed
-
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.