r9830: Fix support for importing registry values. Extended the examplre registry...
authorJelmer Vernooij <jelmer@samba.org>
Wed, 31 Aug 2005 15:46:41 +0000 (15:46 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:36:16 +0000 (13:36 -0500)
source/scripting/libjs/upgrade.js
testdata/samba3/registry.tdb

index 0b5a71e..e78865f 100644 (file)
@@ -30,7 +30,7 @@ function regkey_to_dn(name)
  *   HKPT
  */
 
-function upgrade_registry(regdb,prefix)
+function upgrade_registry(regdb,prefix,ldb)
 {
        assert(regdb != undefined);
        var prefix_up = strupper(prefix);
@@ -63,7 +63,7 @@ name: %s
 dn: %s,value=%s
 value: %s
 type: %d
-data:: %s", keydn, rv.value, rv.type, base64(rv.data));
+data:: %s", keydn, rv.name, rv.name, rv.type, ldb.encode(rv.data));
                }
        }
 
@@ -103,8 +103,6 @@ function upgrade_sam_account(acc,domaindn)
        var ldb = ldb_init();
        var ldif = sprintf(
 "dn: cn=%s,%s
-objectClass: top
-objectClass: person
 objectClass: user
 lastLogon: %d
 lastLogoff: %d
@@ -480,7 +478,7 @@ dn: @MAP=samba3sam
                var regdb = ldb_init();
                ok = regdb.connect(paths[hn]);
                assert(ok);
-               var ldif = upgrade_registry(samba3.registry, hn);
+               var ldif = upgrade_registry(samba3.registry, hn, regdb);
                for (var j in ldif) {
                        message("... ... " + j);
                        ok = regdb.add(ldif[j]);
index 85045ca..9d64e02 100644 (file)
Binary files a/testdata/samba3/registry.tdb and b/testdata/samba3/registry.tdb differ