diff --git a/CHANGELOG b/CHANGELOG index 60743b5..1dc3293 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ - fix not checking return in init_ldap_connection (Jeff Moyer). - correct test for existence of auth config file. - correct shutdown log message print. +- correct auth init test when no credentials required. 29/6/2006 autofs-5.0.0_beta6 ---------------------------- diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c index effa038..d105e44 100644 --- a/modules/lookup_ldap.c +++ b/modules/lookup_ldap.c @@ -420,7 +420,7 @@ int parse_ldap_config(struct lookup_cont } ret = get_property(root, "authtype", &authtype); - if (ret != 0 || (!authtype && auth_required)) { + if (ret != 0) { error(LOGOPT_ANY, MODPREFIX "Failed read the authtype property from the " @@ -511,6 +511,9 @@ int auth_init(struct lookup_context *ctx if (ret) return -1; + if (!ctxt->auth_required) + return 0; + ldap = init_ldap_connection(ctxt); if (!ldap) return -1;