From f1245d4ac1f06988dc4501c14c0e8161be8028aa Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 19 Jul 2005 00:16:43 +0000 Subject: r8561: as with the other ejs subsystems, make nss into a object (This used to be commit a3f3292e6698ce9be6a5036f47dd4fa81a1dfd4e) --- source4/scripting/libjs/provision.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'source4/scripting/libjs') 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), -- cgit