Changeset e7dbac9 in nscp
- Timestamp:
- 09/06/09 22:28:33 (4 years ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2, stable
- Children:
- 1fc246c
- Parents:
- 308b6f5
- Files:
-
- 9 edited
-
AutoBuild.h (modified) (1 diff)
-
changelog (modified) (1 diff)
-
debug-in.bat (modified) (1 diff)
-
helpers/installer_dll/installer_helper.hpp (modified) (1 diff)
-
helpers/installer_dll_fw/Jamfile (modified) (1 diff)
-
include/config.h (modified) (1 diff)
-
modules/NSCAAgent/NSCAThread.cpp (modified) (2 diffs)
-
modules/NSCAAgent/NSCAThread.h (modified) (3 diffs)
-
release-build.bat (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
AutoBuild.h
r308b6f5 re7dbac9 3 3 // change the FALSE to TRUE for autoincrement of build number 4 4 #define INCREMENT_VERSION TRUE 5 #define FILEVER 0,3,7,2 576 #define PRODUCTVER 0,3,7,2 577 #define STRFILEVER _T("0.3.7.2 57")8 #define STRPRODUCTVER _T("0.3.7.2 57")5 #define FILEVER 0,3,7,279 6 #define PRODUCTVER 0,3,7,279 7 #define STRFILEVER _T("0.3.7.279") 8 #define STRPRODUCTVER _T("0.3.7.279") 9 9 #define STRPRODUCTDATE _T("2009-09-06") 10 10 #endif // AUTOBUILD_H -
changelog
r358cda1 re7dbac9 6 6 * Fixa dependonservice LanManWorkStation (old win) 7 7 * Fix RtlStringFromGUID problem on NT4 8 9 2009-09-06 MickeM 10 + Added new option to [NSCA Agent] string_length=<size> of the NSCA_MAX_PLUGINOUTPUT_LENGTH option on the NSCA server. 11 * Readded all the "installer configuration" crap which I accidentaly removed when I fixed the installer... *sigh* 8 12 9 13 2009-08-30 MickeM -
debug-in.bat
r358cda1 re7dbac9 1 dir /O:-D /A:-D /B stage\installer\*x64* > tmp.txt 1 rem dir /O:-D /A:-D /B stage\installer\*x64* > tmp.txt 2 echo dir /O:-D /A:-D /B stage\%2installer\*%1* 3 dir /O:-D /A:-D /B stage\%2installer\*%1* > tmp.txt 2 4 Set /P _INST=<tmp.txt 3 5 echo Install: %_INST% 4 msiexec /l* installer.txt /i stage\ installer\%_INST%6 msiexec /l* installer.txt /i stage\%2installer\%_INST% -
helpers/installer_dll/installer_helper.hpp
r308b6f5 re7dbac9 84 84 */ 85 85 void setupMyProperty(std::wstring key, std::wstring val) { 86 logMessage(_T("Setting old values: ") + key + _T("_OLD=") + val); 87 setPropertyIfEmpty(key+_T("_OLD"), val); 86 88 std::wstring oldDef = getPropery(key+_T("_DEFAULT")); 87 89 if (!oldDef.empty()) 88 90 val = oldDef; 89 else90 setProperty(key+_T("_DEFAULT"), val);91 setPropertyIfEmpty(key+_T("_OLD"), val);92 91 if (val == MY_EMPTY) 93 92 val = _T(""); 93 logMessage(_T("Setting old values: ") + key + _T("=") + val); 94 94 setPropertyIfEmpty(key, val); 95 95 } -
helpers/installer_dll_fw/Jamfile
r308b6f5 re7dbac9 15 15 <runtime-link>static 16 16 <threading>multi 17 #<include>"D:/Program/Microsoft Platform SDK for Windows Server 2003 R2/Include"18 <include>"C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Include/Atl"17 <include>"D:/Program/Microsoft Platform SDK for Windows Server 2003 R2/Include" 18 # <include>"C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Include/Atl" 19 19 20 20 : # default build -
include/config.h
r358cda1 re7dbac9 190 190 #define NSCA_READ_TIMEOUT _T("socket_timeout") 191 191 #define NSCA_READ_TIMEOUT_DEFAULT 30 192 #define NSCA_STRLEN _T("string_length") 193 #define NSCA_STRLEN_DEFAULT 512 192 194 193 195 #define C_SYSTEM_SVC_ALL_0 _T("check_all_services[SERVICE_BOOT_START]") -
modules/NSCAAgent/NSCAThread.cpp
r358cda1 re7dbac9 80 80 nscahost_ = NSCModuleHelper::getSettingsString(NSCA_AGENT_SECTION_TITLE, NSCA_SERVER, NSCA_SERVER_DEFAULT); 81 81 nscaport_ = NSCModuleHelper::getSettingsInt(NSCA_AGENT_SECTION_TITLE, NSCA_PORT, NSCA_PORT_DEFAULT); 82 payload_length_ = NSCModuleHelper::getSettingsInt(NSCA_AGENT_SECTION_TITLE, NSCA_STRLEN, NSCA_STRLEN_DEFAULT); 82 83 read_timeout_ = NSCModuleHelper::getSettingsInt(NSCA_AGENT_SECTION_TITLE, NSCA_READ_TIMEOUT, NSCA_READ_TIMEOUT_DEFAULT); 83 84 std::wstring report = NSCModuleHelper::getSettingsString(NSCA_AGENT_SECTION_TITLE, NSCA_REPORT, NSCA_REPORT_DEFAULT); … … 303 304 for (std::list<Command::Result>::const_iterator cit = results.begin(); cit != results.end(); ++cit) { 304 305 try { 305 socket.send((*cit).getBuffer(crypt_inst, timeDelta_ ));306 socket.send((*cit).getBuffer(crypt_inst, timeDelta_, payload_length_)); 306 307 } catch (NSCAPacket::NSCAException &e) { 307 308 NSC_LOG_ERROR_STD(_T("Failed to make command: ") + e.getMessage() ); -
modules/NSCAAgent/NSCAThread.h
r358cda1 re7dbac9 160 160 } 161 161 162 simpleSocket::DataBuffer getBuffer(nsca_encrypt &crypt_inst, __time32_t time_delta ) const {162 simpleSocket::DataBuffer getBuffer(nsca_encrypt &crypt_inst, __time32_t time_delta, unsigned int pluginoutput_length) const { 163 163 std::string s = strEx::wstring_to_string(service); 164 164 std::string r = strEx::wstring_to_string(result); 165 165 std::string h = strEx::wstring_to_string(host); 166 166 167 unsigned int buffer_len = sizeof(NSCAPacket::data_packet) ;167 unsigned int buffer_len = sizeof(NSCAPacket::data_packet)-NSCA_MAX_PLUGINOUTPUT_LENGTH+pluginoutput_length; 168 168 unsigned char* buffer = crypt_inst.get_rand_buffer(buffer_len); 169 169 NSCAPacket::data_packet *data = reinterpret_cast<NSCAPacket::data_packet*>(buffer); … … 179 179 throw NSCAPacket::NSCAException(_T("description to long")); 180 180 strncpy_s(data->svc_description, NSCA_MAX_DESCRIPTION_LENGTH, s.c_str(), s.length()); 181 if (r.length() >= NSCA_MAX_PLUGINOUTPUT_LENGTH)181 if (r.length() >= pluginoutput_length) 182 182 throw NSCAPacket::NSCAException(_T("result to long")); 183 strncpy_s(data->plugin_output, NSCA_MAX_PLUGINOUTPUT_LENGTH, r.c_str(), r.length());183 strncpy_s(data->plugin_output, pluginoutput_length, r.c_str(), r.length()); 184 184 185 185 unsigned int calculated_crc32=calculate_crc32(buffer,buffer_len); … … 229 229 std::wstring nscahost_; 230 230 unsigned int nscaport_; 231 unsigned int payload_length_; 231 232 bool cacheNscaHost_; 232 233 std::wstring nscaaddr_; -
release-build.bat
r308b6f5 re7dbac9 15 15 16 16 REM build x64 (Amd64, Emt64) binary 17 remSET version=x6418 remSET cmdline=build.bat runtime-link=static variant=release address-model=64 --library-path="%TARGET_LIB_x64_DIR%" --with-psdk-lib="%PLATTFORM_SDK_LIB_x64%" --with-psdk="%PLATTFORM_SDK_INCLUDE%" --wix="%WIX_PATH%"19 remcall build.bat runtime-link=static variant=release address-model=64 --library-path="%TARGET_LIB_x64_DIR%" --with-psdk-lib="%PLATTFORM_SDK_LIB_x64%" --with-psdk="%PLATTFORM_SDK_INCLUDE%" --wix="%WIX_PATH%"20 remif %ERRORLEVEL% == -1 goto :error17 SET version=x64 18 SET cmdline=build.bat runtime-link=static variant=release address-model=64 --library-path="%TARGET_LIB_x64_DIR%" --with-psdk-lib="%PLATTFORM_SDK_LIB_x64%" --with-psdk="%PLATTFORM_SDK_INCLUDE%" --wix="%WIX_PATH%" 19 call build.bat runtime-link=static variant=release address-model=64 --library-path="%TARGET_LIB_x64_DIR%" --with-psdk-lib="%PLATTFORM_SDK_LIB_x64%" --with-psdk="%PLATTFORM_SDK_INCLUDE%" --wix="%WIX_PATH%" 20 if %ERRORLEVEL% == -1 goto :error 21 21 22 22
Note: See TracChangeset
for help on using the changeset viewer.








