tripwire.patch 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. --- src/core/stringutil.h.sopwith Sun Feb 4 00:38:27 2001
  2. +++ src/core/stringutil.h Fri Feb 1 01:11:59 2002
  3. @@ -64,7 +64,7 @@
  4. Convert( std::string& lhs, const std::string& rhs )
  5. {
  6. lhs = rhs;
  7. - return lhs.c_str();
  8. + return std::string::const_iterator(lhs.c_str());
  9. }
  10. /// Specialize Everything Else
  11. --- src/core/charutil.cpp.sopwith Sat Oct 28 15:22:55 2000
  12. +++ src/core/charutil.cpp Fri Feb 1 01:11:59 2002
  13. @@ -105,7 +105,7 @@
  14. }
  15. first = cur;
  16. - last = tss::strinc( cur );
  17. + last = TSTRING::const_iterator(tss::strinc( cur.base() ));
  18. return true;
  19. }
  20. --- src/core/displayencoder.cpp.sopwith Fri Oct 27 21:15:20 2000
  21. +++ src/core/displayencoder.cpp Fri Feb 1 01:11:59 2002
  22. @@ -828,7 +828,8 @@
  23. ach[0] = ch;
  24. for( sack_type::const_iterator atE = m_encodings.begin(); atE != m_encodings.end(); atE++ )
  25. {
  26. - if( (*atE)->NeedsEncoding( &ach[0], &ach[1] ) )
  27. + if( (*atE)->NeedsEncoding( std::string::const_iterator(&ach[0]),
  28. + std::string::const_iterator(&ach[1]) ) )
  29. {
  30. if( fFailedATest )
  31. return false; // each char can only fail one test
  32. --- src/core/displayutil.cpp.sopwith Sat Oct 28 15:22:55 2000
  33. +++ src/core/displayutil.cpp Fri Feb 1 01:11:59 2002
  34. @@ -45,7 +45,7 @@
  35. TOSTRINGSTREAM sstr;
  36. TSTRING strT;
  37. bool fFirstLine = true;
  38. - for( TSTRING::const_iterator i = str.begin(); i != str.end(); i = tss::strinc( i ) )
  39. + for( TSTRING::const_iterator i = str.begin(); i != str.end(); i = TSTRING::const_iterator(tss::strinc( i.base() )) )
  40. {
  41. // return found -- add line to output string
  42. if( _T('\n') == *i )
  43. @@ -74,7 +74,7 @@
  44. else
  45. {
  46. // add char to string
  47. - strT.append( i, (TSTRING::const_iterator)tss::strinc( i ) );
  48. + strT.append( i, TSTRING::const_iterator(tss::strinc( i.base() )) );
  49. }
  50. }
  51. --- src/cryptlib/misc.h.sopwith Fri Oct 27 20:26:21 2000
  52. +++ src/cryptlib/misc.h Fri Feb 1 01:11:59 2002
  53. @@ -150,7 +150,7 @@
  54. operator T *()
  55. {return ptr;}
  56. -#if !defined(_MSC_VER) && !defined(_KCC)
  57. +#if !defined(_MSC_VER) && !defined(_KCC) && 0
  58. T *operator +(unsigned int offset)
  59. {return ptr+offset;}
  60. const T *operator +(unsigned int offset) const
  61. --- src/cryptlib/i686-pc-linux.mak.sopwith Fri Feb 1 01:12:57 2002
  62. +++ src/cryptlib/i686-pc-linux.mak Fri Feb 1 01:13:12 2002
  63. @@ -71,12 +71,12 @@
  64. # Recusively call make defining the appropriate $(D_FLAGS) var
  65. debug:
  66. - gmake -f $(MAKEFILE) cryptlib_d.a "D_FLAGS=$(DEBUG_FLAGS)" "LDFLAGS=DEBUG_LDFLAGS"
  67. -# gmake -f $(MAKEFILE) cryptest_d "D_FLAGS=$(DEBUG_FLAGS)" "LDFLAGS=DEBUG_LDFLAGS"
  68. + $(MAKE) -f $(MAKEFILE) cryptlib_d.a "D_FLAGS=$(DEBUG_FLAGS)" "LDFLAGS=DEBUG_LDFLAGS"
  69. +# $(MAKE) -f $(MAKEFILE) cryptest_d "D_FLAGS=$(DEBUG_FLAGS)" "LDFLAGS=DEBUG_LDFLAGS"
  70. release:
  71. - gmake -f $(MAKEFILE) cryptlib.a "D_FLAGS=$(NDEBUG_FLAGS)" "LDFLAGS=NDEBUG_LDFLAGS"
  72. -# gmake -f $(MAKEFILE) cryptest "D_FLAGS=$(NDEBUG_FLAGS)" "LDFLAGS=NDEBUG_LDFLAGS"
  73. + $(MAKE) -f $(MAKEFILE) cryptlib.a "D_FLAGS=$(NDEBUG_FLAGS)" "LDFLAGS=NDEBUG_LDFLAGS"
  74. +# $(MAKE) -f $(MAKEFILE) cryptest "D_FLAGS=$(NDEBUG_FLAGS)" "LDFLAGS=NDEBUG_LDFLAGS"
  75. ###############################################################################
  76. --- src/db/hierdatabase.cpp.sopwith Sun Feb 25 00:41:13 2001
  77. +++ src/db/hierdatabase.cpp Fri Feb 1 01:11:59 2002
  78. @@ -255,7 +255,8 @@
  79. }
  80. else
  81. {
  82. - int offset = rhs.mIter - rhs.mEntries.begin();
  83. + int offset;
  84. + offset = -(rhs.mEntries.begin() - rhs.mIter);
  85. mIter = mEntries.begin() + offset;
  86. }
  87. --- src/fco/fconame.cpp.sopwith Fri Oct 27 20:25:41 2000
  88. +++ src/fco/fconame.cpp Fri Feb 1 01:11:59 2002
  89. @@ -269,7 +269,7 @@
  90. mpPathName->ClearList();
  91. - TSTRING::const_iterator at = ( pszin + 0 );
  92. + TSTRING::const_iterator at = TSTRING::const_iterator( pszin + 0 );
  93. TSTRING::const_iterator end = at;
  94. while ( *end ) ++end; // NOTE: Find end
  95. @@ -277,9 +277,9 @@
  96. while ( at < end )
  97. {
  98. while ( !(*at == mDelimiter) && at < end )
  99. - at = tss::strinc( at );
  100. + at = TSTRING::const_iterator(tss::strinc( at.base() ));
  101. - if ( at == beg && tss::strinc(at) >= end && at != pszin )
  102. + if ( at == beg && TSTRING::const_iterator(tss::strinc(at.base())) >= end && at.base() != pszin )
  103. break;
  104. cFCONameTblNode* pNode =
  105. @@ -287,7 +287,7 @@
  106. mpPathName->mNames.push_back( pNode );
  107. - beg = ( at = tss::strinc( at ) );
  108. + beg = ( at = TSTRING::const_iterator(tss::strinc( at.base() )) );
  109. }
  110. }
  111. --- src/siggen/siggenmain.cpp.sopwith Fri Oct 27 20:26:25 2000
  112. +++ src/siggen/siggenmain.cpp Fri Feb 1 01:11:59 2002
  113. @@ -118,11 +118,7 @@
  114. // set unexpected and terminate handlers
  115. // Note: we do this before Init() in case it attempts to call these handlers
  116. // TODO: move this into the Init() routine
  117. -#if IS_GCC
  118. - #define EXCEPTION_NAMESPACE
  119. - #else
  120. - #define EXCEPTION_NAMESPACE std::
  121. - #endif
  122. +#define EXCEPTION_NAMESPACE std::
  123. EXCEPTION_NAMESPACE set_terminate(tw_terminate_handler);
  124. EXCEPTION_NAMESPACE set_unexpected(tw_unexpected_handler);
  125. --- src/tripwire/mailmessage.cpp.sopwith Fri Feb 1 01:11:59 2002
  126. +++ src/tripwire/mailmessage.cpp Fri Feb 1 01:11:59 2002
  127. @@ -509,9 +509,9 @@
  128. std::string::size_type stringSize = 0;
  129. std::string::const_iterator at;
  130. std::string::difference_type charSize;
  131. - for( at = sIn.begin(), charSize = ( tss::strinc( at ) - at );
  132. + for( at = sIn.begin(), charSize = ( std::string::const_iterator(tss::strinc( at.base() )) - at );
  133. at != sIn.end();
  134. - at += charSize, charSize = ( tss::strinc( at ) - at ) )
  135. + at += charSize, charSize = ( std::string::const_iterator(tss::strinc( at.base() )) - at ) )
  136. {
  137. ASSERT( charSize > 0 );
  138. --- src/tripwire/tripwiremain.cpp.sopwith Sat Feb 24 14:02:12 2001
  139. +++ src/tripwire/tripwiremain.cpp Fri Feb 1 01:11:59 2002
  140. @@ -122,11 +122,7 @@
  141. // set unexpected and terminate handlers
  142. // Note: we do this before Init() in case it attempts to call these handlers
  143. // TODO: move this into the Init() routine
  144. -#if IS_GCC
  145. - #define EXCEPTION_NAMESPACE
  146. - #else
  147. - #define EXCEPTION_NAMESPACE std::
  148. - #endif
  149. +#define EXCEPTION_NAMESPACE std::
  150. EXCEPTION_NAMESPACE set_terminate(tw_terminate_handler);
  151. EXCEPTION_NAMESPACE set_unexpected(tw_unexpected_handler);
  152. --- src/twadmin/twadminmain.cpp.sopwith Fri Oct 27 20:26:22 2000
  153. +++ src/twadmin/twadminmain.cpp Fri Feb 1 01:11:59 2002
  154. @@ -86,11 +86,7 @@
  155. // set unexpected and terminate handlers
  156. // Note: we do this before Init() in case it attempts to call these handlers
  157. // TODO: move this into the Init() routine
  158. -#if IS_GCC
  159. - #define EXCEPTION_NAMESPACE
  160. - #else
  161. - #define EXCEPTION_NAMESPACE std::
  162. - #endif
  163. +#define EXCEPTION_NAMESPACE std::
  164. EXCEPTION_NAMESPACE set_terminate(tw_terminate_handler);
  165. EXCEPTION_NAMESPACE set_unexpected(tw_unexpected_handler);
  166. --- src/twparser/policyparser.cpp.sopwith Sat Feb 24 14:02:12 2001
  167. +++ src/twparser/policyparser.cpp Fri Feb 1 01:11:59 2002
  168. @@ -228,7 +228,7 @@
  169. // at gets incremented when used....
  170. )
  171. {
  172. - int nBytes = ::mblen( (char*)at, MB_CUR_MAX );
  173. + int nBytes = ::mblen( at.base(), MB_CUR_MAX );
  174. if ( nBytes == -1 )
  175. {
  176. d.TraceDebug( "Unrecognized Character: %c\n", *at );
  177. --- src/twprint/twprintmain.cpp.sopwith Fri Oct 27 20:26:19 2000
  178. +++ src/twprint/twprintmain.cpp Fri Feb 1 01:11:59 2002
  179. @@ -98,8 +98,8 @@
  180. #if IS_GCC
  181. #define EXCEPTION_NAMESPACE
  182. #else
  183. - #define EXCEPTION_NAMESPACE std::
  184. #endif
  185. +#define EXCEPTION_NAMESPACE std::
  186. EXCEPTION_NAMESPACE set_terminate(tw_terminate_handler);
  187. EXCEPTION_NAMESPACE set_unexpected(tw_unexpected_handler);
  188. --- src/Makefile.sopwith Sat Mar 3 23:03:52 2001
  189. +++ src/Makefile Fri Feb 1 01:11:59 2002
  190. @@ -93,7 +93,7 @@
  191. # file to Makefile.linux_intel or something similar.
  192. MAKEFILE = Makefile
  193. -GMAKE = gmake
  194. +GMAKE = $(MAKE)
  195. #-----------------------------------------------------------------------------
  196. # STLPORT
  197. @@ -145,7 +145,7 @@
  198. # It's handy for clean, .PHONY, etc. to have one big list
  199. #
  200. -targets = $(debugbinaries) $(debuglibraries) $(releasebinaries) $(releaselibraries) STLport_d STLport_r
  201. +targets = $(debugbinaries) $(debuglibraries) $(releasebinaries) $(releaselibraries)
  202. # Let make know these aren't real file names...
  203. --- src/make_include/i686-pc-linux.inc.sopwith Fri Oct 27 20:26:25 2000
  204. +++ src/make_include/i686-pc-linux.inc Fri Feb 1 01:11:59 2002
  205. @@ -19,11 +19,11 @@
  206. # General variable definitions
  207. #
  208. -GMAKE = /usr/bin/gmake
  209. +GMAKE = $(MAKE)
  210. CC = g++
  211. CXX = $(CC)
  212. AR = ar
  213. -SYSDEF=-D_REDHAT -D_IX86 -D_GCC
  214. +SYSDEF=-D_REDHAT -D_IX86 -D_GCC $(RPM_OPT_FLAGS)
  215. STLPORT=../STLport-4.0
  216. #
  217. @@ -33,7 +33,7 @@
  218. CXXFLAGS_R = -I.. -I$(STLPORT)/stlport -ftemplate-depth-32
  219. DEFINES_R = -DNDEBUG $(SYSDEF)
  220. LINKFLAGS_R = -static
  221. -LIBRARYFLAGS_R = -L../../lib/$(SYSPRE)_r -lm -lstlport_gcc
  222. +LIBRARYFLAGS_R = -L../../lib/$(SYSPRE)_r -lm
  223. ARFLAGS_R = crv
  224. #
  225. --- src/tw/twutil.cpp.orig Fri Oct 27 20:25:38 2000
  226. +++ src/tw/twutil.cpp Tue Sep 24 23:24:54 2002
  227. @@ -672,7 +672,7 @@
  228. throw eSerializerInputStreamFmt(_T(""), filename, eSerializer::TY_FILE);
  229. }
  230. - d.TraceDebug("Found a file header of type %d.\n", fileHeader.GetID());
  231. + d.TraceDebug("Found a file header of type %d.\n", fileHeader.GetEncoding());
  232. // check for a mismatched header
  233. if (fileHeader.GetID() != cConfigFile::GetFileHeaderID())
  234. @@ -775,7 +775,7 @@
  235. throw eSerializerInputStreamFmt(_T(""), filename.c_str(), eSerializer::TY_FILE);
  236. }
  237. - d.TraceDebug("Found a file header of type %d.\n", fileHeader.GetID());
  238. + d.TraceDebug("Found a file header of type %d.\n", fileHeader.GetEncoding());
  239. // check for a mismatched header
  240. if (fileHeader.GetID() != cConfigFile::GetFileHeaderID())
  241. --- src/tripwire/mailmessage.cpp.orig Thu Jul 5 05:16:34 2001
  242. +++ src/tripwire/mailmessage.cpp Thu Jul 5 05:16:47 2001
  243. @@ -241,7 +241,7 @@
  244. time_t current_time = time(NULL);
  245. tm = localtime ( &current_time );
  246. - const TCHAR* szFormat = _T("%a %d %b %Y %H:%M:%S %z");
  247. + const TCHAR* szFormat = _T("%a, %d %b %Y %H:%M:%S %z");
  248. size_t numChars = _tcsftime( szDate, countof( szDate ), szFormat, tm );
  249. --- src/core/stdcore.h.dist Tue Jan 28 14:10:57 2003
  250. +++ src/core/stdcore.h Tue Jan 28 16:30:56 2003
  251. @@ -46,6 +46,9 @@
  252. #include "platform.h"
  253. //--Where the configuration file is to be found
  254. +#if 0
  255. +#define CONFIG_FILE_ROOT "@l_prefix@/etc/tripwire"
  256. +#else
  257. #if IS_BSD
  258. # define CONFIG_FILE_ROOT "/usr/local/etc/tripwire"
  259. #elif defined(USE_FHS)
  260. @@ -53,6 +56,7 @@
  261. #else
  262. # undef CONFIG_FILE_ROOT // Nowhere, just try current directoy
  263. #endif
  264. +#endif
  265. //--Disable some level 4 warnings
  266. --- src/core/platform.h.dist Tue Jan 28 15:39:55 2003
  267. +++ src/core/platform.h Tue Jan 28 15:42:30 2003
  268. @@ -128,10 +128,18 @@
  269. #elif defined(_SOLARIS)
  270. #define OS OS_SOLARIS
  271. #if defined(_IX86)
  272. - #define COMP COMP_SUNPRO
  273. + #if defined(_GCC)
  274. + #define COMP COMP_GCC
  275. + #else
  276. + #define COMP COMP_SUNPRO
  277. + #endif
  278. #define ARCH ARCH_IX86
  279. #else
  280. - #define COMP COMP_KAI_SUNPRO
  281. + #if defined(_GCC)
  282. + #define COMP COMP_GCC
  283. + #else
  284. + #define COMP COMP_KAI_SUNPRO
  285. + #endif
  286. #define ARCH ARCH_SPARC
  287. #endif
  288. --- src/tw/twstrings.cpp.dist Tue Jan 28 15:58:00 2003
  289. +++ src/tw/twstrings.cpp Tue Jan 28 15:59:22 2003
  290. @@ -258,6 +258,9 @@
  291. #elif IS_BSD
  292. TSS_StringEntry( tw::STR_VERSION, TSS_PRODUCT_NAME BUILD_NUM UNICODE_STR DEBUG_STR _T(" for BSD\n\n") TSS_COPYRIGHT_NOTICE ),
  293. TSS_StringEntry( tw::STR_VERSION_LONG, TSS_PRODUCT_NAME BUILD_NUM UNICODE_STR DEBUG_STR _T(" for BSD\n\n") TSS_COPYRIGHT_NOTICE_LONG ),
  294. +#elif IS_SOLARIS
  295. + TSS_StringEntry( tw::STR_VERSION, TSS_PRODUCT_NAME BUILD_NUM UNICODE_STR DEBUG_STR _T(" for SOLARIS\n\n") TSS_COPYRIGHT_NOTICE ),
  296. + TSS_StringEntry( tw::STR_VERSION_LONG, TSS_PRODUCT_NAME BUILD_NUM UNICODE_STR DEBUG_STR _T(" for SOLARIS\n\n") TSS_COPYRIGHT_NOTICE_LONG ),
  297. #else
  298. # error Who the hell am I?
  299. #endif