summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/common/ldb.c2
-rw-r--r--source4/lib/ldb/config.mk9
2 files changed, 7 insertions, 4 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index 0d424ad601..6e1f6f5cde 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -106,7 +106,7 @@ int ldb_connect(struct ldb_context *ldb, const char *url, unsigned int flags, co
ldb_connect_fn fn;
if (strchr(url, ':') != NULL) {
- backend = talloc_strndup(ldb, url, strchr(url, ':')-url);
+ backend = talloc_strndup(ldb, url, strchr(url, ':')-url-1);
} else {
/* Default to tdb */
backend = talloc_strdup(ldb, "tdb");
diff --git a/source4/lib/ldb/config.mk b/source4/lib/ldb/config.mk
index 20d1437288..2f36042ab9 100644
--- a/source4/lib/ldb/config.mk
+++ b/source4/lib/ldb/config.mk
@@ -82,8 +82,8 @@ REQUIRED_SUBSYSTEMS = \
################################################
# Start MODULE ldb_map
-[MODULE::ldb_map]
-SUBSYSTEM = ldb
+[SUBSYSTEM::ldb_map]
+REQUIRED_SUBSYSTEMS = ldb
OBJ_FILES = modules/ldb_map.o
# End MODULE ldb_map
################################################
@@ -126,13 +126,16 @@ REQUIRED_SUBSYSTEMS = \
# End MODULE ldb_tdb
################################################
+./lib/ldb/common/ldb_modules.o: lib/ldb/common/ldb_modules.c Makefile
+ @echo Compiling $<
+ @$(CC) $(CFLAGS) $(PICFLAG) -DMODULESDIR=\"$(MODULESDIR)/ldb\" -DSHLIBEXT=\"$(SHLIBEXT)\" -c $< -o $@
+
################################################
# Start SUBSYSTEM ldb
[LIBRARY::ldb]
VERSION = 0.0.1
SO_VERSION = 0
DESCRIPTION = LDAP-like embedded database library
-EXTRA_CFLAGS = -DMODULESDIR="$(MODULESDIR)/ldb" -DSHLIBEXT="$(SHLIBEXT)"
INIT_FUNCTION_TYPE = int (*) (void)
OBJ_FILES = \
common/ldb.o \