mirror of
https://github.com/samba-team/samba.git
synced 2025-11-14 12:23:52 +03:00
r8486: switched to a separate connection operation in ldb interface
(a suggestion from simo)
(This used to be commit 98c9c4ecb8)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
32b06d5882
commit
4f62205cad
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user