summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs/smbcalls_nss.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-20 06:20:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:29:47 -0500
commit240ca36cf2a3ceb89e46b73486865a4a57339c89 (patch)
tree7b6bd88d310719d197103a6fb2eae7f8980243ff /source4/scripting/ejs/smbcalls_nss.c
parenta4428c814ad90884ac0b442233d318f061f221bc (diff)
downloadsamba-240ca36cf2a3ceb89e46b73486865a4a57339c89.tar.gz
samba-240ca36cf2a3ceb89e46b73486865a4a57339c89.tar.bz2
samba-240ca36cf2a3ceb89e46b73486865a4a57339c89.zip
r8635: make object inheritance with the builtin objects easy by allowing
callers to optionally supply an existing object to add the properties to. So you can do: var rpc = samr_init(); lsa_init(rpc); and you end up with 'rpc' having both the samr and lsa functions and constants available. (This used to be commit 6a1ed328e27769bd52899fc2437a43fc17104eff)
Diffstat (limited to 'source4/scripting/ejs/smbcalls_nss.c')
-rw-r--r--source4/scripting/ejs/smbcalls_nss.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source4/scripting/ejs/smbcalls_nss.c b/source4/scripting/ejs/smbcalls_nss.c
index a804c14b7f..6111ed57c2 100644
--- a/source4/scripting/ejs/smbcalls_nss.c
+++ b/source4/scripting/ejs/smbcalls_nss.c
@@ -141,10 +141,7 @@ static int ejs_getgrgid(MprVarHandle eid, int argc, struct MprVar **argv)
*/
static int ejs_nss_init(MprVarHandle eid, int argc, struct MprVar **argv)
{
- struct MprVar *nss;
- mpr_Return(eid, mprObject("nss"));
-
- nss = ejsGetReturnValue(eid);
+ struct MprVar *nss = mprInitObject(eid, "nss", argc, argv);
mprSetCFunction(nss, "getpwnam", ejs_getpwnam);
mprSetCFunction(nss, "getpwuid", ejs_getpwuid);