Changeset 9bb220f in nscp
- Timestamp:
- 03/08/10 22:02:22 (3 years ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2, stable
- Children:
- 5b10435
- Parents:
- 42ff14d
- Files:
-
- 26 edited
-
AutoBuild.h (modified) (1 diff)
-
Jamroot (modified) (3 diffs)
-
NSClient++-2005.vcproj (modified) (1 diff)
-
bjam/openssl.jam (modified) (4 diffs)
-
build.bat (modified) (1 diff)
-
changelog (modified) (1 diff)
-
env.bat (modified) (8 diffs)
-
helpers/XAutoBuild/AutoBuild.h (modified) (1 diff)
-
helpers/installer_dll_fw/installer_dll_fw.vcproj (modified) (7 diffs)
-
include/checkHelpers.hpp (modified) (7 diffs)
-
include/config.h (modified) (1 diff)
-
include/filter_framework.hpp (modified) (6 diffs)
-
modules/CheckDisk/CheckDisk.cpp (modified) (35 diffs)
-
modules/CheckDisk/CheckDisk.h (modified) (1 diff)
-
modules/CheckEventLog/CheckEventLog-2005.vcproj (modified) (2 diffs)
-
modules/CheckEventLog/CheckEventLog.cpp (modified) (8 diffs)
-
modules/CheckWMI/Jamfile (modified) (1 diff)
-
modules/LUAScript/LUAScript-2005.vcproj (modified) (12 diffs)
-
modules/NRPEClient/Jamfile (modified) (1 diff)
-
modules/NRPEListener/Jamfile (modified) (1 diff)
-
modules/NSCAAgent/NSCAAgent-2005.vcproj (modified) (12 diffs)
-
modules/NSCAAgent/NSCAThread.cpp (modified) (1 diff)
-
release-build.bat (modified) (1 diff)
-
wix.jam (modified) (1 diff)
-
x64-build.bat (modified) (2 diffs)
-
x86-build.bat (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
AutoBuild.h
r42ff14d r9bb220f 3 3 // change the FALSE to TRUE for autoincrement of build number 4 4 #define INCREMENT_VERSION TRUE 5 #define FILEVER 0,3,8, 106 #define PRODUCTVER 0,3,8, 107 #define STRFILEVER _T("0.3.8. 10")8 #define STRPRODUCTVER _T("0.3.8. 10")9 #define STRPRODUCTDATE _T("2010-0 1-24")5 #define FILEVER 0,3,8,27 6 #define PRODUCTVER 0,3,8,27 7 #define STRFILEVER _T("0.3.8.27") 8 #define STRPRODUCTVER _T("0.3.8.27") 9 #define STRPRODUCTDATE _T("2010-03-08") 10 10 #endif // AUTOBUILD_H -
Jamroot
r689bf4a r9bb220f 13 13 feature.compose <character-set>multibyte : <define>_MBCS ; 14 14 15 path-constant TOP : . ; 15 16 16 17 local toolset = [ MATCH "^--toolset=(.*)" : [ modules.peek : ARGV ] ] ; … … 51 52 path-constant BOOST_STAGE_LOCATE : $(stage-locate) ; 52 53 53 if $(toolset) = "msvc"{54 if ( $(toolset) = "msvc" || $(toolset) = "msvc-8.0" ) { 54 55 using bjam/openssl : : $(TOP)/lib-source/openssl-0.9.8g/include $(TOP)/lib ; 55 56 using bjam/boost : : $(TOP)/lib-source/boost_1_35_0 $(TOP)/lib ; … … 172 173 ; 173 174 174 # all-modules = NSCAAgent ; 175 # all-modules = CheckEventLog CheckExternalScripts CheckHelpers CheckSystem CheckTaskSched ; 176 # all-modules = CheckWMI DebugLogMetrics FileLogger LUAScript ; 177 # all-modules = NRPEClient NSCAAgent NSClientListener SysTray ; 178 # all-modules = NRPEClient NRPEListener NSCAAgent NSClientListener SysTray; 175 179 176 180 all-scripts = -
NSClient++-2005.vcproj
r3692371 r9bb220f 3527 3527 <Tool 3528 3528 Name="VCCustomBuildTool" 3529 CommandLine="echo Copying $(InputFileName) ...
cmd /c "copy "$(InputDir)\$(InputFileName)" "$(InputDir)\$(OutDir)""
"3529 CommandLine="echo Copying $(InputFileName) [cmd /c "copy "$(InputDir)\$(InputFileName)" "$(InputDir)\$(OutDir)""]...
cmd /c "copy "$(InputDir)\$(InputFileName)" "$(InputDir)\$(OutDir)""
" 3530 3530 Outputs="$(InputDir)\$(OutDir)\$(InputFileName)" 3531 3531 /> -
bjam/openssl.jam
r1ff950c r9bb220f 147 147 { 148 148 local result ; 149 result += <source>$(TOP)/include/Socket.cpp ; 149 150 if ( $(.enabled) = true ) { 150 151 result += <define>USE_OPENSSL ; … … 161 162 : # default-build 162 163 : # usage-requirements 164 <conditional>@socket-usage-requirements 163 165 ; 164 166 … … 166 168 { 167 169 local result ; 168 result += <source> include/Socket.cpp ;170 result += <source>$(TOP)/include/Socket.cpp ; 169 171 if ( $(.enabled) = true ) { 170 result += <source> include/sslSocket.cpp ;172 result += <source>$(TOP)/include/sslSocket.cpp ; 171 173 result += <source>openssl ; 172 174 } … … 174 176 } 175 177 178 rule socket-usage-requirements ( properties * ) 179 { 180 local result ; 181 result += <source>$(TOP)/include/Socket.cpp ; 182 if ( $(.enabled) = true ) { 183 result += <source>$(TOP)/include/sslSocket.cpp ; 184 result += <source>openssl ; 185 } 186 return $(result) ; 187 } 188 -
build.bat
r2e8b33f r9bb220f 3 3 4 4 echo :: %jam% --toolset=msvc --with-lua=%LUA_SOURCE% --with-openssl --include-path=%NSCP_INCLUDE% --with-boost --with-cryptopp=%CRYPTOPP_SOURCE% runtime-link=static warnings=off --with-psdk="%PLATTFORM_SDK_INCLUDE%" %* build-binaries >> build.log 5 %jam% --toolset=msvc --with-lua=%LUA_SOURCE% --with-openssl --include-path=%NSCP_INCLUDE% --with-boost --with-cryptopp=%CRYPTOPP_SOURCE% runtime-link=static warnings=off --with-psdk="%PLATTFORM_SDK_INCLUDE%" %* build-binaries5 %jam% --toolset=msvc --with-lua=%LUA_SOURCE% --with-openssl --include-path=%NSCP_INCLUDE% --with-boost --with-cryptopp=%CRYPTOPP_SOURCE% runtime-link=static warnings=off --with-psdk="%PLATTFORM_SDK_INCLUDE%" %* build-binaries 6 6 if %ERRORLEVEL% == 1 goto :error 7 7 echo :: Result: %ERRORLEVEL% >> build.log 8 8 9 9 echo :: %jam% --toolset=msvc warnings=off %* build-archives >> build.log 10 %jam% --toolset=msvc warnings=off %* build-archives10 %jam% --toolset=msvc warnings=off %* build-archives 11 11 if %ERRORLEVEL% == 1 goto :error 12 12 echo :: Result: %ERRORLEVEL% >> build.log 13 13 14 14 echo :: %jam% --toolset=wix "--wix=%WIX_PATH%" %1=%2 %3=%4 build-installer >> build.log 15 %jam% --toolset=wix "--wix=%WIX_PATH%" %1=%2 %3=%4 build-installer15 %jam% --toolset=wix "--wix=%WIX_PATH%" %1=%2 %3=%4 build-installer 16 16 if %ERRORLEVEL% == 1 goto :error 17 17 echo :: Result: %ERRORLEVEL% >> build.log -
changelog
r42ff14d r9bb220f 6 6 * Fix depend onservice LanManWorkStation (old win) 7 7 * Fix RtlStringFromGUID problem on NT4 8 9 2009-03-08 MickeM 10 + Added new option append-filter-<key>=<value> to CheckEventLog to allow "and" of filter rules. 11 CheckEventLog file=application file=system filter=out MaxWarn=1 MaxCrit=1 filter-eventID=ne:1 filter-eventID=eq:1 append-filter-eventSource==SecurityCenter truncate=1023 unique descriptions "syntax=%source%: %id% (%count%)" 12 + Added debug option to CheckEventLog (to allow settingdebug on per-check) 13 + Added obfuscated_password to NSCA section 14 + Added so "global" ([Settings] password=...) passwords are read from the NSCA module 15 16 2009-02-26 MickeM 17 * Changed fo missing files and such generate an error 18 * Added option to return error messages to the client [CheckDisk] show_errors=1 (defauilt is off 0) 19 * Added warning message ewhen numerical filters evaluate to zero (and are not 0) 20 * Fixed major issue with date mathing in CheckFile* which was not working at all. 8 21 9 22 2009-01-24 MickeM -
env.bat
r3d782f8 r9bb220f 6 6 rem SET jam=C:\src\tools\boost-jam-3.1.17\bin.ntx86\bjam.exe 7 7 rem SET jam=D:\source\tools\bjam.exe 8 set jam=C:\s rc\tools\nightly\boost-build\jam_src\bin.ntx86\bjam.exe8 set jam=C:\source\libraries\boost_1_42_0\bjam.exe 9 9 10 10 rem # … … 14 14 rem # 15 15 rem SET BOOST_BUILD_PATH=D:\tools\boost-build 16 SET BOOST_BUILD_PATH=C:\src\lib-src\boost_1_39_0\tools\build\v217 rem SET BOOST_BUILD_PATH=C:\src\tools\beta\boost-build 16 rem SET BOOST_BUILD_PATH=C:\src\lib-src\boost_1_39_0\tools\build\v2 17 SET BOOST_BUILD_PATH=C:\source\libraries\boost_1_42_0\tools\build\v2 18 18 rem set BOOST_BUILD_PATH=D:\source\boost-build 19 19 rem set BOOST_BUILD_PATH=C:\src\tools\nightly\boost-build\ … … 24 24 rem # Set the path to your extra include directpy (openssl/boost/*) 25 25 rem # 26 SET TARGET_INC_DIR=C:\src\include 26 SET TARGET_INC_DIR=C:\source\include 27 SET BOOST_INCLUDE_DIR=%TARGET_INC_DIR%\boost-1_42\ 27 28 rem set TARGET_INC_DIR=d:\source\include 28 29 SET NSCP_INCLUDE=%TARGET_INC_DIR% … … 32 33 rem # Set the path to your extra library directory (openssl/boost/*) 33 34 rem # 34 SET TARGET_LIB_DIR=c:\s rc\lib35 SET TARGET_LIB_DIR=c:\source\lib 35 36 rem SET TARGET_LIB_DIR=D:\source\lib 36 37 rem # … … 46 47 rem # 47 48 rem set LUA_SOURCE=D:\source\NSCP-stable\lib-source\LUA\src\lua-5.1.2 48 set LUA_SOURCE=C:\s rc\lib-src\lua-5.1.449 set LUA_SOURCE=C:\source\libraries\lua-5.1.4 49 50 rem # 50 51 rem ######################## … … 53 54 rem # 54 55 rem SET PLATTFORM_SDK=D:\Program\Microsoft Platform SDK for Windows Server 2003 R2 55 SET PLATTFORM_SDK=c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2 56 rem SET PLATTFORM_SDK=c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2 57 SET PLATTFORM_SDK=c:\Program Files\Microsoft Platform SDK 56 58 rem # 57 59 rem # Setup various relative paths (might need to tweak) … … 67 69 rem # Set the path to your WiX installation 68 70 rem # 69 SET WIX_PATH= C:\Program Files\Windows Installer XML71 SET WIX_PATH=c:\source\tools\wix-2.0 70 72 rem # 71 73 rem ######################## … … 74 76 rem # 75 77 rem SET CRYPTOPP_SOURCE=D:\source\libs-c\crypto++-5.6.0 76 SET CRYPTOPP_SOURCE= "C:\src\lib-src\Crypto++5.6.0"78 SET CRYPTOPP_SOURCE=C:\source\libraries\cryptopp-5.6.0 77 79 rem ######################## 78 80 rem # 79 81 rem # 80 82 rem # 83 SET ZIP7_PATH=C:\Program Files\7-Zip 84 SET PERL_PATH=C:\Perl64\bin 85 SET TOOLS_DIR=c:\source\tools 86 SET PUTTY_DIR="c:\Program Files (x86)\PuTTY" 81 87 82 SET TOOLS_DIR=c:\src\tools\;%ProgramFiles%\7-Zip\ 83 84 85 set PATH=%PATH%;%TOOLS_DIR% 88 set PATH=%PATH%;%ZIP7_PATH%;%PERL_PATH%;%TOOLS_DIR%;%PUTTY_DIR% 86 89 87 90 rem # Used for building "other" stuff as "I do it". -
helpers/XAutoBuild/AutoBuild.h
r12edcec r9bb220f 3 3 // change the FALSE to TRUE for autoincrement of build number 4 4 #define INCREMENT_VERSION TRUE 5 #define FILEVER 1,0,0,1 36 #define PRODUCTVER 1,0,0,1 37 #define STRFILEVER "1.0.0.13"8 #define STRPRODUCTVER "1.0.0.13"9 #define STRPRODUCTDATE "2007-11-03"5 #define FILEVER 1,0,0,14 6 #define PRODUCTVER 1,0,0,14 7 #define STRFILEVER _T("1.0.0.14") 8 #define STRPRODUCTVER _T("1.0.0.14") 9 #define STRPRODUCTDATE _T("2010-02-27") 10 10 #endif // AUTOBUILD_H -
helpers/installer_dll_fw/installer_dll_fw.vcproj
r8170e81 r9bb220f 44 44 Optimization="0" 45 45 AdditionalIncludeDirectories="..\..\include" 46 PreprocessorDefinitions="USE_PSDK" 46 47 MinimalRebuild="true" 47 48 BasicRuntimeChecks="3" … … 119 120 Optimization="0" 120 121 AdditionalIncludeDirectories="..\..\include" 122 PreprocessorDefinitions="USE_PSDK" 121 123 MinimalRebuild="true" 122 124 BasicRuntimeChecks="3" … … 138 140 Name="VCLinkerTool" 139 141 AdditionalDependencies="Msi.lib" 140 ModuleDefinitionFile=" main_dll.def"142 ModuleDefinitionFile="firewall.def" 141 143 GenerateDebugInformation="true" 142 144 TargetMachine="17" … … 193 195 Name="VCCLCompilerTool" 194 196 AdditionalIncludeDirectories="..\..\include" 197 PreprocessorDefinitions="USE_PSDK" 195 198 RuntimeLibrary="2" 196 199 WarningLevel="3" … … 210 213 Name="VCLinkerTool" 211 214 AdditionalDependencies="Msi.lib" 212 ModuleDefinitionFile=" main_dll.def"215 ModuleDefinitionFile="firewall.def" 213 216 GenerateDebugInformation="true" 214 217 OptimizeReferences="2" … … 268 271 Name="VCCLCompilerTool" 269 272 AdditionalIncludeDirectories="..\..\include" 273 PreprocessorDefinitions="USE_PSDK" 270 274 RuntimeLibrary="2" 271 275 WarningLevel="3" … … 286 290 AdditionalDependencies="Msi.lib" 287 291 OutputFile="$(OutDir)\$(ProjectName).dll" 288 ModuleDefinitionFile=" main_dll.def"292 ModuleDefinitionFile="firewall.def" 289 293 GenerateDebugInformation="false" 290 294 OptimizeReferences="2" -
include/checkHelpers.hpp
r208a88c r9bb220f 329 329 } 330 330 static TType parse(std::wstring s) { 331 return strEx::stoi64_as_BKMG(s); 331 TType val = strEx::stoi64_as_BKMG(s); 332 if (val == 0 && s.length() > 1 && s[0] != L'0') 333 NSC_LOG_MESSAGE_STD(_T("Maybe this is not what you want: ") + s + _T(" = ") + strEx::itos(val)); 334 return val; 332 335 } 333 336 static TType parse_percent(std::wstring s) { … … 364 367 public: 365 368 static TType parse(std::wstring s) { 366 return strEx::stoi64_as_time(s); 369 TType val = strEx::stoi64_as_time(s); 370 if (val == 0 && s.length() > 1 && s[0] != L'0') 371 NSC_LOG_MESSAGE_STD(_T("Maybe this is not what you want: ") + s + _T(" = 0")); 372 return val; 367 373 } 368 374 static TType parse_percent(std::wstring s) { … … 397 403 public: 398 404 static int parse(std::wstring s) { 399 return strEx::stoi(s); 405 int val = strEx::stoi(s); 406 if (val == 0 && s.length() > 1 && s[0] != L'0') 407 NSC_LOG_MESSAGE_STD(_T("Maybe this is not what you want: ") + s + _T(" = 0")); 408 return val; 400 409 } 401 410 static int parse_percent(std::wstring s) { … … 427 436 public: 428 437 static __int64 parse(std::wstring s) { 429 return strEx::stoi64(s); 438 __int64 val = strEx::stoi64(s); 439 if (val == 0 && s.length() > 1 && s[0] != L'0') 440 NSC_LOG_MESSAGE_STD(_T("Maybe this is not what you want: ") + s + _T(" = 0")); 441 return val; 430 442 } 431 443 static __int64 parse_percent(std::wstring s) { … … 852 864 return true; 853 865 } else { 854 NSC_ DEBUG_MSG_STD(_T("Missing bounds for check: ") + lable);866 NSC_LOG_MESSAGE_STD(_T("Missing bounds for check: ") + lable); 855 867 //std::cout << "No bounds specified..." << std::endl; 856 868 } … … 927 939 return min.gatherPerfData(alias, value, warn.min.getPerfBound(value), crit.min.getPerfBound(value)); 928 940 } else { 929 NSC_ DEBUG_MSG_STD(_T("Missing bounds for maxmin-bounds check: ") + alias);941 NSC_LOG_MESSAGE_STD(_T("Missing bounds for maxmin-bounds check: ") + alias); 930 942 return min.gatherPerfData(alias, value, 0, 0); 931 943 } … … 1025 1037 return eq.gatherPerfData(alias, value, warn.eq.getPerfBound(value), crit.eq.getPerfBound(value)); 1026 1038 } else { 1027 NSC_ DEBUG_MSG_STD(_T("Missing bounds for: ") + alias);1039 NSC_LOG_MESSAGE_STD(_T("Missing bounds for: ") + alias); 1028 1040 } 1029 1041 } -
include/config.h
r42ff14d r9bb220f 157 157 #define C_SYSTEM_ENUMPROC_METHOD_DEFAULT C_SYSTEM_ENUMPROC_METHOD_AUTO 158 158 159 #define CHECK_DISK_SECTION_TITLE _T("Check Disk") 160 #define CHECK_DISK_SHOW_ERRORS _T("show_errors") 161 #define CHECK_DISK_SHOW_ERRORS_DEFAULT 0 159 162 160 163 #define EVENTLOG_SECTION_TITLE _T("Eventlog") -
include/filter_framework.hpp
r208a88c r9bb220f 68 68 struct numeric_max_filter { 69 69 static bool filter(TType filter, TType value) { 70 //std::wcout << filter << _T(" >= ") << value << std::endl; 70 71 return value >= filter; 71 72 } … … 113 114 static std::wstring parse(std::wstring str) { 114 115 return str; 116 } 117 static std::wstring print(std::wstring value) { 118 return value; 115 119 } 116 120 }; … … 194 198 template <typename TFilterType, typename TValueType, class THandler, class TFilter> 195 199 struct filter_one { 196 TFilterType filter ;200 TFilterType filter_; 197 201 bool hasFilter_; 198 202 std::wstring value_; 199 203 filter_one() : hasFilter_(false) {} 200 filter_one(const filter_one &other) : hasFilter_(other.hasFilter_), filter (other.filter), value_(other.value_) {204 filter_one(const filter_one &other) : hasFilter_(other.hasFilter_), filter_(other.filter_), value_(other.value_) { 201 205 } 202 206 … … 205 209 } 206 210 bool matchFilter(const TValueType value) const { 207 return TFilter::filter(filter , value);211 return TFilter::filter(filter_, value); 208 212 } 209 213 const filter_one & operator=(std::wstring value) { … … 211 215 hasFilter_ = false; 212 216 try { 213 filter = THandler::parse(value);217 filter_ = THandler::parse(value); 214 218 hasFilter_ = true; 215 219 } catch (handlers::handler_exception e) { … … 366 370 return *this; 367 371 } 368 #define NSCP_FF_DEBUG_NUM(key) if (key.hasFilter()) return _T( # key ) + key.value_;372 #define NSCP_FF_DEBUG_NUM(key) if (key.hasFilter()) strEx::append_list(str, std::wstring(_T( # key )) + _T(" ") + key.getValue(), _T(",")); 369 373 std::wstring to_string() const { 374 std::wstring str; 370 375 NSCP_FF_DEBUG_NUM(max); 371 376 NSCP_FF_DEBUG_NUM(min); 372 377 NSCP_FF_DEBUG_NUM(eq); 373 378 NSCP_FF_DEBUG_NUM(neq); 374 //NSCP_FF_DEBUG_NUM(inList);375 return _T(" MISSING! ");379 NSCP_FF_DEBUG_NUM(inList); 380 return str; 376 381 } 377 382 std::wstring getValue() const { -
modules/CheckDisk/CheckDisk.cpp
r42ff14d r9bb220f 36 36 } 37 37 38 CheckDisk::CheckDisk() {38 CheckDisk::CheckDisk() : show_errors_(false) { 39 39 } 40 40 CheckDisk::~CheckDisk() { … … 50 50 NSCModuleHelper::registerCommand(_T("CheckDriveSize"), _T("Check the size (free-space) of a drive or volume.")); 51 51 NSCModuleHelper::registerCommand(_T("CheckFile"), _T("Check various aspects of a file and/or folder.")); 52 53 show_errors_ = NSCModuleHelper::getSettingsInt(CHECK_DISK_SECTION_TITLE, CHECK_DISK_SHOW_ERRORS, CHECK_DISK_SHOW_ERRORS_DEFAULT)==1; 52 54 } catch (NSCModuleHelper::NSCMHExcpetion &e) { 53 55 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + e.msg_); … … 72 74 virtual void report_error(std::wstring error) = 0; 73 75 virtual void report_warning(std::wstring error) = 0; 76 virtual bool has_error() = 0; 77 virtual std::wstring get_error() = 0; 74 78 }; 75 79 … … 86 90 struct get_size : public baseFinderFunction 87 91 { 88 bool error; 89 get_size() : size(0), error(false) { } 92 get_size() : size(0) { } 90 93 result_type operator()(argument_type ffd) { 91 94 if (!is_directory(ffd.wfd.dwFileAttributes)) { … … 97 100 return size; 98 101 } 99 inline const bool hasError() const {100 return error;101 }102 102 inline void setError(error_reporter *errors, std::wstring msg) { 103 103 if (errors != NULL) 104 104 errors->report_error(msg); 105 error = true;106 105 } 107 106 private: … … 110 109 111 110 template <class finder_function> 112 void recursive_scan(std::wstring dir, std::wstring pattern, int current_level, int max_level, finder_function & f, error_reporter * errors, bool debug ) {111 void recursive_scan(std::wstring dir, std::wstring pattern, int current_level, int max_level, finder_function & f, error_reporter * errors, bool debug, bool recursive = false) { 113 112 if ((max_level != -1) && (current_level > max_level)) 114 113 return; … … 116 115 117 116 DWORD fileAttr = GetFileAttributes(dir.c_str()); 117 if ((fileAttr == INVALID_FILE_ATTRIBUTES)&&(!recursive)) { 118 errors->report_error(_T("Invalid file specified: ") + dir); 119 } else if (fileAttr == INVALID_FILE_ATTRIBUTES) { 120 errors->report_warning(_T("Invalid file specified: ") + dir); 121 } 118 122 if (debug) NSC_DEBUG_MSG_STD(_T("Input is: ") + dir + _T(" / ") + strEx::ihextos(fileAttr)); 119 123 … … 127 131 f(file_finder_data(wfd, single_path.first, errors)); 128 132 FindClose(hFind); 133 } else { 134 NSC_DEBUG_MSG_STD(_T("File was NOT found!")); 129 135 } 130 136 return; … … 147 153 if (is_directory(wfd.dwFileAttributes)) { 148 154 if ( (wcscmp(wfd.cFileName, _T(".")) != 0) && (wcscmp(wfd.cFileName, _T("..")) != 0) ) 149 recursive_scan<finder_function>(dir + _T("\\") + wfd.cFileName, pattern, current_level+1, max_level, f, errors, debug );155 recursive_scan<finder_function>(dir + _T("\\") + wfd.cFileName, pattern, current_level+1, max_level, f, errors, debug, true); 150 156 } 151 157 } while (FindNextFile(hFind, &wfd)); … … 355 361 356 362 class NSC_error : public error_reporter { 363 int error_count_; 364 int warning_count_; 365 std::wstring first_error_; 366 std::wstring last_error_; 367 public: 368 NSC_error() : error_count_(0), warning_count_(0) {} 357 369 void report_error(std::wstring error) { 370 if (error_count_==0) 371 first_error_ = error; 372 else 373 last_error_ = error; 374 error_count_++; 358 375 NSC_LOG_ERROR(error); 359 376 } 360 377 void report_warning(std::wstring error) { 361 378 NSC_LOG_MESSAGE(error); 379 } 380 std::wstring get_error() { 381 return strEx::itos(error_count_) + _T(" errors and ") + strEx::itos(warning_count_) + _T(" warnings where returned: ") + first_error_; 382 } 383 bool has_error() { 384 return error_count_ > 0; 362 385 } 363 386 }; … … 431 454 pattern_type splitpath = split_pattern(path.data); 432 455 recursive_scan<get_size>(splitpath.first, splitpath.second, -1, -1, sizeFinder, &errors, debug); 433 if (sizeFinder.hasError()) { 434 message = _T("File not found check log for details"); 456 if (errors.has_error()) { 457 if (show_errors_) 458 message = errors.get_error(); 459 else 460 message = _T("Check contains error. Check log for details (or enable show_errors in nsc.ini)"); 435 461 return NSCAPI::returnUNKNOWN; 436 462 } … … 454 480 bool has_error; 455 481 456 static file_info get( std::wstring path, std::wstring file) {457 return get_2( path, file);458 } 459 static file_info get( file_finder_data data) {460 return file_info( data.wfd, data.path, data.wfd.cFileName);461 } 462 463 static file_info get_2( std::wstring path, std::wstring file) {482 static file_info get(__int64 now, std::wstring path, std::wstring file) { 483 return get_2(now, path, file); 484 } 485 static file_info get(__int64 now, file_finder_data data) { 486 return file_info(now, data.wfd, data.path, data.wfd.cFileName); 487 } 488 489 static file_info get_2(__int64 now, std::wstring path, std::wstring file) { 464 490 WIN32_FILE_ATTRIBUTE_DATA data; 465 491 if (!GetFileAttributesEx((path + _T("\\") + file).c_str(), GetFileExInfoStandard, reinterpret_cast<LPVOID>(&data))) { … … 468 494 return ret; 469 495 } 470 return file_info( data, path, file);471 } 472 static file_info get_1( std::wstring path, std::wstring file) {496 return file_info(now, data, path, file); 497 } 498 static file_info get_1(__int64 now, std::wstring path, std::wstring file) { 473 499 HANDLE hFile = CreateFile((path + _T("\\") + file).c_str(), FILE_READ_ATTRIBUTES, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0); 474 500 if (hFile == INVALID_HANDLE_VALUE) { … … 480 506 GetFileInformationByHandle(hFile, &_info); 481 507 CloseHandle(hFile); 482 return file_info( _info, path, file);508 return file_info(now, _info, path, file); 483 509 } 484 510 … … 488 514 , ullLastWriteTime(0) 489 515 , ullSize(0) 516 , ullNow(0) 490 517 , cached_version(false, _T("")) 491 518 , cached_count(false, 0) 492 519 {} 493 file_info( const WIN32_FILE_ATTRIBUTE_DATA info, std::wstring path_, std::wstring filename_)520 file_info(__int64 now, const WIN32_FILE_ATTRIBUTE_DATA info, std::wstring path_, std::wstring filename_) 494 521 : path(path_) 495 522 , filename(filename_) … … 498 525 , ullLastWriteTime(0) 499 526 , ullSize(0) 527 , ullNow(now) 500 528 , cached_version(false, _T("")) 501 529 , cached_count(false, 0) … … 506 534 ullLastWriteTime = ((info.ftLastWriteTime.dwHighDateTime * ((unsigned long long)MAXDWORD+1)) + (unsigned long long)info.ftLastWriteTime.dwLowDateTime); 507 535 }; 508 file_info( const BY_HANDLE_FILE_INFORMATION info, std::wstring path_, std::wstring filename_)536 file_info(__int64 now, const BY_HANDLE_FILE_INFORMATION info, std::wstring path_, std::wstring filename_) 509 537 : path(path_) 510 538 , filename(filename_) … … 513 541 , ullLastWriteTime(0) 514 542 , ullSize(0) 543 , ullNow(now) 515 544 , cached_version(false, _T("")) 516 545 , cached_count(false, 0) … … 521 550 ullLastWriteTime = ((info.ftLastWriteTime.dwHighDateTime * ((unsigned long long)MAXDWORD+1)) + (unsigned long long)info.ftLastWriteTime.dwLowDateTime); 522 551 }; 523 file_info( const WIN32_FIND_DATA info, std::wstring path_, std::wstring filename_)552 file_info(__int64 now, const WIN32_FIND_DATA info, std::wstring path_, std::wstring filename_) 524 553 : path(path_) 525 554 , filename(filename_) … … 528 557 , ullLastWriteTime(0) 529 558 , ullSize(0) 559 , ullNow(now) 530 560 , cached_version(false, _T("")) 531 561 , cached_count(false, 0) … … 536 566 ullLastWriteTime = ((info.ftLastWriteTime.dwHighDateTime * ((unsigned long long)MAXDWORD+1)) + (unsigned long long)info.ftLastWriteTime.dwLowDateTime); 537 567 }; 538 file_info( std::wstring path_, std::wstring filename_)568 file_info(__int64 now, std::wstring path_, std::wstring filename_) 539 569 : path(path_) 540 570 , filename(filename_) … … 543 573 , ullLastWriteTime(0) 544 574 , ullSize(0) 575 , ullNow(now) 545 576 , cached_version(false, _T("")) 546 577 , cached_count(false, 0) … … 575 606 strEx::replace(syntax, _T("%access%"), strEx::format_filetime(ullLastAccessTime, DATE_FORMAT)); 576 607 strEx::replace(syntax, _T("%write%"), strEx::format_filetime(ullLastWriteTime, DATE_FORMAT)); 608 strEx::replace(syntax, _T("%creation-raw%"), strEx::itos(ullCreationTime)); 609 strEx::replace(syntax, _T("%access-raw%"), strEx::itos(ullLastAccessTime)); 610 strEx::replace(syntax, _T("%write-raw%"), strEx::itos(ullLastWriteTime)); 611 strEx::replace(syntax, _T("%now-raw%"), strEx::itos(ullNow)); 577 612 /* 578 613 strEx::replace(syntax, _T("%creation-d%"), strEx::format_filetime(ullCreationTime, DATE_FORMAT)); … … 692 727 { 693 728 file_info info; 694 bool error;729 __int64 now_; 695 730 // std::wstring message; 696 find_first_file_info() : error(false) {} 731 find_first_file_info() : now_(0) { 732 FILETIME now; 733 GetSystemTimeAsFileTime(&now); 734 now_ = ((now.dwHighDateTime * ((unsigned long long)MAXDWORD+1)) + (unsigned long long)now.dwLowDateTime); 735 } 697 736 result_type operator()(argument_type ffd) { 698 737 if (is_directory(ffd.wfd.dwFileAttributes)) 699 738 return true; 700 739 701 file_info info = file_info::get( ffd);740 file_info info = file_info::get(now_, ffd); 702 741 if (!info.error.empty()) { 703 742 setError(ffd.errors, info.error); … … 720 759 */ 721 760 } 722 inline const bool hasError() const {723 return error;724 }725 761 inline void setError(error_reporter *errors, std::wstring msg) { 726 762 if (errors != NULL) 727 763 errors->report_error(msg); 728 error = true;729 764 } 730 765 }; … … 735 770 bool bFilterAll; 736 771 bool bFilterIn; 737 bool error;738 772 std::wstring message; 739 773 std::wstring syntax; … … 741 775 unsigned long long now; 742 776 unsigned int hit_count; 743 744 file_filter_function() : hit_count(0), error(false), bFilterIn(true), bFilterAll(true) {} 777 __int64 now_; 778 779 file_filter_function() : now_(0), hit_count(0), bFilterIn(true), bFilterAll(true) { 780 FILETIME now; 781 GetSystemTimeAsFileTime(&now); 782 now_ = ((now.dwHighDateTime * ((unsigned long long)MAXDWORD+1)) + (unsigned long long)now.dwLowDateTime); 783 } 745 784 result_type operator()(argument_type ffd) { 746 785 if (is_directory(ffd.wfd.dwFileAttributes)) 747 786 return true; 748 787 749 file_info info = file_info::get( ffd);788 file_info info = file_info::get(now, ffd); 750 789 if (!info.error.empty()) { 751 790 setError(ffd.errors, info.error); … … 792 831 return true; 793 832 } 794 inline const bool hasError() const {795 return error;796 }797 833 inline void setError(error_reporter *errors, std::wstring msg) { 798 834 if (errors != NULL) 799 835 errors->report_error(msg); 800 error = true;801 836 } 802 837 }; … … 815 850 bool bFilterAll; 816 851 bool bFilterIn; 817 bool error;818 852 bool debug_; 819 853 std::wstring message; 820 854 std::wstring syntax; 821 855 //std::wstring alias; 822 unsigned long long now ;856 unsigned long long now_; 823 857 unsigned int hit_count; 824 858 unsigned int file_count; 825 std::wstring last_error; 826 unsigned int error_count; 827 828 file_filter_function_ex() : hit_count(0), file_count(0), error(false), debug_(false), bFilterIn(true), bFilterAll(true), error_count(0) {} 859 860 file_filter_function_ex() : hit_count(0), file_count(0), debug_(false), bFilterIn(true), bFilterAll(true), now_(0) { 861 FILETIME now; 862 GetSystemTimeAsFileTime(&now); 863 now_ = ((now.dwHighDateTime * ((unsigned long long)MAXDWORD+1)) + (unsigned long long)now.dwLowDateTime); 864 } 829 865 result_type operator()(argument_type ffd) { 830 866 if (is_directory(ffd.wfd.dwFileAttributes)) 831 867 return true; 832 868 833 file_info info = file_info::get( ffd);869 file_info info = file_info::get(now_, ffd); 834 870 if (!info.error.empty()) { 835 871 setError(ffd.errors, info.error); … … 889 925 return true; 890 926 } 891 inline const bool hasError() const {892 return error;893 }894 927 inline void setError(error_reporter *errors, std::wstring msg) { 895 928 if (errors != NULL) 896 929 errors->report_error(msg); 897 last_error = msg;898 error_count++;899 error = true;900 930 } 901 931 … … 941 971 pattern_type splitpath = split_pattern(path); 942 972 recursive_scan<find_first_file_info>(splitpath.first, splitpath.second, -1, -1, finder, &errors, debug); 943 if ( finder.hasError()) {944 message = _T("File not found (check log for details)");945 return NSCAPI::returnUNKNOWN;946 }947 FILETIME now_;948 GetSystemTimeAsFileTime(&now_);949 unsigned long long now = ((now_.dwHighDateTime * ((unsigned long long)MAXDWORD+1)) + (unsigned long long)now_.dwLowDateTime);950 time_t value = ( now-finder.info.ullLastWriteTime)/10000000;973 if (errors.has_error()) { 974 if (show_errors_) 975 message = errors.get_error(); 976 else 977 message = _T("Check contains error. Check log for details (or enable show_errors in nsc.ini)"); 978 return NSCAPI::returnUNKNOWN; 979 } 980 time_t value = (finder.now_-finder.info.ullLastWriteTime)/10000000; 951 981 message = strEx::itos(value/60) + _T("&") + strEx::format_time_delta(gmtime(&value), format); 952 982 return NSCAPI::returnOK; … … 999 1029 return NSCAPI::returnUNKNOWN; 1000 1030 } 1001 FILETIME now;1002 GetSystemTimeAsFileTime(&now);1003 finder.now = ((now.dwHighDateTime * ((unsigned long long)MAXDWORD+1)) + (unsigned long long)now.dwLowDateTime);1004 1031 finder.syntax = syntax; 1005 1032 NSC_error errors; … … 1007 1034 pattern_type path = split_pattern(*pit); 1008 1035 recursive_scan<file_filter_function>(path.first, path.second, 0, max_dir_depth, finder, &errors, debug); 1009 if (finder.hasError()) { 1010 message = _T("File not found: ") + (*pit) + _T(" check log for details."); 1036 if (errors.has_error()) { 1037 if (show_errors_) 1038 message = errors.get_error(); 1039 else 1040 message = _T("Check contains error. Check log for details (or enable show_errors in nsc.ini)"); 1011 1041 return NSCAPI::returnUNKNOWN; 1012 1042 } 1013 1043 } 1014 1044 message = finder.message; 1015 if (finder.error)1016 return NSCAPI::returnUNKNOWN;1017 1045 if (!alias.empty()) 1018 1046 query.alias = alias; … … 1120 1148 return NSCAPI::returnUNKNOWN; 1121 1149 } 1122 FILETIME now;1123 GetSystemTimeAsFileTime(&now);1124 1150 finder.debug_ = debug; 1125 finder.now = ((now.dwHighDateTime * ((unsigned long long)MAXDWORD+1)) + (unsigned long long)now.dwLowDateTime);1126 1151 if (debug) 1127 NSC_DEBUG_MSG_STD(_T("NOW: ") + strEx::format_filetime(finder.now ));1152 NSC_DEBUG_MSG_STD(_T("NOW: ") + strEx::format_filetime(finder.now_)); 1128 1153 finder.syntax = syntax; 1129 1154 NSC_error errors; 1130 1155 for (std::list<std::wstring>::const_iterator pit = paths.begin(); pit != paths.end(); ++pit) { 1131 1156 recursive_scan<file_filter_function_ex>(*pit, pattern, 0, max_dir_depth, finder, &errors, debug); 1132 if (!ignoreError && finder.hasError()) { 1133 message = _T("Error when scanning: ") + (*pit) + _T(" check log for details (") + strEx::itos(finder.error_count) + _T(": ") + finder.last_error + _T(")"); 1157 if (!ignoreError && errors.has_error()) { 1158 if (show_errors_) 1159 message = errors.get_error(); 1160 else 1161 message = _T("Check contains error. Check log for details (or enable show_errors in nsc.ini)"); 1134 1162 return NSCAPI::returnUNKNOWN; 1135 1163 } … … 1159 1187 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0); 1160 1188 if (hFile == INVALID_HANDLE_VALUE) { 1161 return file_container( file, _T("Could not open file: ") + file);1189 return file_container(now, file, _T("Could not open file: ") + file); 1162 1190 } 1163 1191 GetFileInformationByHandle(hFile, &_info); 1164 1192 CloseHandle(hFile); 1165 file_container info( _info, file);1166 info.ullNow = now;1193 file_container info(now, _info, file); 1194 //info.ullNow = now; 1167 1195 return info; 1168 1196 } 1169 1197 1170 1198 1171 file_container( const BY_HANDLE_FILE_INFORMATION info, std::wstring file) : file_info(info, file_helpers::meta::get_path(file), file_helpers::meta::get_filename(file)) {}1172 file_container( std::wstring file, std::wstring error) : error_(error), file_info(file_helpers::meta::get_path(file), file_helpers::meta::get_filename(file)) {}1199 file_container(__int64 now, const BY_HANDLE_FILE_INFORMATION info, std::wstring file) : file_info(now, info, file_helpers::meta::get_path(file), file_helpers::meta::get_filename(file)) {} 1200 file_container(__int64 now, std::wstring file, std::wstring error) : error_(error), file_info(now, file_helpers::meta::get_path(file), file_helpers::meta::get_filename(file)) {} 1173 1201 1174 1202 bool has_errors() { -
modules/CheckDisk/CheckDisk.h
r1b3afb4 r9bb220f 27 27 class CheckDisk { 28 28 private: 29 bool show_errors_; 29 30 30 31 public: -
modules/CheckEventLog/CheckEventLog-2005.vcproj
rdcd5462 r9bb220f 214 214 MinimalRebuild="true" 215 215 BasicRuntimeChecks="3" 216 RuntimeLibrary=" 3"216 RuntimeLibrary="1" 217 217 UsePrecompiledHeader="2" 218 218 WarningLevel="3" … … 297 297 MinimalRebuild="true" 298 298 BasicRuntimeChecks="3" 299 RuntimeLibrary=" 3"299 RuntimeLibrary="1" 300 300 UsePrecompiledHeader="2" 301 301 WarningLevel="3" -
modules/CheckEventLog/CheckEventLog.cpp
r208a88c r9bb220f 23 23 #include "CheckEventLog.h" 24 24 #include <filter_framework.hpp> 25 #include <boost/foreach.hpp> 25 26 26 27 #include <strEx.h> … … 446 447 timeWritten.hasFilter() || timeGenerated.hasFilter(); 447 448 } 448 std::wstring getValue() const { 449 if (eventSource.hasFilter()) 450 return _T("event-source: ") + eventSource.getValue(); 451 if (eventType.hasFilter()) 452 return _T("event-type: ") + eventType.getValue(); 453 if (eventSeverity.hasFilter()) 454 return _T("severity: ") + eventSeverity.getValue(); 455 if (eventID.hasFilter()) 456 return _T("event-id: ") + eventID.getValue(); 457 if (message.hasFilter()) 458 return _T("message: ") + message.getValue(); 459 if (timeWritten.hasFilter()) 460 return _T("time-written: ") + timeWritten.getValue(); 461 if (timeGenerated.hasFilter()) 462 return _T("time-generated: ") + timeGenerated.getValue(); 463 return _T("UNknown..."); 449 450 #define NSCP_EL_DEBUG(key) if (key.hasFilter()) strEx::append_list(str, std::wstring(_T( # key )) + _T(" ") + key.to_string(), _T(",")); 451 std::wstring to_string() const { 452 std::wstring str; 453 NSCP_EL_DEBUG(eventSource); 454 NSCP_EL_DEBUG(eventType); 455 NSCP_EL_DEBUG(eventSeverity); 456 NSCP_EL_DEBUG(eventID); 457 NSCP_EL_DEBUG(message); 458 NSCP_EL_DEBUG(timeWritten); 459 NSCP_EL_DEBUG(timeGenerated); 460 return str; 464 461 } 465 462 bool matchFilter(const EventLogRecord &value) const { 463 bool ret = false; 466 464 if ((eventSource.hasFilter())&&(eventSource.matchFilter(value.eventSource()))) 467 return true; 465 ret = true; 466 else if (eventSource.hasFilter()) 467 return false; 468 468 else if ((eventType.hasFilter())&&(eventType.matchFilter(value.eventType()))) 469 return true; 469 ret = true; 470 else if (eventType.hasFilter()) 471 return false; 470 472 else if ((eventSeverity.hasFilter())&&(eventSeverity.matchFilter(value.severity()))) 471 return true; 473 ret = true; 474 else if (eventSeverity.hasFilter()) 475 return false; 472 476 else if ((eventID.hasFilter())&&(eventID.matchFilter(value.eventID()))) 473 return true; 477 ret = true; 478 else if (eventID.hasFilter()) 479 return false; 474 480 else if ((message.hasFilter())&&(message.matchFilter(value.enumStrings()))) 475 return true; 481 ret = true; 482 else if (message.hasFilter()) 483 return false; 476 484 else if ((timeWritten.hasFilter())&&(timeWritten.matchFilter(value.timeWritten()))) 477 return true; 485 ret = true; 486 else if (timeWritten.hasFilter()) 487 return false; 478 488 else if ((timeGenerated.hasFilter())&&(timeGenerated.matchFilter(value.timeGenerated()))) 479 return true; 480 return false; 489 ret = true; 490 else if (timeGenerated.hasFilter()) 491 return false; 492 return ret; 481 493 } 482 494 }; … … 484 496 485 497 #define MAP_FILTER(value, obj, filtermode) \ 486 else if (p__.first == value) { eventlog_filter filter; filter.obj = p__.second; filter_chain.push_back(filteritem_type(filtermode, filter)); } 498 else if (p__.first == value) { filter.obj = p__.second; if (bPush) { filter_chain.push_back(filteritem_type(filtermode, filter)); filter = eventlog_filter(); } } 499 #define MAP_FILTER_LAST(value, obj) \ 500 else if (p__.first == value) { filter_chain.front().second.obj = p__.second; } 487 501 488 502 struct event_log_buffer { … … 532 546 const int filter_compat = 3; 533 547 event_log_buffer buffer(buffer_length_); 548 bool bPush = true; 549 bool bDebug = debug_; 550 eventlog_filter filter; 534 551 /* 535 552 try { … … 553 570 MAP_OPTIONS_BOOL_EX(_T("filter"), bFilterIn, _T("in"), _T("out")) 554 571 MAP_OPTIONS_BOOL_EX(_T("filter"), bFilterAll, _T("all"), _T("any")) 572 MAP_OPTIONS_BOOL_EX(_T("auto-push"), bPush, _T("true"), _T("false")) 573 MAP_OPTIONS_BOOL_EX(_T("debug"), bDebug, _T("true"), _T("false")) 555 574 MAP_OPTIONS_STR(_T("syntax"), syntax) 556 575 /* … … 587 606 MAP_FILTER(_T("filter-message"), message, filter_minus) 588 607 608 MAP_FILTER_LAST(_T("append-filter-eventType"), eventType) 609 MAP_FILTER_LAST(_T("append-filter-severity"), eventSeverity) 610 MAP_FILTER_LAST(_T("append-filter-eventID"), eventID) 611 MAP_FILTER_LAST(_T("append-filter-eventSource"), eventSource) 612 MAP_FILTER_LAST(_T("append-filter-generated"), timeGenerated) 613 MAP_FILTER_LAST(_T("append-filter-written"), timeWritten) 614 MAP_FILTER_LAST(_T("append-filter-message"), message) 615 616 589 617 MAP_OPTIONS_MISSING(message, _T("Unknown argument: ")) 590 618 MAP_OPTIONS_END() … … 609 637 } 610 638 bool buffer_error_reported = false; 611 639 if (bDebug) { 640 std::wstring str; 641 BOOST_FOREACH(filteritem_type item, filter_chain) { 642 if (item.first == filter_normal) 643 str += _T(". {"); 644 else if (item.first == filter_plus) 645 str += _T("+ {"); 646 else if (item.first == filter_minus) 647 str += _T("- {"); 648 else 649 str += _T("? {"); 650 651 str += item.second.to_string() + _T(" }"); 652 } 653 NSC_DEBUG_MSG_STD(_T("Filter: ") + str); 654 } 655 656 bDebug = false; 612 657 for (std::list<std::wstring>::const_iterator cit2 = files.begin(); cit2 != files.end(); ++cit2) { 613 658 std::wstring name = *cit2; … … 684 729 if ((mode == filter_minus)&&(bTmpMatched)) { 685 730 // a -<filter> hit so thrash item and bail out! 686 if ( debug_)687 NSC_DEBUG_MSG_STD(_T("Matched: - ") + (*cit3).second. getValue() + _T(" for: ") + record.render(bShowDescriptions, syntax));731 if (bDebug) 732 NSC_DEBUG_MSG_STD(_T("Matched: - ") + (*cit3).second.to_string() + _T(" for: ") + record.render(bShowDescriptions, syntax)); 688 733 bMatch = false; 689 734 break; 690 735 } else if ((mode == filter_plus)&&(!bTmpMatched)) { 691 736 // a +<filter> missed hit so thrash item and bail out! 692 if ( debug_)693 NSC_DEBUG_MSG_STD(_T("Matched: + ") + (*cit3).second. getValue() + _T(" for: ") + record.render(bShowDescriptions, syntax));737 if (bDebug) 738 NSC_DEBUG_MSG_STD(_T("Matched: + ") + (*cit3).second.to_string() + _T(" for: ") + record.render(bShowDescriptions, syntax)); 694 739 bMatch = false; 695 740 break; 696 741 } else if (bTmpMatched) { 697 if ( debug_)698 NSC_DEBUG_MSG_STD(_T("Matched: . (contiunue): ") + (*cit3).second. getValue() + _T(" for: ") + record.render(bShowDescriptions, syntax));742 if (bDebug) 743 NSC_DEBUG_MSG_STD(_T("Matched: . (contiunue): ") + (*cit3).second.to_string() + _T(" for: ") + record.render(bShowDescriptions, syntax)); 699 744 bMatch = true; 700 745 } -
modules/CheckWMI/Jamfile
r308b6f5 r9bb220f 5 5 : requirements 6 6 <find-static-library>Wbemuuid 7 <find-static-library>atls 7 8 ; 8 9 -
modules/LUAScript/LUAScript-2005.vcproj
r1fc246c r9bb220f 69 69 <Tool 70 70 Name="VCLinkerTool" 71 AdditionalDependencies="l ua.lib"71 AdditionalDependencies="liblua.lib" 72 72 OutputFile="$(OutDir)\$(ProjectName).dll" 73 73 LinkIncremental="2" … … 153 153 <Tool 154 154 Name="VCLinkerTool" 155 AdditionalDependencies="l ua.lib"155 AdditionalDependencies="liblua.lib" 156 156 OutputFile="$(OutDir)\$(ProjectName).dll" 157 157 LinkIncremental="2" … … 233 233 <Tool 234 234 Name="VCLinkerTool" 235 AdditionalDependencies="l ua.lib"235 AdditionalDependencies="liblua.lib" 236 236 OutputFile="$(OutDir)\$(ProjectName).dll" 237 237 LinkIncremental="1" … … 315 315 <Tool 316 316 Name="VCLinkerTool" 317 AdditionalDependencies="l ua.lib"317 AdditionalDependencies="liblua.lib" 318 318 OutputFile="$(OutDir)\$(ProjectName).dll" 319 319 LinkIncremental="1" … … 396 396 <Tool 397 397 Name="VCLinkerTool" 398 AdditionalDependencies="l ua.lib"398 AdditionalDependencies="liblua.lib" 399 399 OutputFile="$(OutDir)\$(ProjectName).dll" 400 400 LinkIncremental="1" … … 478 478 <Tool 479 479 Name="VCLinkerTool" 480 AdditionalDependencies="l ua.lib"480 AdditionalDependencies="liblua.lib" 481 481 OutputFile="$(OutDir)\$(ProjectName).dll" 482 482 LinkIncremental="1" … … 557 557 <Tool 558 558 Name="VCLinkerTool" 559 AdditionalDependencies="l ua.lib"559 AdditionalDependencies="liblua.lib" 560 560 OutputFile="$(OutDir)\$(ProjectName).dll" 561 561 LinkIncremental="1" … … 636 636 <Tool 637 637 Name="VCLinkerTool" 638 AdditionalDependencies="l ua.lib"638 AdditionalDependencies="liblua.lib" 639 639 OutputFile="$(OutDir)\$(ProjectName).dll" 640 640 LinkIncremental="1" … … 719 719 <Tool 720 720 Name="VCLinkerTool" 721 AdditionalDependencies="l ua.lib"721 AdditionalDependencies="liblua.lib" 722 722 OutputFile="$(OutDir)\$(ProjectName).dll" 723 723 LinkIncremental="2" … … 803 803 <Tool 804 804 Name="VCLinkerTool" 805 AdditionalDependencies="l ua.lib"805 AdditionalDependencies="liblua.lib" 806 806 OutputFile="$(OutDir)\$(ProjectName).dll" 807 807 LinkIncremental="2" … … 881 881 <Tool 882 882 Name="VCLinkerTool" 883 AdditionalDependencies="l ua.lib"883 AdditionalDependencies="liblua.lib" 884 884 OutputFile="$(OutDir)\$(ProjectName).dll" 885 885 LinkIncremental="1" … … 960 960 <Tool 961 961 Name="VCLinkerTool" 962 AdditionalDependencies="l ua.lib"962 AdditionalDependencies="liblua.lib" 963 963 OutputFile="$(OutDir)\$(ProjectName).dll" 964 964 LinkIncremental="1" -
modules/NRPEClient/Jamfile
r1d53fe0 r9bb220f 14 14 ../../include/arrayBuffer.cpp 15 15 ../../include/utils.cpp 16 ../../include/Socket.cpp 17 ../../include/sslSocket.cpp 18 /openssl//socket 16 19 17 20 : # requirements 18 21 <def-file>$(source).def 19 <source>/openssl//socket20 22 <runtime-link>static 21 23 <source>/boost//regexp -
modules/NRPEListener/Jamfile
r1d53fe0 r9bb220f 15 15 ../../include/b64/b64.c 16 16 ../../include/utils.cpp 17 ../../include/Socket.cpp 18 ../../include/sslSocket.cpp 19 /openssl//socket 17 20 18 21 : # requirements 19 22 <def-file>$(source).def 20 <source>/openssl//socket21 23 <runtime-link>static 22 24 -
modules/NSCAAgent/NSCAAgent-2005.vcproj
r3692371 r9bb220f 69 69 <Tool 70 70 Name="VCLinkerTool" 71 AdditionalDependencies="ws2_32.lib Crypto++.lib"71 AdditionalDependencies="ws2_32.lib libcryptopp.lib" 72 72 OutputFile="$(OutDir)\$(ProjectName).dll" 73 73 LinkIncremental="2" … … 153 153 <Tool 154 154 Name="VCLinkerTool" 155 AdditionalDependencies="ws2_32.lib Crypto++.lib"155 AdditionalDependencies="ws2_32.lib libcryptopp.lib" 156 156 OutputFile="$(OutDir)\$(ProjectName).dll" 157 157 LinkIncremental="2" … … 233 233 <Tool 234 234 Name="VCLinkerTool" 235 AdditionalDependencies="ws2_32.lib Crypto++.lib"235 AdditionalDependencies="ws2_32.lib libcryptopp.lib" 236 236 OutputFile="$(OutDir)\$(ProjectName).dll" 237 237 LinkIncremental="1" … … 315 315 <Tool 316 316 Name="VCLinkerTool" 317 AdditionalDependencies="ws2_32.lib Crypto++.lib"317 AdditionalDependencies="ws2_32.lib libcryptopp.lib" 318 318 OutputFile="$(OutDir)\$(ProjectName).dll" 319 319 LinkIncremental="1" … … 396 396 <Tool 397 397 Name="VCLinkerTool" 398 AdditionalDependencies="ws2_32.lib Crypto++.lib"398 AdditionalDependencies="ws2_32.lib libcryptopp.lib" 399 399 OutputFile="$(OutDir)\$(ProjectName).dll" 400 400 LinkIncremental="1" … … 478 478 <Tool 479 479 Name="VCLinkerTool" 480 AdditionalDependencies="ws2_32.lib Crypto++.lib"480 AdditionalDependencies="ws2_32.lib libcryptopp.lib" 481 481 OutputFile="$(OutDir)\$(ProjectName).dll" 482 482 LinkIncremental="1" … … 559 559 <Tool 560 560 Name="VCLinkerTool" 561 AdditionalDependencies="ws2_32.lib Crypto++.lib"561 AdditionalDependencies="ws2_32.lib libcryptopp.lib" 562 562 OutputFile="$(OutDir)\$(ProjectName).dll" 563 563 LinkIncremental="1" … … 641 641 <Tool 642 642 Name="VCLinkerTool" 643 AdditionalDependencies="ws2_32.lib Crypto++.lib"643 AdditionalDependencies="ws2_32.lib libcryptopp.lib" 644 644 OutputFile="$(OutDir)\$(ProjectName).dll" 645 645 LinkIncremental="1" … … 725 725 <Tool 726 726 Name="VCLinkerTool" 727 AdditionalDependencies="ws2_32.lib Crypto++.lib"727 AdditionalDependencies="ws2_32.lib libcryptopp.lib" 728 728 OutputFile="$(OutDir)\$(ProjectName).dll" 729 729 LinkIncremental="2" … … 809 809 <Tool 810 810 Name="VCLinkerTool" 811 AdditionalDependencies="ws2_32.lib Crypto++.lib"811 AdditionalDependencies="ws2_32.lib libcryptopp.lib" 812 812 OutputFile="$(OutDir)\$(ProjectName).dll" 813 813 LinkIncremental="2" … … 889 889 <Tool 890 890 Name="VCLinkerTool" 891 AdditionalDependencies="ws2_32.lib Crypto++.lib"891 AdditionalDependencies="ws2_32.lib libcryptopp.lib" 892 892 OutputFile="$(OutDir)\$(ProjectName).dll" 893 893 LinkIncremental="1" … … 971 971 <Tool 972 972 Name="VCLinkerTool" 973 AdditionalDependencies="ws2_32.lib Crypto++.lib"973 AdditionalDependencies="ws2_32.lib libcryptopp.lib" 974 974 OutputFile="$(OutDir)\$(ProjectName).dll" 975 975 LinkIncremental="1" -
modules/NSCAAgent/NSCAThread.cpp
re7dbac9 r9bb220f 87 87 88 88 encryption_method_ = NSCModuleHelper::getSettingsInt(NSCA_AGENT_SECTION_TITLE, NSCA_ENCRYPTION, NSCA_ENCRYPTION_DEFAULT); 89 password_ = strEx::wstring_to_string(NSCModuleHelper::getSettingsString(NSCA_AGENT_SECTION_TITLE, NSCA_PASSWORD, NSCA_PASSWORD_DEFAULT)); 89 std::wstring password = NSCModuleHelper::getSettingsString(NSCA_AGENT_SECTION_TITLE, MAIN_OBFUSCATED_PASWD, MAIN_OBFUSCATED_PASWD_DEFAULT); 90 if (!password.empty()) 91 password = NSCModuleHelper::Decrypt(password); 92 if (password.empty()) 93 password = NSCModuleHelper::getSettingsString(NSCA_AGENT_SECTION_TITLE, NSCA_PASSWORD, NSCA_PASSWORD_DEFAULT); 94 if (password.empty()) { 95 // read main password if no NSCA one is found 96 password = NSCModuleHelper::getSettingsString(MAIN_SECTION_TITLE, MAIN_OBFUSCATED_PASWD, MAIN_OBFUSCATED_PASWD_DEFAULT); 97 if (!password.empty()) 98 password = NSCModuleHelper::Decrypt(password); 99 if (password.empty()) 100 password = NSCModuleHelper::getSettingsString(MAIN_SECTION_TITLE, MAIN_SETTINGS_PWD, MAIN_SETTINGS_PWD_DEFAULT); 101 } 102 password_ = strEx::wstring_to_string(password); 103 90 104 cacheNscaHost_ = NSCModuleHelper::getSettingsInt(NSCA_AGENT_SECTION_TITLE, NSCA_CACHE_HOST, NSCA_CACHE_HOST_DEFAULT) == 1; 91 105 std::list<std::wstring> items = NSCModuleHelper::getSettingsSection(NSCA_CMD_SECTION_TITLE); -
release-build.bat
r2e8b33f r9bb220f 6 6 7 7 echo %jam% --toolset=msvc --with-cryptopp=%CRYPTOPP_SOURCE% --with-cryptopp-target=%NSCP_INCLUDE%\cryptopp cryptopp-headers >> build.log 8 %jam% --toolset=msvc --with-cryptopp=%CRYPTOPP_SOURCE% --with-cryptopp-target=%NSCP_INCLUDE%\cryptopp cryptopp-headers8 %jam% --toolset=msvc --with-cryptopp=%CRYPTOPP_SOURCE% --with-cryptopp-target=%NSCP_INCLUDE%\cryptopp cryptopp-headers 9 9 if %ERRORLEVEL% == -1 goto :error 10 10 echo :: Result: %ERRORLEVEL% >> build.log 11 11 12 12 echo %jam% --toolset=msvc source-archive >> build.log 13 %jam% --toolset=msvc source-archive13 %jam% --toolset=msvc source-archive 14 14 if %ERRORLEVEL% == -1 goto :error 15 15 echo :: Result: %ERRORLEVEL% >> build.log -
wix.jam
ra8cdbc2 r9bb220f 48 48 local wix-location = [ MATCH "^--wix=(.*)" : [ modules.peek : ARGV ] ] ; 49 49 if $(wix-location) { 50 prefix = $(wix-location)\\bin\\ ; 50 # MIME FIX!!! prefix = $(wix-location)\\bin\\ ; 51 prefix = $(wix-location)\\ ; 51 52 } else { 52 53 command = [ common.get-invocation-command wix : candle.exe : $(command) ] ; -
x64-build.bat
r2e8b33f r9bb220f 22 22 23 23 :build_hdrs 24 echo %jam% --toolset=msvc --with-cryptopp=%CRYPTOPP_SOURCE% --with-cryptopp-target=%NSCP_INCLUDE%\cryptopp cryptopp-headers >> build.log25 %jam% --toolset=msvc--with-cryptopp=%CRYPTOPP_SOURCE% --with-cryptopp-target=%NSCP_INCLUDE%\cryptopp cryptopp-headers24 echo %jam% --toolset=msvc-8.0 --with-cryptopp=%CRYPTOPP_SOURCE% --with-cryptopp-target=%NSCP_INCLUDE%\cryptopp cryptopp-headers >> build.log 25 %jam% --toolset=msvc-8.0 --with-cryptopp=%CRYPTOPP_SOURCE% --with-cryptopp-target=%NSCP_INCLUDE%\cryptopp cryptopp-headers 26 26 if %ERRORLEVEL% == -1 goto :error_one 27 27 echo :: Result: %ERRORLEVEL% >> build.log … … 29 29 30 30 :build_src 31 echo %jam% --toolset=msvc source-archive >> build.log32 %jam% --toolset=msvcsource-archive31 echo %jam% --toolset=msvc-8.0 source-archive >> build.log 32 %jam% --toolset=msvc-8.0 source-archive 33 33 if %ERRORLEVEL% == -1 goto :error_one 34 34 echo :: Result: %ERRORLEVEL% >> build.log -
x86-build.bat
r2e8b33f r9bb220f 22 22 23 23 :build_hdrs 24 echo %jam% --toolset=msvc --with-cryptopp=%CRYPTOPP_SOURCE% --with-cryptopp-target=%NSCP_INCLUDE%\cryptopp cryptopp-headers >> build.log25 %jam% --toolset=msvc --with-cryptopp=%CRYPTOPP_SOURCE% --with-cryptopp-target=%NSCP_INCLUDE%\cryptopp cryptopp-headers24 echo %jam% --toolset=msvc-8.0 --with-cryptopp=%CRYPTOPP_SOURCE% --with-cryptopp-target=%NSCP_INCLUDE%\cryptopp cryptopp-headers >> build.log 25 %jam% --toolset=msvc --with-cryptopp=%CRYPTOPP_SOURCE% --with-cryptopp-target=%NSCP_INCLUDE%\cryptopp cryptopp-headers 26 26 if %ERRORLEVEL% == -1 goto :error_one 27 27 echo :: Result: %ERRORLEVEL% >> build.log … … 29 29 30 30 :build_src 31 echo %jam% --toolset=msvc source-archive >> build.log32 %jam% --toolset=msvcsource-archive31 echo %jam% --toolset=msvc-8.0 source-archive >> build.log 32 %jam% --toolset=msvc-8.0 source-archive 33 33 if %ERRORLEVEL% == -1 goto :error_one 34 34 echo :: Result: %ERRORLEVEL% >> build.log
Note: See TracChangeset
for help on using the changeset viewer.








