Changeset 286
- Timestamp:
- Jun 6, 2010, 7:20:55 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile.in
r279 r286 1690 1690 sh_utils.o: $(srcsrc)/sh_utils.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_entropy.h $(srcinc)/sh_pthread.h 1691 1691 sh_error.o: $(srcsrc)/sh_error.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_cat.h $(srcinc)/sh_database.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_nmail.h $(srcinc)/sh_forward.h $(srcinc)/sh_prelude.h $(srcinc)/sh_pthread.h $(srcinc)/sh_tools.h $(srcinc)/sh_extern.h 1692 sh_files.o: $(srcsrc)/sh_files.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_tiger.h $(srcinc)/sh_hash.h $(srcinc)/sh_ignore.h $(srcinc)/zAVLTree.h 1692 sh_files.o: $(srcsrc)/sh_files.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_tiger.h $(srcinc)/sh_hash.h $(srcinc)/sh_ignore.h $(srcinc)/zAVLTree.h $(srcinc)/CuTest.h 1693 1693 sh_getopt.o: $(srcsrc)/sh_getopt.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_getopt.h $(srcinc)/sh_files.h $(srcinc)/sh_utils.h $(srcinc)/sh_mail.h $(srcinc)/sh_forward.h $(srcinc)/sh_hash.h $(srcinc)/sh_extern.h 1694 1694 sh_readconf.o: $(srcsrc)/sh_readconf.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_calls.h $(srcinc)/sh_error.h $(srcinc)/sh_extern.h $(srcinc)/sh_files.h $(srcinc)/sh_forward.h $(srcinc)/sh_gpg.h $(srcinc)/sh_hash.h $(srcinc)/sh_ignore.h $(srcinc)/sh_database.h $(srcinc)/sh_mail.h $(srcinc)/sh_modules.h $(srcinc)/sh_nmail.h $(srcinc)/sh_prelink.h $(srcinc)/sh_prelude.h $(srcinc)/sh_tiger.h $(srcinc)/sh_tools.h $(srcinc)/sh_unix.h $(srcinc)/sh_utils.h -
trunk/configure.ac
r285 r286 12 12 dnl start 13 13 dnl 14 AM_INIT_AUTOMAKE(samhain, 2.7. 0)14 AM_INIT_AUTOMAKE(samhain, 2.7.1) 15 15 AC_DEFINE([SAMHAIN], 1, [Application is samhain]) 16 16 AC_CANONICAL_HOST -
trunk/depend.dep
r279 r286 5 5 sh_utils.o: $(srcsrc)/sh_utils.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_entropy.h $(srcinc)/sh_pthread.h 6 6 sh_error.o: $(srcsrc)/sh_error.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_cat.h $(srcinc)/sh_database.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_nmail.h $(srcinc)/sh_forward.h $(srcinc)/sh_prelude.h $(srcinc)/sh_pthread.h $(srcinc)/sh_tools.h $(srcinc)/sh_extern.h 7 sh_files.o: $(srcsrc)/sh_files.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_tiger.h $(srcinc)/sh_hash.h $(srcinc)/sh_ignore.h $(srcinc)/zAVLTree.h 7 sh_files.o: $(srcsrc)/sh_files.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_tiger.h $(srcinc)/sh_hash.h $(srcinc)/sh_ignore.h $(srcinc)/zAVLTree.h $(srcinc)/CuTest.h 8 8 sh_getopt.o: $(srcsrc)/sh_getopt.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_getopt.h $(srcinc)/sh_files.h $(srcinc)/sh_utils.h $(srcinc)/sh_mail.h $(srcinc)/sh_forward.h $(srcinc)/sh_hash.h $(srcinc)/sh_extern.h 9 9 sh_readconf.o: $(srcsrc)/sh_readconf.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_calls.h $(srcinc)/sh_error.h $(srcinc)/sh_extern.h $(srcinc)/sh_files.h $(srcinc)/sh_forward.h $(srcinc)/sh_gpg.h $(srcinc)/sh_hash.h $(srcinc)/sh_ignore.h $(srcinc)/sh_database.h $(srcinc)/sh_mail.h $(srcinc)/sh_modules.h $(srcinc)/sh_nmail.h $(srcinc)/sh_prelink.h $(srcinc)/sh_prelude.h $(srcinc)/sh_tiger.h $(srcinc)/sh_tools.h $(srcinc)/sh_unix.h $(srcinc)/sh_utils.h -
trunk/depend.sum
r279 r286 1 3 8259149501 3590773370 -
trunk/docs/Changelog
r285 r286 1 1 2.7.1: 2 * samhain_kmem.c: fix compile problems 3 * fix problems with config file parser: increase max. line length, 4 support quoting/escaping of filenames (as in 'ls --quoting-style=c') 2 5 * check for pcre_dfa_exec (not available in old versions 3 6 of libpcre, reported by Shinoj) -
trunk/src/kern_head.c
r279 r286 98 98 char * kmap; 99 99 100 101 /* first, try read()102 */103 int ret_old = kmem_read (fd, addr, buf, len);104 105 if (ret_old == 0)106 return ret_old;107 108 if (verbose)109 fprintf(stderr, "kmem_mmap: read() failed, now trying mmap()\n");110 111 100 sz = getpagesize(); /* unistd.h */ 112 101 … … 117 106 if (kmap == MAP_FAILED) 118 107 { 108 /* then, try read() 109 */ 110 if (verbose) 111 fprintf(stderr, "kmem_mmap: mmap() failed, now trying read()\n"); 112 113 if (0 == sh_kern_kmem_read (fd, addr, buf, len)) 114 return 0; 115 119 116 perror("kmem_mmap: mmap"); 120 117 return -1; 121 118 } 119 122 120 memcpy (buf, &kmap[roff], len); 123 121 -
trunk/src/samhain_kmem.c
r279 r286 15 15 #define _(string) string 16 16 17 #include <linux/version.h> 17 18 #include <linux/module.h> 18 19 #include <linux/kernel.h> … … 36 37 #include <linux/backing-dev.h> 37 38 #include <linux/bootmem.h> 39 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,22) 38 40 #include <linux/splice.h> 41 #endif 39 42 #include <linux/pfn.h> 40 #include <linux/version.h>41 43 42 44 #include <asm/uaccess.h> … … 514 516 { 515 517 loff_t ret; 516 518 519 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35) 520 mutex_lock(&file->f_dentry->d_inode->i_mutex); 521 #else 517 522 mutex_lock(&file->f_path.dentry->d_inode->i_mutex); 523 #endif 524 518 525 switch (orig) { 519 526 case 0: … … 533 540 ret = -EINVAL; 534 541 } 542 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35) 543 mutex_unlock(&file->f_dentry->d_inode->i_mutex); 544 #else 535 545 mutex_unlock(&file->f_path.dentry->d_inode->i_mutex); 546 #endif 536 547 return ret; 537 548 } -
trunk/src/sh_files.c
r256 r286 23 23 #include <stdlib.h> 24 24 #include <string.h> 25 #include <ctype.h> 25 26 #include <limits.h> 26 27 … … 72 73 #undef FIL__ 73 74 #define FIL__ _("sh_files.c") 75 76 static char * sh_files_C_dequote (char * s, size_t * length) 77 { 78 size_t i, j, len = *length; 79 int flag = 0; 80 char *p, *q, *po, *pend; 81 82 /* search for backslash 83 */ 84 for (i = 0; i < len; ++i) 85 { 86 if (s[i] == '\\') 87 { 88 flag = 1; 89 break; 90 } 91 } 92 93 if (flag == 0 || *s == '\0') 94 return s; 95 96 po = SH_ALLOC(len+1); *po = '\0'; p = po; pend = &po[len]; 97 98 i = 0; j = 0; q = s; 99 100 do 101 { 102 if (*q == '\\') 103 { 104 ++q; 105 106 if (*q == '\0') 107 { *p = *q; flag = 0; break; } 108 else if (*q == 'a') 109 { *p = '\a'; ++p; ++q; } 110 else if (*q == 'b') 111 { *p = '\b'; ++p; ++q; } 112 else if (*q == 'f') 113 { *p = '\f'; ++p; ++q; } 114 else if (*q == 'n') 115 { *p = '\n'; ++p; ++q; } 116 else if (*q == 'r') 117 { *p = '\r'; ++p; ++q; } 118 else if (*q == 't') 119 { *p = '\t'; ++p; ++q; } 120 else if (*q == 'v') 121 { *p = '\v'; ++p; ++q; } 122 else if (*q == '\\') 123 { *p = '\\'; ++p; ++q; } 124 else if (*q == '\'') 125 { *p = '\''; ++p; ++q; } 126 else if (*q == '"') 127 { *p = '"'; ++p; ++q; } 128 else if (*q == 'x') 129 { 130 if (isxdigit((int) q[1]) && isxdigit((int) q[2])) 131 { 132 /* hexadecimal value following */ 133 unsigned char cc = (16 * sh_util_hexchar(q[1])) 134 + sh_util_hexchar(q[2]); 135 *p = (char) cc; 136 ++p; q += 3; 137 } 138 else 139 { 140 *p = '\0'; flag = 0; break; 141 } 142 } 143 else if (isdigit((int)*q)) 144 { 145 if (isdigit((int) q[1]) && q[1] < '8' && 146 isdigit((int) q[2]) && q[2] < '8') 147 { 148 /* octal value following */ 149 char tmp[4]; unsigned char cc; 150 tmp[0] = *q; ++q; tmp[1] = *q; ++q; tmp[2] = *q; ++q; 151 tmp[3] = '\0'; 152 cc = strtol(tmp, NULL, 8); 153 *p = (char) cc; ++p; 154 } 155 else 156 { 157 *p = '\0'; flag = 0; break; 158 } 159 } 160 else 161 { 162 /* invalid escape sequence */ 163 *p = '\0'; flag = 0; break; 164 } 165 } 166 else 167 { 168 *p = *q; 169 ++p; ++q; 170 } 171 } while (*q && p <= pend); 172 173 SL_REQUIRE (p <= pend, _("p <= pend")); 174 175 if (flag) 176 { 177 *p = '\0'; 178 *length = strlen(po); 179 } 180 else 181 { 182 SH_FREE(po); 183 po = NULL; 184 *length = 0; 185 } 186 187 SL_REQUIRE (*length <= len, _("*length <= len")); 188 189 SH_FREE(s); 190 return po; 191 } 74 192 75 193 extern int flag_err_debug; … … 999 1117 } 1000 1118 1001 if (str_s == NULL )1119 if (str_s == NULL || str_s[0] == '\0') 1002 1120 SL_RETURN((-1),_("sh_files_pushfile")); 1003 1121 1004 1122 len = sl_strlen(str_s); 1123 1124 if ( (str_s[0] == '"' && str_s[len-1] == '"' ) || 1125 (str_s[0] == '\'' && str_s[len-1] == '\'') ) 1126 { 1127 if (len < 3) 1128 SL_RETURN((-1),_("sh_files_pushfile")); 1129 --len; 1130 p = sh_util_strdup_l(&str_s[1], len); 1131 p[len-1] = '\0'; 1132 --len; 1133 } 1134 else 1135 { 1136 p = sh_util_strdup_l(str_s, len); 1137 } 1138 1139 p = sh_files_C_dequote(p, &len); 1140 if (!p || len == 0) 1141 SL_RETURN((-1), _("sh_files_pushdir")); 1005 1142 1006 1143 if (len >= PATH_MAX) … … 1008 1145 /* Name too long 1009 1146 */ 1010 tmp = sh_util_safe_name ( str_s);1147 tmp = sh_util_safe_name (p); 1011 1148 sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_FI_2LONG, 1012 1149 tmp); … … 1014 1151 SL_RETURN((-1),_("sh_files_pushfile")); 1015 1152 } 1016 else if (len < 1) 1017 { 1018 /* Should not happen (str_s == NULL caught further above) 1019 */ 1020 SL_RETURN((-1),_("sh_files_pushfile")); 1021 } 1022 else if (str_s[0] != '/') 1153 else if (p[0] != '/') 1023 1154 { 1024 1155 /* Not an absolute path 1025 1156 */ 1026 tmp = sh_util_safe_name ( str_s);1157 tmp = sh_util_safe_name (p); 1027 1158 sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_FI_NOPATH, 1028 1159 tmp); … … 1035 1166 * special case of the root directory. 1036 1167 */ 1037 p = sh_util_strdup (str_s);1038 1168 if (p[len-1] == '/' && len > 1) 1039 1169 { … … 1041 1171 --len; 1042 1172 } 1043 1044 1173 } 1045 1174 … … 1364 1493 } 1365 1494 1366 if (str_s == NULL) 1495 if (str_s == NULL || str_s[0] == '\0') 1496 SL_RETURN((-1),_("sh_files_pushdir")); 1497 1498 len = sl_strlen(str_s); 1499 1500 if ( (str_s[0] == '"' && str_s[len-1] == '"' ) || 1501 (str_s[0] == '\'' && str_s[len-1] == '\'') ) 1502 { 1503 if (len < 3) 1504 SL_RETURN((-1),_("sh_files_pushdir")); 1505 --len; 1506 p = sh_util_strdup_l(&str_s[1], len); 1507 p[len-1] = '\0'; 1508 --len; 1509 } 1510 else 1511 { 1512 p = sh_util_strdup_l(str_s, len); 1513 } 1514 1515 p = sh_files_C_dequote(p, &len); 1516 if (!p || len == 0) 1367 1517 SL_RETURN((-1), _("sh_files_pushdir")); 1368 1369 p = sh_util_strdup (str_s);1370 1518 1371 1519 if (p[0] != '/') … … 1412 1560 else 1413 1561 { 1414 1415 1562 if (tail[len-1] == '/' && len > 1) 1416 1563 { … … 1418 1565 --len; 1419 1566 } 1420 1421 1567 } 1422 1568 … … 2420 2566 2421 2567 #endif 2568 2569 #ifdef SH_CUTEST 2570 #include "CuTest.h" 2571 2572 void Test_file_dequote (CuTest *tc) 2573 { 2574 #if (defined (SH_WITH_CLIENT) || defined (SH_STANDALONE)) 2575 2576 char str1[] = "1234567890"; 2577 char str1a[] = "123456\\\"789\\r"; 2578 char str1b[] = "12345678\\r9"; 2579 char str1c[] = "12345678\\x0a_9"; 2580 char str1d[] = "12345678\\007_9"; 2581 char str1e[] = "123456789\\\\"; 2582 2583 char str2[] = "1234567890\\xw"; 2584 char str3[] = "1234567890\\xw99"; 2585 char str4[] = "1234567890\\0ww"; 2586 char str5[] = "12345\\g67890"; 2587 char str6[] = "1234567890\\009a"; 2588 2589 char *s, *p, *q; 2590 size_t lo, lr; 2591 2592 s = SH_ALLOC(64); sl_strlcpy(s, str1, 64); p = s; lo = strlen(s); lr = lo; 2593 q = sh_files_C_dequote(s, &lr); 2594 CuAssertPtrNotNull(tc, q); 2595 CuAssertTrue(tc, p == q); 2596 CuAssertTrue(tc, lr == lo); 2597 2598 s = SH_ALLOC(64); sl_strlcpy(s, str1a, 64); p = s; lo = strlen(s); lr = lo; 2599 q = sh_files_C_dequote(s, &lr); 2600 CuAssertPtrNotNull(tc, q); 2601 CuAssertTrue(tc, p != q); 2602 CuAssertTrue(tc, 0 == strcmp(q, "123456\"789\r")); 2603 CuAssertTrue(tc, lr == (lo-2)); 2604 2605 s = SH_ALLOC(64); sl_strlcpy(s, str1b, 64); p = s; lo = strlen(s); lr = lo; 2606 q = sh_files_C_dequote(s, &lr); 2607 CuAssertPtrNotNull(tc, q); 2608 CuAssertTrue(tc, p != q); 2609 CuAssertTrue(tc, 0 == strcmp(q, "12345678\r9")); 2610 CuAssertTrue(tc, lr == (lo-1)); 2611 2612 s = SH_ALLOC(64); sl_strlcpy(s, str1c, 64); p = s; lo = strlen(s); lr = lo; 2613 q = sh_files_C_dequote(s, &lr); 2614 CuAssertPtrNotNull(tc, q); 2615 CuAssertTrue(tc, p != q); 2616 CuAssertTrue(tc, 0 == strcmp(q, "12345678\x0a_9")); 2617 CuAssertTrue(tc, lr == (lo-3)); 2618 2619 s = SH_ALLOC(64); sl_strlcpy(s, str1d, 64); p = s; lo = strlen(s); lr = lo; 2620 q = sh_files_C_dequote(s, &lr); 2621 CuAssertPtrNotNull(tc, q); 2622 CuAssertTrue(tc, p != q); 2623 CuAssertTrue(tc, 0 == strcmp(q, "12345678\007_9")); 2624 CuAssertTrue(tc, lr == (lo-3)); 2625 2626 s = SH_ALLOC(64); sl_strlcpy(s, str1e, 64); p = s; lo = strlen(s); lr = lo; 2627 q = sh_files_C_dequote(s, &lr); 2628 CuAssertPtrNotNull(tc, q); 2629 CuAssertTrue(tc, p != q); 2630 CuAssertTrue(tc, 0 == strcmp(q, "123456789\\")); 2631 CuAssertTrue(tc, lr == (lo-1)); 2632 2633 s = SH_ALLOC(64); sl_strlcpy(s, str2, 64); p = s; lo = strlen(s); lr = lo; 2634 q = sh_files_C_dequote(s, &lr); 2635 CuAssertTrue(tc, q == NULL); 2636 CuAssertTrue(tc, lr == 0); 2637 2638 s = SH_ALLOC(64); sl_strlcpy(s, str3, 64); p = s; lo = strlen(s); lr = lo; 2639 q = sh_files_C_dequote(s, &lr); 2640 CuAssertTrue(tc, q == NULL); 2641 CuAssertTrue(tc, lr == 0); 2642 2643 s = SH_ALLOC(64); sl_strlcpy(s, str4, 64); p = s; lo = strlen(s); lr = lo; 2644 q = sh_files_C_dequote(s, &lr); 2645 CuAssertTrue(tc, q == NULL); 2646 CuAssertTrue(tc, lr == 0); 2647 2648 s = SH_ALLOC(64); sl_strlcpy(s, str5, 64); p = s; lo = strlen(s); lr = lo; 2649 q = sh_files_C_dequote(s, &lr); 2650 CuAssertTrue(tc, q == NULL); 2651 CuAssertTrue(tc, lr == 0); 2652 2653 s = SH_ALLOC(64); sl_strlcpy(s, str6, 64); p = s; lo = strlen(s); lr = lo; 2654 q = sh_files_C_dequote(s, &lr); 2655 CuAssertTrue(tc, q == NULL); 2656 CuAssertTrue(tc, lr == 0); 2657 2658 return; 2659 #else 2660 (void) tc; /* fix compiler warning */ 2661 return; 2662 #endif 2663 } 2664 #endif 2665 -
trunk/src/sh_kern.c
r279 r286 495 495 char * kmap; 496 496 497 /* first, try read()498 */499 if (0 == sh_kern_kmem_read (fd, addr, buf, len))500 return 0;501 502 497 /* next, try mmap() 503 498 */ … … 511 506 if (kmap == MAP_FAILED) 512 507 { 508 /* then, try read() 509 */ 510 if (0 == sh_kern_kmem_read (fd, addr, buf, len)) 511 return 0; 512 513 513 memset(buf, '\0', len); 514 514 return -1; 515 515 } 516 516 517 memcpy (buf, &kmap[roff], len); 517 518 return munmap(kmap, len+sz); -
trunk/src/sh_readconf.c
r279 r286 340 340 char * tmp; 341 341 342 char line_in[512+2]; 342 #define SH_LINE_IN 16384 343 char * line_in; 343 344 char * line; 344 345 … … 373 374 374 375 if (!SL_ISERROR(fd)) 375 local_file = 0; 376 { 377 local_file = 0; 378 } 376 379 else if (sh.flag.checkSum != SH_CHECK_INIT) 377 aud_exit (FIL__, __LINE__, EXIT_FAILURE); 380 { 381 aud_exit (FIL__, __LINE__, EXIT_FAILURE); 382 } 378 383 else 379 384 { … … 427 432 sl_rewind (fd); 428 433 434 line_in = SH_ALLOC(SH_LINE_IN); 435 429 436 #if defined(SH_STEALTH) && !defined(SH_STEALTH_MICRO) 430 437 /* extract the data and copy to temporary file … … 434 441 sh_unix_getline_stealth (0, NULL, 0); /* initialize */ 435 442 436 while ( sh_unix_getline_stealth (fd, line_in, 512) > 0) {443 while ( sh_unix_getline_stealth (fd, line_in, SH_LINE_IN-2) > 0) { 437 444 hidden_count++; 438 445 if (line_in[0] == '\n') … … 451 458 break; 452 459 #endif 453 if (hidden_count > 4096) /* arbitrary safeguard*/460 if (hidden_count > 1048576) /* arbitrary safeguard, 1024*1024 */ 454 461 break; 455 462 } … … 464 471 conf_line = 0; 465 472 466 while ( sh_unix_getline (fd, line_in, 512) > 0) {473 while ( sh_unix_getline (fd, line_in, SH_LINE_IN-2) > 0) { 467 474 468 475 ++conf_line; … … 502 509 sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_EXIT_ABORT1, 503 510 sh.prg_name); 511 SH_FREE(line_in); 504 512 aud_exit (FIL__, __LINE__,EXIT_FAILURE); 505 513 } … … 660 668 sl_rewind (fd); 661 669 if (0 != sh_gpg_check_sign (fd, 0, 1)) 662 aud_exit (FIL__, __LINE__, EXIT_FAILURE); 670 { 671 SH_FREE(line_in); 672 aud_exit (FIL__, __LINE__, EXIT_FAILURE); 673 } 663 674 #endif 664 675 … … 669 680 read_mode = SH_SECTION_NONE; /* reset b/o sighup reload */ 670 681 682 SH_FREE(line_in); 671 683 SL_RETURN( 0, _("sh_readconf_read")); 672 684 } -
trunk/src/sstrip.c
r48 r286 216 216 Elf32_Phdr const *phdr; 217 217 unsigned long size, n; 218 inti;218 unsigned int i; 219 219 220 220 /* Start by setting the size to include the ELF header and the … … 245 245 Elf64_Phdr const *phdr; 246 246 unsigned long size, n; 247 inti;247 unsigned int i; 248 248 249 249 /* Start by setting the size to include the ELF header and the … … 308 308 { 309 309 Elf32_Phdr *phdr; 310 inti;310 unsigned int i; 311 311 312 312 /* If the section header table is gone, then remove all references … … 340 340 { 341 341 Elf64_Phdr *phdr; 342 inti;342 unsigned int i; 343 343 344 344 /* If the section header table is gone, then remove all references -
trunk/test/testrun_2c.sh
r226 r286 267 267 cp ./yule ./yule.orig 268 268 269 ${TOP_SRCDIR}/configure --quiet $TRUST --enable-debug --enable-network=server --enable-xml-log --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=${RCFILE}2 --with-log-file=${LOGFILE}2 --with-pid-file=$PW_DIR/.samhain_lock2 --with-html-file=${HTML}2 --with-state-dir=$PW_DIR --with-port=49778 --with-database=mysql 270 # 269 ${TOP_SRCDIR}/configure --quiet $TRUST --enable-debug --enable-network=server --enable-xml-log --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=${RCFILE}2 --with-log-file=${LOGFILE}2 --with-pid-file=$PW_DIR/.samhain_lock2 --with-html-file=${HTML}2 --with-state-dir=$PW_DIR --with-port=49778 --with-database=mysql 270 # 271 if test x$? = x0; then 272 [ -z "$verbose" ] || log_msg_ok "configure..."; 273 $MAKE > /dev/null 2>>test_log 271 274 if test x$? = x0; then 272 [ -z "$verbose" ] || log_msg_ok "configure..."; 273 $MAKE > /dev/null 2>>test_log 274 if test x$? = x0; then 275 [ -z "$verbose" ] || log_msg_ok "make..."; 276 else 277 [ -z "$quiet" ] && log_msg_fail "make..."; 278 return 1 279 fi 280 275 [ -z "$verbose" ] || log_msg_ok "make..."; 281 276 else 282 [ -z "$quiet" ] && log_msg_fail "configure..."; 283 return 1 284 fi 285 286 cp yule yule.2 || return 1 287 # 277 [ -z "$quiet" ] && log_msg_fail "make..."; 278 return 1 279 fi 280 281 else 282 [ -z "$quiet" ] && log_msg_fail "configure..."; 283 return 1 284 fi 285 286 cp yule yule.2 || return 1 287 # 288 288 cp ./yule.orig ./yule 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 289 # 290 SHPW=`cat ./testpw` 291 292 if test x"$SHPW" = x; then 293 [ -z "$quiet" ] && log_msg_fail "password not generated -- aborting" 294 return 1 295 fi 296 297 rm -f ./testpw 298 299 ./samhain_setpwd yule new $SHPW >/dev/null 300 301 if test x$? = x0; then 302 [ -z "$verbose" ] || log_msg_ok "./samhain_setpwd yule new $SHPW"; 303 else 304 [ -z "$quiet" ] && log_msg_fail "./samhain_setpwd yule new $SHPW"; 305 return 1 306 fi 307 308 309 $MAKE clean >/dev/null || return 1 310 310 mv yule.new yule || return 1 311 311 #
Note:
See TracChangeset
for help on using the changeset viewer.