summaryrefslogtreecommitdiff
path: root/source4/scripting/libjs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-20 07:20:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:29:48 -0500
commit86d628a292a22973597e0c06d4a36e20c58ae31c (patch)
tree502f4f8f915be7c4f7104cf6ad38d2239e6dff2d /source4/scripting/libjs
parent620301858a5b747002eebe2b9fcef10712ee8249 (diff)
downloadsamba-86d628a292a22973597e0c06d4a36e20c58ae31c.tar.gz
samba-86d628a292a22973597e0c06d4a36e20c58ae31c.tar.bz2
samba-86d628a292a22973597e0c06d4a36e20c58ae31c.zip
r8639: moved loadparm calls into an ejs object
(This used to be commit 2dc493eea6f9d87c40ad0dc755f528ce0b33ca47)
Diffstat (limited to 'source4/scripting/libjs')
-rw-r--r--source4/scripting/libjs/auth.js3
-rw-r--r--source4/scripting/libjs/management.js3
-rw-r--r--source4/scripting/libjs/provision.js16
3 files changed, 14 insertions, 8 deletions
diff --git a/source4/scripting/libjs/auth.js b/source4/scripting/libjs/auth.js
index a973cb4753..73d8645218 100644
--- a/source4/scripting/libjs/auth.js
+++ b/source4/scripting/libjs/auth.js
@@ -11,7 +11,8 @@
function getDomainList()
{
var ret = new Array(2);
+ var lp = loadparm_init();
ret[0] = "System User";
- ret[1] = lpGet("workgroup");
+ ret[1] = lp.get("workgroup");
return ret;
}
diff --git a/source4/scripting/libjs/management.js b/source4/scripting/libjs/management.js
index 7130cdc5dd..e1c68ca1de 100644
--- a/source4/scripting/libjs/management.js
+++ b/source4/scripting/libjs/management.js
@@ -97,7 +97,8 @@ function nbtd_statistics()
*/
function service_enabled(name)
{
- var services = lpGet("server services");
+ var lp = loadparm_init();
+ var services = lp.get("server services");
var i;
for (i=0;i<services.length;i++) {
if (services[i] == name) {
diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js
index d3b94c1d1c..e9a8aad0cc 100644
--- a/source4/scripting/libjs/provision.js
+++ b/source4/scripting/libjs/provision.js
@@ -141,13 +141,14 @@ function setup_ldb(ldif, dbname, subobj)
{
var extra = "";
var ldb = ldb_init();
+ var lp = loadparm_init();
if (arguments.length == 4) {
extra = arguments[3];
}
var dbfile = dbname;
- var src = lpGet("setup directory") + "/" + ldif;
+ var src = lp.get("setup directory") + "/" + ldif;
var data = sys.file_load(src);
data = data + extra;
@@ -167,8 +168,9 @@ function setup_ldb(ldif, dbname, subobj)
*/
function setup_file(template, fname, subobj)
{
- var f = lpGet("private dir") + "/" + fname;
- var src = lpGet("setup directory") + "/" + template;
+ var lp = loadparm_init();
+ var f = lp.get("private dir") + "/" + fname;
+ var src = lp.get("setup directory") + "/" + template;
sys.unlink(f);
@@ -221,9 +223,10 @@ function provision_guess()
{
var subobj = new Object();
var nss = nss_init();
+ var lp = loadparm_init();
- subobj.REALM = lpGet("realm");
- subobj.DOMAIN = lpGet("workgroup");
+ subobj.REALM = lp.get("realm");
+ subobj.DOMAIN = lp.get("workgroup");
subobj.HOSTNAME = hostname();
subobj.HOSTIP = hostip();
subobj.DOMAINGUID = randguid();
@@ -271,7 +274,8 @@ function searchone(ldb, expression, attribute)
*/
function newuser(username, unixname, password, message)
{
- var samdb = lpGet("sam database");
+ var lp = loadparm_init();
+ var samdb = lp.get("sam database");
var ldb = ldb_init();
/* connect to the sam */