summaryrefslogtreecommitdiff
path: root/source4/scripting/libjs
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/libjs
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/libjs')
-rw-r--r--source4/scripting/libjs/upgrade.js30
1 files changed, 21 insertions, 9 deletions
diff --git a/source4/scripting/libjs/upgrade.js b/source4/scripting/libjs/upgrade.js
index e78865f196..59e433b0f2 100644
--- a/source4/scripting/libjs/upgrade.js
+++ b/source4/scripting/libjs/upgrade.js
@@ -448,26 +448,26 @@ dn: @MAP=samba3sam
message("Importing users\n");
for (var i in samba3.samaccounts) {
- message("... " + samba3.samaccounts[i].username);
+ var msg = "... " + samba3.samaccounts[i].username;
var ldif = upgrade_sam_account(samba3.samaccounts[i],subobj.BASEDN);
ok = samdb.add(ldif);
if (!ok) {
- message("... error: " + samdb.errstring());
+ msg = msg + "... error: " + samdb.errstring();
ret = ret + 1;
}
- message("\n");
+ message(msg + "\n");
}
message("Importing groups\n");
for (var i in samba3.groupmappings) {
- message("... " + samba3.groupmappings[i].nt_name);
+ var msg = "... " + samba3.groupmappings[i].nt_name;
var ldif = upgrade_sam_group(samba3.groupmappings[i],subobj.BASEDN);
ok = samdb.add(ldif);
if (!ok) {
- message("... error: " + samdb.errstring());
+ msg = msg + "... error: " + samdb.errstring();
ret = ret + 1;
}
- message("\n");
+ message(msg + "\n");
}
message("Importing registry data\n");
@@ -480,13 +480,13 @@ dn: @MAP=samba3sam
assert(ok);
var ldif = upgrade_registry(samba3.registry, hn, regdb);
for (var j in ldif) {
- message("... ... " + j);
+ var msg = "... ... " + j;
ok = regdb.add(ldif[j]);
if (!ok) {
- message("... error: " + regdb.errstring());
+ msg = msg + "... error: " + regdb.errstring();
ret = ret + 1;
}
- message("\n");
+ message(msg + "\n");
}
}
@@ -502,3 +502,15 @@ dn: @MAP=samba3sam
return ret;
}
+
+function upgrade_verify(subobj, samba3,paths,message)
+{
+ message("Verifying account policies\n");
+ var samldb = ldb_init();
+ var ne = 0;
+
+ var ok = samldb.connect(paths.samdb);
+ assert(ok);
+
+ // FIXME
+}