Log INFO message when LDAP connection fails on startup

Since krb5_klog_syslog() always needs parameters from syslog.h, move the
include into ipa_krb5.h.

Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
Robbie Harwood
2019-08-02 15:55:20 -04:00
committed by Rob Crittenden
parent 5db48f151b
commit 9414b038e7
5 changed files with 5 additions and 5 deletions

View File

@@ -24,6 +24,7 @@
#include <sys/utsname.h>
#include "ipa_kdb.h"
#include "ipa_krb5.h"
#define IPADB_GLOBAL_CONFIG_CACHE_TIME 60
@@ -586,8 +587,9 @@ static krb5_error_code ipadb_init_module(krb5_context kcontext,
ret = ipadb_get_connection(ipactx);
if (ret != 0) {
/* not a fatal failure, as the LDAP server may be temporarily down */
/* TODO: spam syslog with this error */
/* Not a fatal failure, as the LDAP server may be temporarily down. */
krb5_klog_syslog(LOG_INFO,
"Didn't connect to LDAP on startup: %d", ret);
}
kerr = krb5_db_set_context(kcontext, ipactx);

View File

@@ -20,7 +20,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <syslog.h>
#include "ipa_kdb.h"
#include "ipa_pwd.h"

View File

@@ -39,7 +39,6 @@
#include <errno.h>
//#include <krb5/certauth_plugin.h>
#include <syslog.h>
#include <sss_certmap.h>
#include "ipa_krb5.h"

View File

@@ -25,7 +25,6 @@
#include "ipa_kdb.h"
#include "ipa_mspac.h"
#include <talloc.h>
#include <syslog.h>
#include <unicase.h>
#include "util/time.h"
#include "gen_ndr/ndr_krb5pac.h"

View File

@@ -4,6 +4,7 @@
#include <lber.h>
#include <krb5/krb5.h>
#include <kdb.h>
#include <syslog.h>
struct krb_key_salt {
krb5_enctype enctype;