summaryrefslogtreecommitdiff
path: root/source4/scripting/libjs/provision.js
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-19 00:16:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:29:38 -0500
commitf1245d4ac1f06988dc4501c14c0e8161be8028aa (patch)
treed0f840c350f14919b056d9e31dbb08bb5ce4df81 /source4/scripting/libjs/provision.js
parent948183cb389195827892c5960b4cbcb3d1f8a645 (diff)
downloadsamba-f1245d4ac1f06988dc4501c14c0e8161be8028aa.tar.gz
samba-f1245d4ac1f06988dc4501c14c0e8161be8028aa.tar.bz2
samba-f1245d4ac1f06988dc4501c14c0e8161be8028aa.zip
r8561: as with the other ejs subsystems, make nss into a object
(This used to be commit a3f3292e6698ce9be6a5036f47dd4fa81a1dfd4e)
Diffstat (limited to 'source4/scripting/libjs/provision.js')
-rw-r--r--source4/scripting/libjs/provision.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js
index c7fb1b5fc5..7133e50b4c 100644
--- a/source4/scripting/libjs/provision.js
+++ b/source4/scripting/libjs/provision.js
@@ -196,6 +196,8 @@ function provision(subobj, message)
function provision_guess()
{
var subobj = new Object();
+ var nss = nss_init();
+
subobj.REALM = lpGet("realm");
subobj.DOMAIN = lpGet("workgroup");
subobj.HOSTNAME = hostname();
@@ -213,11 +215,11 @@ function provision_guess()
subobj.LDAPTIME = ldaptime;
subobj.DATESTRING = datestring;
subobj.USN = nextusn;
- subobj.ROOT = findnss(getpwnam, "root");
- subobj.NOBODY = findnss(getpwnam, "nobody");
- subobj.NOGROUP = findnss(getgrnam, "nogroup", "nobody");
- subobj.WHEEL = findnss(getgrnam, "wheel", "root");
- subobj.USERS = findnss(getgrnam, "users", "guest", "other");
+ subobj.ROOT = findnss(nss.getpwnam, "root");
+ subobj.NOBODY = findnss(nss.getpwnam, "nobody");
+ subobj.NOGROUP = findnss(nss.getgrnam, "nogroup", "nobody");
+ subobj.WHEEL = findnss(nss.getgrnam, "wheel", "root");
+ subobj.USERS = findnss(nss.getgrnam, "users", "guest", "other");
subobj.DNSDOMAIN = strlower(subobj.REALM);
subobj.DNSNAME = sprintf("%s.%s",
strlower(subobj.HOSTNAME),