Changeset 210
- Timestamp:
- Jan 29, 2009, 7:54:16 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r209 r210 12 12 dnl start 13 13 dnl 14 AM_INIT_AUTOMAKE(samhain, 2.5.2 a)14 AM_INIT_AUTOMAKE(samhain, 2.5.2b) 15 15 AC_DEFINE([SAMHAIN], 1, [Application is samhain]) 16 16 AC_CANONICAL_HOST -
trunk/docs/Changelog
r209 r210 1 2.5.2b (29-01-2009): 2 * turn warnings into errors in the compile test suite 3 * fix missing define in sh_portcheck.c to eliminate compiler warning 4 (reported by joerg) 5 1 6 2.5.2a (26-01-2009): 2 7 * fix problem building deb package (bit rot; reported by joerg) -
trunk/src/sh_err_log.c
r170 r210 380 380 { 381 381 if (key[0] != '\n' && key[0] != '\0') 382 fprintf(stdout, _("New audit trail, enter key: "));382 fprintf(stdout, "%s",_("New audit trail, enter key: ")); 383 383 else if (key[0] == '\n') 384 384 { … … 418 418 { 419 419 chk_mode = CHK_KEY; 420 fprintf(stdout, _("Key not found in file\n"));420 fprintf(stdout, "%s",_("Key not found in file\n")); 421 421 goto findKey; 422 422 } -
trunk/src/sh_forward.c
r178 r210 1883 1883 _exit(EXIT_SUCCESS); 1884 1884 } 1885 fprintf(stdout, _("ERROR initializing BigNum library.\n"));1885 fprintf(stdout, "%s",_("ERROR initializing BigNum library.\n")); 1886 1886 fflush (stdout); 1887 1887 _exit(EXIT_FAILURE); -
trunk/src/sh_getopt.c
r183 r210 321 321 #ifndef DEFAULT_CONSOLE 322 322 if (num > 0) fputc ('\n', stdout); 323 printf ( _(" console (/dev/console)")); ++num;323 printf ("%s", _(" console (/dev/console)")); ++num; 324 324 #else 325 325 if (num > 0) fputc ('\n', stdout); 326 326 if (0 == strcmp (DEFAULT_CONSOLE, _("NULL"))) 327 { printf ( _("console (/dev/console)")); ++num; }327 { printf ("%s", _("console (/dev/console)")); ++num; } 328 328 else 329 329 { printf (_("console (%s)"), DEFAULT_CONSOLE); ++num; } … … 406 406 #if defined(USE_SYSTEM_MALLOC) 407 407 if (num > 0) fputc ('\n', stdout); 408 printf (_(" using system malloc")); ++num;408 fputs (_(" using system malloc"), stdout); ++num; 409 409 #else 410 410 if (num > 0) fputc ('\n', stdout); 411 printf (_(" using dnmalloc")); ++num;411 fputs (_(" using dnmalloc"), stdout); ++num; 412 412 #endif 413 413 … … 554 554 "(c) 1999-2008 Rainer Wichmann (http://la-samhna.de).\n"), 555 555 VERSION); 556 fprintf (stdout, _("This software comes with ABSOLUTELY NO WARRANTY. "));557 fprintf (stdout, _("Use at own risk.\n\n"));556 fprintf (stdout, "%s",_("This software comes with ABSOLUTELY NO WARRANTY. ")); 557 fprintf (stdout, "%s",_("Use at own risk.\n\n")); 558 558 559 559 sh_getopt_print_log_facilities (); … … 567 567 static int sh_getopt_copyright (const char * dummy) 568 568 { 569 fprintf (stdout, 569 fprintf (stdout, "%s", 570 570 _("Copyright (C) 1999-2008 Rainer Wichmann"\ 571 571 " (http://la-samhna.de).\n\n")); 572 572 573 fprintf (stdout, 573 fprintf (stdout, "%s", 574 574 _("This program is free software; "\ 575 575 "you can redistribute it and/or modify\n")); 576 fprintf (stdout, _("it under the terms of the GNU General "\576 fprintf (stdout, "%s",_("it under the terms of the GNU General "\ 577 577 "Public License as published by\n")); 578 fprintf (stdout, _("the Free Software Foundation; either version 2 "\578 fprintf (stdout, "%s",_("the Free Software Foundation; either version 2 "\ 579 579 "of the License, or\n")); 580 fprintf (stdout, _("(at your option) any later version.\n\n"));581 582 fprintf (stdout, _("This program is distributed in the hope "\580 fprintf (stdout, "%s",_("(at your option) any later version.\n\n")); 581 582 fprintf (stdout, "%s",_("This program is distributed in the hope "\ 583 583 "that it will be useful,\n")); 584 fprintf (stdout, _("but WITHOUT ANY WARRANTY; "\584 fprintf (stdout, "%s",_("but WITHOUT ANY WARRANTY; "\ 585 585 "without even the implied warranty of\n")); 586 fprintf (stdout, _("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."\587 " See the\n"));588 fprintf (stdout, _("GNU General Public License for more details.\n\n"));589 590 fprintf (stdout, _("You should have received a copy of the "\586 fprintf (stdout, "%s",_("MERCHANTABILITY or FITNESS FOR A PARTICULAR "\ 587 "PURPOSE. See the\n")); 588 fprintf (stdout, "%s",_("GNU General Public License for more details.\n\n")); 589 590 fprintf (stdout, "%s",_("You should have received a copy of the "\ 591 591 "GNU General Public License\n")); 592 fprintf (stdout, _("along with this program; "\592 fprintf (stdout, "%s",_("along with this program; "\ 593 593 "if not, write to the Free Software\n")); 594 fprintf (stdout, _("Foundation, Inc., 59 Temple Place - Suite 330, "\594 fprintf (stdout, "%s",_("Foundation, Inc., 59 Temple Place - Suite 330, "\ 595 595 "Boston, MA 02111-1307, USA.\n\n")); 596 596 597 fprintf (stdout, _("This product makes use of the reference implementation"\598 " of the TIGER message\n"));599 fprintf (stdout, _("digest algorithm. This code is copyright Eli Biham "\597 fprintf (stdout, "%s",_("This product makes use of the reference "\ 598 "implementation of the TIGER message\n")); 599 fprintf (stdout, "%s",_("digest algorithm. This code is copyright Eli Biham "\ 600 600 "(biham@cs.technion.ac.il)\n")); 601 fprintf (stdout, _("and Ross Anderson (rja14@cl.cam.ac.uk). It can be used "\601 fprintf (stdout, "%s",_("and Ross Anderson (rja14@cl.cam.ac.uk). It can be used "\ 602 602 "freely without any\n")); 603 fprintf (stdout, _("restrictions.\n"));603 fprintf (stdout, "%s",_("restrictions.\n")); 604 604 #if defined(USE_SRP_PROTOCOL) && !defined(SH_STANDALONE) 605 605 #if (!defined(HAVE_LIBGMP) || !defined(HAVE_GMP_H)) 606 fprintf (stdout, _("This product makes use of the 'bignum' library by "\606 fprintf (stdout, "%s",_("This product makes use of the 'bignum' library by "\ 607 607 "Henrik Johansson\n")); 608 fprintf (stdout, _("(Henrik.Johansson@Nexus.Comm.SE). If you are including"\609 " this library in a\n"));610 fprintf (stdout, _("commercial product, be sure to distribute ALL of"\608 fprintf (stdout, "%s",_("(Henrik.Johansson@Nexus.Comm.SE). If you are "\ 609 "including this library in a\n")); 610 fprintf (stdout, "%s",_("commercial product, be sure to distribute ALL of"\ 611 611 " it with the product.\n")); 612 612 #endif 613 fprintf (stdout, _("This product uses the 'Secure Remote Password' "\613 fprintf (stdout, "%s",_("This product uses the 'Secure Remote Password' "\ 614 614 "cryptographic\n")); 615 fprintf (stdout, _("authentication system developed by Tom Wu "\615 fprintf (stdout, "%s",_("authentication system developed by Tom Wu "\ 616 616 "(tjw@CS.Stanford.EDU).\n")); 617 617 #endif 618 fprintf (stdout, _("\nPlease refer to the file COPYING in the source "\618 fprintf (stdout, "%s",_("\nPlease refer to the file COPYING in the source "\ 619 619 "distribution for a")); 620 fprintf (stdout, _("\nfull list of incorporated code and associated "\620 fprintf (stdout, "%s",_("\nfull list of incorporated code and associated "\ 621 621 "licenses.\n")); 622 622 … … 644 644 "(c) 1999-2006 Rainer Wichmann (http://la-samhna.de).\n"), 645 645 VERSION); 646 fprintf (stdout, _("This software comes with ABSOLUTELY NO WARRANTY. "));647 fprintf (stdout, _("Use at own risk.\n"));648 649 fprintf (stdout, _("Usage:\n\n"));646 fprintf (stdout, "%s",_("This software comes with ABSOLUTELY NO WARRANTY. ")); 647 fprintf (stdout, "%s",_("Use at own risk.\n")); 648 649 fprintf (stdout, "%s",_("Usage:\n\n")); 650 650 651 651 for (i = 0; op_table[i].longopt != NULL; ++i) { … … 656 656 if (op_table[i].shortopt != '-' && 657 657 strchr(opts, op_table[i].shortopt) != NULL) 658 fprintf (stdout, _("Short option char collision !\n"));658 fprintf (stdout, "%s",_("Short option char collision !\n")); 659 659 opts[i] = op_table[i].shortopt; 660 660 … … 689 689 } 690 690 691 fprintf (stdout, 691 fprintf (stdout, "%s", 692 692 _("\nPlease report bugs to support@la-samhna.de.\n")); 693 693 … … 767 767 /* not last option 768 768 */ 769 fprintf (stderr, 769 fprintf (stderr, "%s", 770 770 _("Error: short option with argument is not last in option string\n")); 771 771 (void) sh_getopt_usage(_("fail")); … … 775 775 /* argument required, but no avail 776 776 */ 777 fprintf (stderr, _("Error: missing argument\n")); 777 fprintf (stderr, "%s", 778 _("Error: missing argument\n")); 778 779 (void) sh_getopt_usage(_("fail")); 779 780 } … … 813 814 { 814 815 /* unrecognized short option */ 815 fprintf (stderr, _("Error: unrecognized short option\n"));816 fprintf (stderr, "%s",_("Error: unrecognized short option\n")); 816 817 (void) sh_getopt_usage(_("fail")); 817 818 } … … 840 841 /* argument required, but no avail 841 842 */ 842 fprintf (stderr, _("Error: missing argument\n")); 843 fprintf (stderr, "%s", 844 _("Error: missing argument\n")); 843 845 (void) sh_getopt_usage(_("fail")); 844 846 } … … 870 872 else 871 873 { 872 fprintf (stderr, _("Error: invalid argument\n")); 874 fprintf (stderr, "%s", 875 _("Error: invalid argument\n")); 873 876 /* argument required, but no avail */ 874 877 (void) sh_getopt_usage(_("fail")); … … 899 902 { 900 903 /* unrecognized long option */ 901 fprintf (stderr, _("Error: unrecognized long option\n"));904 fprintf (stderr, "%s",_("Error: unrecognized long option\n")); 902 905 (void) sh_getopt_usage(_("fail")); 903 906 } -
trunk/src/sh_hash.c
r205 r210 1778 1778 sl_write (pushdata_fd, "\n", 1); 1779 1779 } else { 1780 printf ( _("\n#Host "));1780 printf ("%s",_("\n#Host ")); 1781 1781 printf ("%s", sh.host.name); 1782 printf ( _(" Version "));1782 printf ("%s",_(" Version ")); 1783 1783 printf ("%s", sh_db_version_string); 1784 printf ( _(" Date "));1784 printf ("%s",_(" Date ")); 1785 1785 (void) sh_unix_time(0, timestring, sizeof(timestring)); 1786 1786 printf ("%s\n", timestring); … … 3868 3868 { 3869 3869 if (ListWithDelimiter == S_TRUE) 3870 printf( _(" no_attr"));3870 printf("%s",_(" no_attr")); 3871 3871 } 3872 3872 putchar('\n'); … … 3961 3961 res = uncompress(decompressed, &clen, decoded, dlen); 3962 3962 if (res == Z_MEM_ERROR) 3963 { fprintf(stderr, _("Error: Not enough memory\n")); return -1; }3963 { fprintf(stderr, "%s",_("Error: Not enough memory\n")); return -1; } 3964 3964 if (res == Z_DATA_ERROR) 3965 { fprintf(stderr, _("Error: Data corrupt or incomplete\n")); return -1; }3965 { fprintf(stderr, "%s",_("Error: Data corrupt or incomplete\n")); return -1; } 3966 3966 } while (res == Z_BUF_ERROR || clen == clen_o); 3967 3967 … … 3973 3973 (void) linkpath; 3974 3974 #endif 3975 fprintf(stderr, _("Error: No data available\n"));3975 fprintf(stderr, "%s",_("Error: No data available\n")); 3976 3976 return -1; 3977 3977 } … … 3991 3991 if (sl_is_suid()) 3992 3992 { 3993 fprintf(stderr, _("ERROR: insufficient privilege\n"));3993 fprintf(stderr, "%s",_("ERROR: insufficient privilege\n")); 3994 3994 _exit (EXIT_FAILURE); 3995 3995 return -1; /* for Mac OSX compiler */ … … 4047 4047 else 4048 4048 { 4049 fprintf(stderr, _("File is a link\n"));4049 fprintf(stderr, "%s",_("File is a link\n")); 4050 4050 _exit(EXIT_FAILURE); 4051 4051 return -1; … … 4068 4068 if (flag == 0) 4069 4069 { 4070 fprintf(stderr, _("File not found\n"));4070 fprintf(stderr, "%s",_("File not found\n")); 4071 4071 _exit(EXIT_FAILURE); 4072 4072 } -
trunk/src/sh_mail.c
r190 r210 197 197 if (numsig > 0) 198 198 { 199 fprintf (stderr, _("ERROR (no key -- cannot check)\n"));199 fprintf (stderr, "%s",_("ERROR (no key -- cannot check)\n")); 200 200 continue; 201 201 } … … 211 211 else if (numsig == 0) 212 212 { 213 fprintf (stderr, _("ERROR (repeated audit trail)\n"));213 fprintf (stderr, "%s",_("ERROR (repeated audit trail)\n")); 214 214 continue; 215 215 } … … 220 220 sh_util_encode(key, bufc, 1, 'A'); 221 221 (void) sl_strlcpy (mail_trail_ptr->trail_key, key, KEY_LEN+1); 222 fprintf (stderr, _("(unchecked)\n"));222 fprintf (stderr, "%s",_("(unchecked)\n")); 223 223 } 224 224 else … … 244 244 KEY_LEN) != 0) 245 245 { 246 fprintf (stderr, _("(FAILED)\n"));246 fprintf (stderr, "%s",_("(FAILED)\n")); 247 247 } 248 248 else 249 249 { 250 fprintf (stderr, _("(passed)\n"));250 fprintf (stderr, "%s",_("(passed)\n")); 251 251 } 252 252 -
trunk/src/sh_portcheck.c
r206 r210 129 129 #include "sh_utils.h" 130 130 #include "sh_modules.h" 131 #define SH_NEED_GETHOSTBYXXX 131 132 #include "sh_static.h" 132 133 #include "sh_pthread.h" … … 655 656 else 656 657 { 657 snprintf (buf, sizeof(buf), _("unknown"));658 snprintf (buf, sizeof(buf), "%s",_("unknown")); 658 659 } 659 660 return buf; … … 975 976 int sh_portchk_init (struct mod_type * arg) 976 977 { 978 #ifndef HAVE_PTHREAD 979 (void) arg; 980 #endif 981 977 982 if (sh_portchk_active == S_FALSE) 978 983 return SH_MOD_FAILED; -
trunk/src/sh_processcheck.c
r205 r210 1314 1314 int sh_prochk_init (struct mod_type * arg) 1315 1315 { 1316 #ifndef HAVE_PTHREAD 1317 (void) arg; 1318 #endif 1319 1316 1320 if (ShProchkActive == S_FALSE) 1317 1321 return SH_MOD_FAILED; -
trunk/src/sh_utils.c
r185 r210 181 181 else 182 182 { 183 fprintf(stderr, _("Please answer y(es) or n(o)\n"));183 fprintf(stderr, "%s", _("Please answer y(es) or n(o)\n")); 184 184 } 185 185 /*@-charintliteral@*/ … … 1123 1123 if (0 != sl_is_suid()) 1124 1124 { 1125 fprintf(stderr, _("ERROR: insufficient privilege\n"));1125 fprintf(stderr, "%s", _("ERROR: insufficient privilege\n")); 1126 1126 _exit (EXIT_FAILURE); 1127 1127 /*@notreached@*/ … … 1131 1131 if (new_in == NULL || new_in[0] == '\0') 1132 1132 { 1133 fprintf(stderr, 1133 fprintf(stderr, "%s", 1134 1134 _("ERROR: no key given\n Argument must be 'key@path'\n")); 1135 1135 _exit (EXIT_FAILURE); … … 1153 1153 if (j == 0) 1154 1154 { 1155 fprintf(stderr, 1155 fprintf(stderr, "%s", 1156 1156 _("ERROR: no path to executable given\n Argument must be 'key@path'\n")); 1157 1157 free(new); … … 1221 1221 UINT32 kbuf[KEY_BYT/sizeof(UINT32)]; 1222 1222 1223 printf( _("old key found\n"));1223 printf("%s", _("old key found\n")); 1224 1224 h1 = sh_tiger_hash_uint32 (key, TIGER_DATA, 1225 1225 (unsigned long)strlen(key), … … 1237 1237 } 1238 1238 1239 fprintf(stderr, 1239 fprintf(stderr, "%s", 1240 1240 _("ERROR: old key not found\n")); 1241 1241 free(new); free (outpath); free(image); … … 1246 1246 1247 1247 bail_mem: 1248 fprintf(stderr, 1248 fprintf(stderr, "%s", 1249 1249 _("ERROR: out of memory\n")); 1250 1250 if (new) free(new); -
trunk/test/testcompile.sh
r183 r210 20 20 # 21 21 22 # dnmalloc + flawfinder + (3 5* 3)23 MAXTEST=1 07; export MAXTEST22 # dnmalloc + flawfinder + (36 * 3) 23 MAXTEST=110; export MAXTEST 24 24 25 25 run_dnmalloc () … … 202 202 { 203 203 fail=0 204 # 205 # Compiler warnings can be OS specific, but at least 206 # on Linux there should be none 207 # 208 isLinux=0 209 uname -a | grep Linux >/dev/null 210 if [ $? -eq 0 ]; then 211 isLinux=1 212 sed --in-place 's/-Wall/-Wall -Werror/' Makefile 213 fi 214 # 204 215 if test x$1 = x0; then 205 216 [ -z "$verbose" ] || log_msg_ok "configure... $TEST"; … … 219 230 fail=1 220 231 fi 232 if [ $isLinux -eq 1 ]; then 233 sed --in-place 's/-Wall -Werror/-Wall/' Makefile 234 fi 221 235 if [ $fail -eq 1 ]; then 222 236 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST"; … … 335 349 # test standalone compilation 336 350 # 351 TEST="${S}standalone w/procchk w/portchk w/static${E}" 352 # 353 if test -r "Makefile"; then 354 $MAKE distclean 355 fi 356 # 357 ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --enable-process-check --enable-port-check --enable-static > /dev/null 2>> test_log 358 # 359 let "num = num + 1" >/dev/null 360 testmake $? $num || let "numfail = numfail + 1" >/dev/null 361 let "num = num + 1" >/dev/null 362 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 363 let "num = num + 1" >/dev/null 364 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 365 366 # 367 # test standalone compilation 368 # 337 369 TEST="${S}standalone w/procchk w/portchk w/stealth${E}" 338 370 #
Note:
See TracChangeset
for help on using the changeset viewer.