rem: assert(res.length == 1 && res[0].objectSid != undefined); var sid = res[0].objectSid; 
add: assert(res.error == 0); assert(res.msgs.length == 1 && res.msgs[0].objectSid != undefined); var sid = res.msgs[0].objectSid; 
context: function setup_name_mappings(info, ldb){	var lp = loadparm_init();	var attrs = new Array("objectSid");	var subobj = info.subobj;	res = ldb.search("objectSid=*", subobj.DOMAINDN, ldb.SCOPE_BASE, attrs);	assert(res.length == 1 && res[0].objectSid != undefined);	var sid = res[0].objectSid;	/* add some foreign sids if they are not present already */	add_foreign(ldb, subobj, "S-1-5-7",  "Anonymous");	add_foreign(ldb, subobj, "S-1-1-0",  "World");	add_foreign(ldb, subobj, "S-1-5-2",  "Network");	add_foreign(ldb, subobj, "S-1-5-18", "System");	add_foreign(ldb, subobj, "S-1-5-11", "Authenticated Users");	/* some well known sids */	setup_name_mapping(info, ldb, "S-1-5-7",  subobj.NOBODY);	setup_name_mapping(info, ldb, "S-1-1-0",  subobj.NOGROUP);	setup_name_mapping(info, ldb, "S-1-5-2",  subobj.NOGROUP);	setup_name_mapping(info, ldb, "S-1-5-18", subobj.ROOT);	setup_name_mapping(info, ldb, "S-1-5-11", subobj.USERS);	setup_name_mapping(info, ldb, "S-1-5-32-544", subobj.WHEEL);	setup_name_mapping(info, ldb, "S-1-5-32-545", subobj.USERS);	setup_name_mapping(info, ldb, "S-1-5-32-546", subobj.NOGROUP);	setup_name_mapping(info, ldb, "S-1-5-32-551", subobj.BACKUP);	/* and some well known domain rids */	setup_name_mapping(info, ldb, sid + "-500", subobj.ROOT);	setup_name_mapping(info, ldb, sid + "-518", subobj.WHEEL);	setup_name_mapping(info, ldb, sid + "-519", subobj.WHEEL);	setup_name_mapping(info, ldb, sid + "-512", subobj.WHEEL);	setup_name_mapping(info, ldb, sid + "-513", subobj.USERS);	setup_name_mapping(info, ldb, sid + "-520", subobj.WHEEL);	return true;}
meta: 5771	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5771/7ca399c0755e186508a4ed9796cbbbe6f50181e9/provision.js/clean/source4/scripting/libjs/provision.js