From e4c231fe0cadf1f316c61ea4659915997f9ccd20 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 5 Nov 2004 08:57:05 +0000 Subject: [PATCH] Only use libltdl #if SLAPD_MODULES is defined, otherwise ignore external pwdCheckModules. --- servers/slapd/overlays/ppolicy.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index 845aee641f..b01be1dc89 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -35,7 +35,9 @@ #include #include "lutil.h" #include "slap.h" +#if SLAPD_MODULES #include +#endif #include #include #include @@ -486,8 +488,9 @@ check_password_quality( struct berval *cred, PassPolicy *pp, LDAPPasswordPolicyE } rc = LDAP_SUCCESS; - + if (pp->pwdCheckModule[0]) { +#if SLAPD_MODULES lt_dlhandle mod; const char *err; @@ -525,6 +528,10 @@ check_password_quality( struct berval *cred, PassPolicy *pp, LDAPPasswordPolicyE lt_dlclose( mod ); } +#else + Debug(LDAP_DEBUG_ANY, "check_password_quality: external modules not " + "supported. pwdCheckModule ignored.\n", 0, 0, 0); +#endif /* SLAPD_MODULES */ } -- 2.39.5