summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-08-31 16:51:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:36:17 -0500
commit0712cbdab4c397b9f74fcd681f40df9c9c2c59a8 (patch)
tree05a6e0151391ed749c6ea51c254747ac34c78a55 /source4/scripting/ejs
parent52bcf4c5a3a371e13530fe83c8b4ca06dad10b8f (diff)
downloadsamba-0712cbdab4c397b9f74fcd681f40df9c9c2c59a8.tar.gz
samba-0712cbdab4c397b9f74fcd681f40df9c9c2c59a8.tar.bz2
samba-0712cbdab4c397b9f74fcd681f40df9c9c2c59a8.zip
r9834: More tests for the upgrade from Samba3
(This used to be commit d2db164d6f674cada470e871c558c75f98244141)
Diffstat (limited to 'source4/scripting/ejs')
-rw-r--r--source4/scripting/ejs/smbcalls_samba3.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/source4/scripting/ejs/smbcalls_samba3.c b/source4/scripting/ejs/smbcalls_samba3.c
index 0d54d54dcc..0e4743eca9 100644
--- a/source4/scripting/ejs/smbcalls_samba3.c
+++ b/source4/scripting/ejs/smbcalls_samba3.c
@@ -55,6 +55,10 @@ static struct MprVar mprRegistry(struct samba3_regdb *reg)
mprAddArray(&ks, i, k);
}
+ if (i == 0) {
+ mprSetVar(&ks, "length", mprCreateIntegerVar(i));
+ }
+
mprSetVar(&mpv, "keys", ks);
return mpv;
@@ -104,6 +108,11 @@ static struct MprVar mprIdmapDb(struct samba3_idmapdb *db)
mprAddArray(&mps, i, mp);
}
+ if (i == 0) {
+ mprSetVar(&mpv, "length", mprCreateIntegerVar(i));
+ }
+
+
mprSetVar(&mpv, "mappings", mps);
return mpv;
@@ -131,6 +140,11 @@ static struct MprVar mprGroupMappings(struct samba3_groupdb *db)
mprAddArray(&mpv, i, g);
}
+ if (i == 0) {
+ mprSetVar(&mpv, "length", mprCreateIntegerVar(i));
+ }
+
+
return mpv;
}
@@ -158,6 +172,10 @@ static struct MprVar mprAliases(struct samba3_groupdb *db)
mprSetVar(&a, "members", am);
}
+ if (i == 0) {
+ mprSetVar(&mpv, "length", mprCreateIntegerVar(i));
+ }
+
return mpv;
}
@@ -219,6 +237,10 @@ static struct MprVar mprSecrets(struct samba3_secrets *sec)
mprAddArray(&es, i, mprDomainSecrets(&sec->domains[i]));
}
+ if (i == 0) {
+ mprSetVar(&es, "length", mprCreateIntegerVar(i));
+ }
+
mprSetVar(&mpv, "domains", es);
es = mprObject("trusted_domains");
@@ -247,6 +269,10 @@ static struct MprVar mprSecrets(struct samba3_secrets *sec)
mprAddArray(&es, i, e);
}
+ if (i == 0) {
+ mprSetVar(&es, "length", mprCreateIntegerVar(i));
+ }
+
mprSetVar(&mpv, "trusted_domains", es);
es = mprObject("array");
@@ -279,6 +305,10 @@ static struct MprVar mprSecrets(struct samba3_secrets *sec)
mprAddArray(&es, i, e);
}
+ if (i == 0) {
+ mprSetVar(&es, "length", mprCreateIntegerVar(i));
+ }
+
mprSetVar(&mpv, "afs_keyfiles", es);
mprSetVar(&mpv, "ipc_cred", mprCredentials(sec->ipc_cred));
@@ -301,6 +331,10 @@ static struct MprVar mprShares(struct samba3 *samba3)
mprAddArray(&mpv, i, s);
}
+ if (i == 0) {
+ mprSetVar(&mpv, "length", mprCreateIntegerVar(i));
+ }
+
return mpv;
}
@@ -348,6 +382,10 @@ static struct MprVar mprSamAccounts(struct samba3 *samba3)
mprAddArray(&mpv, i, m);
}
+ if (i == 0) {
+ mprSetVar(&mpv, "length", mprCreateIntegerVar(i));
+ }
+
return mpv;
}
@@ -375,6 +413,10 @@ static struct MprVar mprWinsEntries(struct samba3 *samba3)
mprAddArray(&mpv, i, w);
}
+ if (i == 0) {
+ mprSetVar(&mpv, "length", mprCreateIntegerVar(i));
+ }
+
return mpv;
}