Changeset 590
- Timestamp:
- Oct 27, 2025, 6:57:03 PM (6 hours ago)
- Location:
- trunk
- Files:
-
- 14 edited
-
configure.ac (modified) (1 diff)
-
docs/Changelog (modified) (1 diff)
-
src/rijndael-api-fst.c (modified) (1 diff)
-
src/sh_files.c (modified) (3 diffs)
-
src/sh_hash.c (modified) (1 diff)
-
src/sh_log_parse_pacct.c (modified) (1 diff)
-
src/sh_portcheck.c (modified) (1 diff)
-
src/sh_registry.c (modified) (2 diffs)
-
src/sh_suidchk.c (modified) (13 diffs)
-
src/sh_unix.c (modified) (3 diffs)
-
src/sh_utils.c (modified) (1 diff)
-
src/sh_xfer_server.c (modified) (2 diffs)
-
test/testrun_1f.sh (modified) (1 diff)
-
test/testrun_2g.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r588 r590 4 4 dnl AU_ALIAS([_AC_INIT_help], [SH_INIT_HELP]) 5 5 6 AC_INIT([samhain],[4.5. 2])6 AC_INIT([samhain],[4.5.3]) 7 7 AC_CONFIG_SRCDIR(src/samhain.c) 8 8 -
trunk/docs/Changelog
r588 r590 7 7 * move logfile monitor module from PCRE to PCRE2 (PCRE is end of life and no 8 8 longer actively maintained) 9 * fix obsolete gpg option --secret-keyring used in samhainadmin script 10 * fix some more warnings, mostly false positives from cppcheck 9 11 10 12 4.5.2 (02-01-2025): -
trunk/src/rijndael-api-fst.c
r481 r590 103 103 104 104 /* memcpy(key->keyMaterial, keyMaterial, keyLen/8); */ 105 /* cppcheck-suppress uninitvar */ 105 106 memcpy(key->keyMaterial, temp, keyLen/8); 106 107 } -
trunk/src/sh_files.c
r579 r590 338 338 here = (dirstack_t *) inptr; 339 339 340 /* cppcheck-suppress uninitStructMember */ 340 341 if (here->name != NULL) 341 342 SH_FREE(here->name); … … 892 893 static int sh_files_parse_mask (unsigned long * mask, const char * str) 893 894 { 894 int l , i = 0, act = 0, k = 0;895 int l = 0, i = 0, act = 0, k = 0; 895 896 char myword[64]; 896 897 … … 1396 1397 here = (sh_globstack_t *) inptr; 1397 1398 1399 /* cppcheck-suppress uninitStructMember */ 1398 1400 if (here->name != NULL) 1399 1401 SH_FREE(here->name); -
trunk/src/sh_hash.c
r583 r590 1287 1287 #if defined(__linux__) || defined(HAVE_STAT_FLAGS) 1288 1288 p.attributes = (UINT32) buf->attributes; 1289 #else 1290 p.attributes = (UINT32) 0; 1289 1291 #endif 1290 1292 p.linkmode = (UINT32) buf->linkmode; -
trunk/src/sh_log_parse_pacct.c
r588 r590 252 252 253 253 #if defined(ac_flagx) 254 /* cppcheck-suppress syntaxError */ 254 255 expand_flags(rec.ac_flagx, fl); 255 256 #else -
trunk/src/sh_portcheck.c
r560 r590 957 957 int retval; 958 958 char * p = NULL; 959 char buf[8] ;959 char buf[8] = { 0 }; 960 960 #ifndef TEST_ONLY 961 961 char errmsg[256]; -
trunk/src/sh_registry.c
r541 r590 905 905 qError, 906 906 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), 907 /* cppcheck-suppress uninitvar */ 907 908 (LPTSTR) &lpMsgBuf, 908 909 0, NULL ); … … 1007 1008 1008 1009 /* Returns 0 if !subkey */ 1009 /* cppcheck-suppress uninitvar */1010 /* cppcheck-suppress legacyUninitvar */ 1010 1011 return CheckThisSubkey (topKey, subkey, path, isSingle, 0); 1011 1012 } -
trunk/src/sh_suidchk.c
r583 r590 1019 1019 SL_ENTER(_("sh_suidchk_check_internal")); 1020 1020 1021 if (iname == NULL) 1022 { 1023 TPT((0, FIL__, __LINE__ , _("msg=<directory name is NULL>\n"))); 1024 SL_RETURN( (-1), _("sh_suidchk_check_internal")); 1025 } 1026 1027 if (sig_urgent > 0) { 1028 SL_RETURN( (0), _("sh_suidchk_check_internal")); 1029 } 1030 1021 1031 /* Take the address to keep gcc from putting it into a register. 1022 1032 * Avoids the 'clobbered by longjmp' warning. … … 1024 1034 sh_dummy_idirlist = (void*) &dirlist; 1025 1035 sh_dummy_itmp = (void*) &tmp; 1026 1027 if (iname == NULL)1028 {1029 TPT((0, FIL__, __LINE__ , _("msg=<directory name is NULL>\n")));1030 SL_RETURN( (-1), _("sh_suidchk_check_internal"));1031 }1032 1033 if (sig_urgent > 0) {1034 SL_RETURN( (0), _("sh_suidchk_check_internal"));1035 }1036 1036 1037 1037 thisDir = opendir (iname); … … 1047 1047 SH_MUTEX_UNLOCK(mutex_thread_nolog); 1048 1048 SH_FREE(tmp); 1049 sh_dummy_idirlist = NULL; 1050 sh_dummy_itmp = NULL; 1049 1051 SL_RETURN( (-1), _("sh_suidchk_check_internal")); 1050 1052 } … … 1412 1414 kill_sh_dirlist (dirlist_orig); 1413 1415 1416 sh_dummy_idirlist = NULL; 1417 sh_dummy_itmp = NULL; 1418 1414 1419 SL_RETURN( (0), _("sh_suidchk_check_internal")); 1415 1420 } … … 2193 2198 Return "unknown" if its filesystem type is unknown. */ 2194 2199 2195 static char * 2196 filesystem_type (char * path, char * relpath, struct stat * statp) 2200 static char * filesystem_type (char * path, char * relpath, struct stat * statp) 2197 2201 { 2198 2202 static char *current_fstype = NULL; … … 2218 2222 void * sh_dummy_2229_type; 2219 2223 2220 static char * 2221 filesystem_type_uncached (path, relpath, statp) 2222 char *path; 2223 char *relpath; 2224 struct stat *statp; 2224 static char * filesystem_type_uncached (char * path, char * relpath, struct stat * statp) 2225 2225 { 2226 2226 char * type = NULL; … … 2234 2234 struct mntent *mnt; 2235 2235 2236 if (path == NULL || relpath == NULL) 2237 return NULL; 2238 2236 2239 /* Take the address to keep gcc from putting it into a register. 2237 2240 * Avoids the 'clobbered by longjmp' warning. 2238 2241 */ 2239 2242 sh_dummy_2229_type = (void *) &type; 2240 2241 if (path == NULL || relpath == NULL)2242 return NULL;2243 2243 2244 2244 mfp = setmntent (table, "r"); … … 2250 2250 _("filesystem_type_uncached") ); 2251 2251 SH_MUTEX_UNLOCK(mutex_thread_nolog); 2252 sh_dummy_2229_type = NULL; 2252 2253 return NULL; 2253 2254 } … … 2378 2379 _("filesystem_type_uncached") ); 2379 2380 SH_MUTEX_UNLOCK(mutex_thread_nolog); 2381 sh_dummy_2229_type = NULL; 2380 2382 return NULL; 2381 2383 } … … 2406 2408 _("filesystem_type_uncached") ); 2407 2409 SH_MUTEX_UNLOCK(mutex_thread_nolog); 2410 sh_dummy_2229_type = NULL; 2408 2411 return NULL; 2409 2412 } … … 2453 2456 _("filesystem_type_uncached") ); 2454 2457 SH_MUTEX_UNLOCK(mutex_thread_nolog); 2458 sh_dummy_2229_type = NULL; 2455 2459 return NULL; 2456 2460 } … … 2492 2496 fstype_known = (int)(type != NULL); 2493 2497 2498 sh_dummy_2229_type = NULL; 2494 2499 return sh_util_strdup (type ? type : "unknown"); 2495 2500 } … … 2500 2505 part of CP. */ 2501 2506 2502 static int 2503 xatoi (cp) 2504 const char *cp; 2507 static int xatoi (const char * cp) 2505 2508 { 2506 2509 int val; -
trunk/src/sh_unix.c
r583 r590 17 17 /* along with this program; if not, write to the Free Software */ 18 18 /* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 19 20 /* cppcheck-suppress-file unknownMacro */ 19 21 20 22 #include "config_xor.h" … … 2412 2414 char AsciiTime[81]; /* local time */ 2413 2415 time_t time_now; 2414 struct tm * time_ptr ;2416 struct tm * time_ptr = NULL; 2415 2417 #if defined(HAVE_PTHREAD) && defined (_POSIX_THREAD_SAFE_FUNCTIONS) && defined(HAVE_LOCALTIME_R) 2416 2418 struct tm time_tm; … … 2546 2548 #endif 2547 2549 } 2550 2548 2551 if (time_ptr != NULL) 2549 2552 { -
trunk/src/sh_utils.c
r583 r590 769 769 char K[KEY_BLOCK]; 770 770 char outer[KEY_BLOCK]; 771 char * inner ;771 char * inner = NULL; 772 772 UINT32 * h1; 773 773 UINT32 * h2; -
trunk/src/sh_xfer_server.c
r583 r590 484 484 here = (client_t *) inptr; 485 485 486 /* cppcheck-suppress uninitStructMember */ 486 487 if (here->hostname != NULL) 487 488 SH_FREE(here->hostname); … … 506 507 here = (alias_t *) inptr; 507 508 509 /* cppcheck-suppress uninitStructMember */ 508 510 if (here->alias != NULL) 509 511 SH_FREE(here->alias); -
trunk/test/testrun_1f.sh
r550 r590 63 63 prep_sign_file () 64 64 { 65 scripts/samhainadmin.pl -s ./test/gnupg/-m R $1 >/dev/null66 scripts/samhainadmin.pl -s ./test/gnupg/-k 8A0B337A -m E $1 >/dev/null65 scripts/samhainadmin.pl -m R $1 >/dev/null 66 scripts/samhainadmin.pl -k 8A0B337A -m E $1 >/dev/null 67 67 } 68 68 -
trunk/test/testrun_2g.sh
r577 r590 336 336 UUID=$(uuidgen) 337 337 if [ x"$1" != "xnosig" ]; then 338 scripts/samhainadmin.pl - s ./test/gnupg/ -k 8A0B337A -m E ./file.delta >/dev/null338 scripts/samhainadmin.pl -k 8A0B337A -m E ./file.delta >/dev/null 339 339 fi 340 340 if [ x"$1" == "xnodelta" ]; then … … 612 612 testrun2g_signrc () 613 613 { 614 scripts/samhainadmin.pl -s ./test/gnupg/-m R $1 >/dev/null615 scripts/samhainadmin.pl -s ./test/gnupg/-k 8A0B337A -m E $1 >/dev/null614 scripts/samhainadmin.pl -m R $1 >/dev/null 615 scripts/samhainadmin.pl -k 8A0B337A -m E $1 >/dev/null 616 616 } 617 617 618 618 testrun2g_signdb () 619 619 { 620 scripts/samhainadmin.pl -s ./test/gnupg/-k 8A0B337A -m E ./.samhain_file >/dev/null620 scripts/samhainadmin.pl -k 8A0B337A -m E ./.samhain_file >/dev/null 621 621 } 622 622
Note:
See TracChangeset
for help on using the changeset viewer.