Ignore:
Timestamp:
03/28/05 12:24:08 (8 years ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2, stable
Children:
aaa9a22
Parents:
1a5449e
Message:
  • Changed the Thread class a bit (mutex -> signal, and CreatThread? does not return the instance)
  • Moved settings "keys" fro NRPE to config.h
  • Changed build options (added Distribution) which builds a zip file under ./dist (requires 7z installed)
  • Minor tweaks to error/debug logging and small fixes "here and there"
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/NRPEListener/NRPESocket.cpp

    r1a5449e r452fd41  
    130130 
    131131void 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  } 
    132137  simpleSocket::DataBuffer block; 
    133138  client.readAll(block); 
     
    153158  NSC_DEBUG_MSG_STD("Arguments: " + cmd.second); 
    154159 
    155   if (NSCModuleHelper::getSettingsInt("NRPE", "AllowArguments", 0) == 0) { 
     160  if (NSCModuleHelper::getSettingsInt(NRPE_SECTION_TITLE, NRPE_SETTINGS_ALLOW_ARGUMENTS, 0) == 0) { 
    156161    if (!cmd.second.empty()) { 
    157162      NSC_LOG_ERROR("Request contained arguments (not currently allowed)."); 
     
    160165    } 
    161166  } 
    162   if (NSCModuleHelper::getSettingsInt("NRPE", "AllowNastyMetaChars", 0) == 0) { 
     167  if (NSCModuleHelper::getSettingsInt(NRPE_SECTION_TITLE, NRPE_SETTINGS_ALLOW_NASTY_META, 0) == 0) { 
    163168    if (cmd.first.find_first_of(NASTY_METACHARS) != std::string::npos) { 
    164169      NSC_LOG_ERROR("Request command contained illegal metachars!"); 
Note: See TracChangeset for help on using the changeset viewer.