Changeset f9aada00bdb49fb61356a2fc0c58a1703691eead
- Timestamp:
- 02/04/11 00:38:23
(2 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
| raa45e64 |
rf9aada0 |
|
| 388 | 388 | { |
|---|
| 389 | 389 | |
|---|
| 390 | | if (ccl->username == NULL && ccl->secret == NULL) |
|---|
| | 390 | if (ccl->secret == NULL) |
|---|
| 391 | 391 | return (NULL); |
|---|
| 392 | 392 | else |
|---|
| … | … | |
| 691 | 691 | noitL(noit_debug, "collectd: Received signed network packet but can't verify " |
|---|
| 692 | 692 | "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"); |
|---|
| 693 | 700 | return (0); |
|---|
| 694 | 701 | } |
|---|
| … | … | |
| 1359 | 1366 | } |
|---|
| 1360 | 1367 | |
|---|
| 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) { |
|---|
| 1366 | 1375 | if (ccl->security_level == SECURITY_LEVEL_ENCRYPT) { |
|---|
| 1367 | 1376 | noitL(nlerr, "collectd: no secret defined for check.\n"); |
|---|
| 1368 | 1377 | goto cleanup; |
|---|
| 1369 | | } else if (ccl->security_level == SECURITY_LEVEL_SIGN) { |
|---|
| | 1378 | } |
|---|
| | 1379 | else if (ccl->security_level == SECURITY_LEVEL_SIGN) { |
|---|
| 1370 | 1380 | noitL(nlerr, "collectd: no secret defined for check, " |
|---|
| 1371 | 1381 | "will accept any signed packet.\n"); |
|---|