rem: @LIST: samldb,timestamps,objectguid,rdn_name"); 
add: @LIST: samldb,timestamps,objectguid,rdn_name,samba3sam"); 
context: function upgrade(subobj, samba3, message){	var ret = 0;	var samdb = ldb_init();	var ok = samdb.connect("sam.ldb");	assert(ok);	message("Importing account policies\n");	var ldif = upgrade_sam_policy(samba3,subobj.BASEDN);	ok = samdb.modify(ldif);	assert(ok);	var ldapurl = undefined;	// FIXME: figure out ldapurl	// Enable samba3sam module if original passdb backend was ldap	if (ldapurl != undefined) {		var ldif = sprintf("dn: @MAP=samba3sam@MAP_URL: %s", ldapurl);		samdb.add(ldif);		samdb.modify("dn: @MODULES@LIST: samldb,timestamps,objectguid,rdn_name");	}	message("Importing users\n");	for (var i in samba3.samaccounts) {		message("... " + samba3.samaccounts[i].username);		var ldif = upgrade_sam_account(samba3.samaccounts[i],subobj.BASEDN);		ok = samdb.add(ldif);		if (!ok) { 			message("... error: " + samdb.errstring()); 			ret = ret + 1; 		}		message("\n");	}	message("Importing groups\n");	for (var i in samba3.groupmappings) {		message("... " + 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()); 			ret = ret + 1; 		}		message("\n");	}	message("Importing registry data\n");	var hives = new Array("hkcr","hkcu","hklm","hkpd","hku","hkpt"); 	for (var i in hives) {		message("... " + hives[i] + "\n");		var regdb = ldb_init();		ok = regdb.connect(hives[i] + ".ldb");		assert(ok);		var ldif = upgrade_registry(samba3.registry, hives[i]);		for (var j in ldif) {			message("... ... " + j);			ok = regdb.add(ldif[j]);			if (!ok) { 				message("... error: " + regdb.errstring()); 				ret = ret + 1; 			}			message("\n");		}	}	message("Importing WINS data\n");	var winsdb = ldb_init();	ok = winsdb.connect("wins.ldb");	assert(ok);	ldb_erase(winsdb);	var ldif = upgrade_wins(samba3);	ok = winsdb.add(ldif);	assert(ok);	return ret;}
meta: 1914	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1914/cf016f972b931b54c155ca8e6df485e05c37b034/upgrade.js/buggy/source4/scripting/libjs/upgrade.js