summaryrefslogtreecommitdiff
path: root/source4/scripting/libjs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-15 09:23:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:23:08 -0500
commit4f62205cad46539cc459efe106c0a036f08ed0b9 (patch)
treeb49ec98e0dab71b213347c65799f65a618e18a89 /source4/scripting/libjs
parent32b06d5882a6fc93692815392e0a94d0709bc273 (diff)
downloadsamba-4f62205cad46539cc459efe106c0a036f08ed0b9.tar.gz
samba-4f62205cad46539cc459efe106c0a036f08ed0b9.tar.bz2
samba-4f62205cad46539cc459efe106c0a036f08ed0b9.zip
r8486: switched to a separate connection operation in ldb interface
(a suggestion from simo) (This used to be commit 98c9c4ecb87e1b140002390067892806464849da)
Diffstat (limited to 'source4/scripting/libjs')
-rw-r--r--source4/scripting/libjs/provision.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js
index 06b6f03779..d4551945d1 100644
--- a/source4/scripting/libjs/provision.js
+++ b/source4/scripting/libjs/provision.js
@@ -122,15 +122,18 @@ function setup_ldb(ldif, dbname, subobj)
extra = arguments[3];
}
- var db = lpGet("private dir") + "/" + dbname;
+ var dbfile = lpGet("private dir") + "/" + dbname;
var src = lpGet("setup directory") + "/" + ldif;
- sys.unlink(db);
+ sys.unlink(dbfile);
var data = sys.file_load(src);
data = data + extra;
data = substitute_var(data, subobj);
+ var db = ldb.connect(dbfile);
+ assert(db != undefined);
+
ok = ldb.add(db, data);
assert(ok);
}