Changeset 452fd41 in nscp for modules/NRPEListener/NRPESocket.cpp
- Timestamp:
- 03/28/05 12:24:08 (8 years ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2, stable
- Children:
- aaa9a22
- Parents:
- 1a5449e
- File:
-
- 1 edited
-
modules/NRPEListener/NRPESocket.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
modules/NRPEListener/NRPESocket.cpp
r1a5449e r452fd41 130 130 131 131 void NRPESocket::onAccept(simpleSocket::Socket client) { 132 if (!inAllowedHosts(client.getAddrString())) { 133 NSC_LOG_ERROR("Unothorized access from: " + client.getAddrString()); 134 client.close(); 135 return; 136 } 132 137 simpleSocket::DataBuffer block; 133 138 client.readAll(block); … … 153 158 NSC_DEBUG_MSG_STD("Arguments: " + cmd.second); 154 159 155 if (NSCModuleHelper::getSettingsInt( "NRPE", "AllowArguments", 0) == 0) {160 if (NSCModuleHelper::getSettingsInt(NRPE_SECTION_TITLE, NRPE_SETTINGS_ALLOW_ARGUMENTS, 0) == 0) { 156 161 if (!cmd.second.empty()) { 157 162 NSC_LOG_ERROR("Request contained arguments (not currently allowed)."); … … 160 165 } 161 166 } 162 if (NSCModuleHelper::getSettingsInt( "NRPE", "AllowNastyMetaChars", 0) == 0) {167 if (NSCModuleHelper::getSettingsInt(NRPE_SECTION_TITLE, NRPE_SETTINGS_ALLOW_NASTY_META, 0) == 0) { 163 168 if (cmd.first.find_first_of(NASTY_METACHARS) != std::string::npos) { 164 169 NSC_LOG_ERROR("Request command contained illegal metachars!");
Note: See TracChangeset
for help on using the changeset viewer.








