Changeset f9aada00bdb49fb61356a2fc0c58a1703691eead

Show
Ignore:
Timestamp:
02/04/11 00:38:23 (3 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1296779903 +0000
git-parent:

[685103350afcff1386c2b0b562c34301bf937d3b]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1296779903 +0000
Message:

I believe this fixes #348

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/modules/collectd.c

    raa45e64 rf9aada0  
    388388{ 
    389389 
    390   if (ccl->username == NULL && ccl->secret == NULL) 
     390  if (ccl->secret == NULL) 
    391391    return (NULL); 
    392392  else 
     
    691691    noitL(noit_debug, "collectd: Received signed network packet but can't verify " 
    692692        "it because no user has been configured. Will accept it.\n"); 
     693    return (0); 
     694  } 
     695 
     696  if (ccl->secret == NULL) 
     697  { 
     698    noitL(noit_debug, "collectd: Received signed network packet but can't verify " 
     699        "it because no secret has been configured. Will accept it.\n"); 
    693700    return (0); 
    694701  } 
     
    13591366    } 
    13601367 
    1361     if (!noit_hash_retr_str(check->config, "secret", strlen("secret"), 
    1362                            (const char**)&ccl->secret) && 
    1363         !noit_hash_retr_str(conf->options, "secret", strlen("secret"), 
    1364                            (const char**)&ccl->secret))  
    1365     { 
     1368    if(!ccl->secret) 
     1369      noit_hash_retr_str(check->config, "secret", strlen("secret"), 
     1370                         (const char**)&ccl->secret); 
     1371    if(!ccl->secret) 
     1372      noit_hash_retr_str(conf->options, "secret", strlen("secret"), 
     1373                         (const char**)&ccl->secret); 
     1374    if(!ccl->secret) { 
    13661375      if (ccl->security_level == SECURITY_LEVEL_ENCRYPT) { 
    13671376        noitL(nlerr, "collectd: no secret defined for check.\n"); 
    13681377        goto cleanup; 
    1369       } else if (ccl->security_level == SECURITY_LEVEL_SIGN) { 
     1378      } 
     1379      else if (ccl->security_level == SECURITY_LEVEL_SIGN) { 
    13701380        noitL(nlerr, "collectd: no secret defined for check, " 
    13711381            "will accept any signed packet.\n");