]> git.sur5r.net Git - openldap/commitdiff
Load extension library on "extension" keyword in configs (actual load routine is...
authorMark Valence <mrv@openldap.org>
Tue, 9 Nov 1999 03:37:05 +0000 (03:37 +0000)
committerMark Valence <mrv@openldap.org>
Tue, 9 Nov 1999 03:37:05 +0000 (03:37 +0000)
servers/slapd/config.c

index cee2fe9e3d7a4f9796d1705a33ef272053a63c41..4912fe71a05d09db806968fc72c2f4f76ef1248b 100644 (file)
@@ -748,6 +748,27 @@ read_config( const char *fname )
 
 #endif
 
+#ifdef SLAPD_EXTERNAL_EXTENSIONS
+               } else if ( !strcasecmp( cargv[0], "extension" ) ) {
+                       if ( cargc < 2 ) {
+                               Debug( LDAP_DEBUG_ANY,
+                                               "%s: line %d: missing oid in \"extension <oid> <libpath>\" line\n",
+                                               fname, lineno, 0 );
+                       } else if ( cargc < 3 ) {
+                               Debug( LDAP_DEBUG_ANY,
+                                               "%s: line %d: missing libpath in \"extension <oid> <libpath>\" line\n",
+                                               fname, lineno, 0 );
+                       } else {
+                               rc = load_extension(cargv[1], cargv[2], cargc - 3, (cargc > 3) ? cargv + 3 : NULL);
+                               if (rc != 0) {
+                                       Debug( LDAP_DEBUG_ANY,
+                                                       "%s: line %d: failed to load or initialize extension library %s\n",
+                                                       fname, lineno, cargv[2]);
+                                       return rc;
+                               }
+                       }
+#endif
+
                /* pass anything else to the current backend info/db config routine */
                } else {
                        if ( bi != NULL ) {