From 63535f566e2fbe9244fd3e50b9c8d1281b822fc0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 15 Jul 2005 05:40:34 +0000 Subject: r8481: switched ldb ejs called over to an OO interface, so you do: var ldb = ldb_init(); res = ldb.search(dbfile, "(objectClass=user)"); you can also do: ldbSearch = ldb.search; res = ldbSearch(dbfile, "(objectClass=user)"); if you want the old interface (ie. you can use this to import functions into the global or local namespace). (This used to be commit 3093057d9735cbb62f57e7159264d5a28b85320f) --- source4/scripting/libjs/provision.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/scripting/libjs') diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js index 03360654c7..6d4e4a3bc0 100644 --- a/source4/scripting/libjs/provision.js +++ b/source4/scripting/libjs/provision.js @@ -114,6 +114,8 @@ function hostname() function setup_ldb(ldif, dbname, subobj) { var extra = ""; + var ldb = ldb_init(); + if (arguments.length == 4) { extra = arguments[3]; } @@ -127,7 +129,7 @@ function setup_ldb(ldif, dbname, subobj) data = data + extra; data = substitute_var(data, subobj); - ok = ldbAdd(db, data); + ok = ldb.add(db, data); assert(ok); } -- cgit