diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2021-11-19 09:11:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-19 09:11:46 (GMT) |
commit | 6e18790b69df72b545aa784ffc36b138860a08a9 (patch) | |
tree | 12205ab826aeaa36592e78c0027b35a25089f233 /plugins | |
parent | c46447af659e96d78c2f02e1295e887a4d12cd36 (diff) | |
parent | f961b7f7bd5d10328bf152cbc015271180165f0f (diff) | |
download | monitoring-plugins-6e18790b69df72b545aa784ffc36b138860a08a9.tar.gz |
Merge pull request #1724 from mullumaus/master
Allows check_ldap to read password from environment variable
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_ldap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c index bc7bd44..845a4f5 100644 --- a/plugins/check_ldap.c +++ b/plugins/check_ldap.c | |||
@@ -432,6 +432,9 @@ validate_arguments () | |||
432 | set_thresholds(&entries_thresholds, | 432 | set_thresholds(&entries_thresholds, |
433 | warn_entries, crit_entries); | 433 | warn_entries, crit_entries); |
434 | } | 434 | } |
435 | if (ld_passwd==NULL) | ||
436 | ld_passwd = getenv("LDAP_PASSWORD"); | ||
437 | |||
435 | return OK; | 438 | return OK; |
436 | } | 439 | } |
437 | 440 | ||
@@ -465,7 +468,7 @@ print_help (void) | |||
465 | printf (" %s\n", "-D [--bind]"); | 468 | printf (" %s\n", "-D [--bind]"); |
466 | printf (" %s\n", _("ldap bind DN (if required)")); | 469 | printf (" %s\n", _("ldap bind DN (if required)")); |
467 | printf (" %s\n", "-P [--pass]"); | 470 | printf (" %s\n", "-P [--pass]"); |
468 | printf (" %s\n", _("ldap password (if required)")); | 471 | printf (" %s\n", _("ldap password (if required, or set the password through environment variable 'LDAP_PASSWORD')")); |
469 | printf (" %s\n", "-T [--starttls]"); | 472 | printf (" %s\n", "-T [--starttls]"); |
470 | printf (" %s\n", _("use starttls mechanism introduced in protocol version 3")); | 473 | printf (" %s\n", _("use starttls mechanism introduced in protocol version 3")); |
471 | printf (" %s\n", "-S [--ssl]"); | 474 | printf (" %s\n", "-S [--ssl]"); |