]> git.sur5r.net Git - openldap/commitdiff
Only use libltdl #if SLAPD_MODULES is defined, otherwise ignore
authorHoward Chu <hyc@openldap.org>
Fri, 5 Nov 2004 08:57:05 +0000 (08:57 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 5 Nov 2004 08:57:05 +0000 (08:57 +0000)
external pwdCheckModules.

servers/slapd/overlays/ppolicy.c

index 845aee641f760aec9bb0de5999c964e55ea17fa2..b01be1dc89ec51f1c5ab3f3f73ddd949fb9dc4ae 100644 (file)
@@ -35,7 +35,9 @@
 #include <ldap.h>
 #include "lutil.h"
 #include "slap.h"
+#if SLAPD_MODULES
 #include <ltdl.h>
+#endif
 #include <ac/errno.h>
 #include <ac/time.h>
 #include <ac/string.h>
@@ -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 */
        }