summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
Diffstat (limited to 'testprogs')
-rwxr-xr-xtestprogs/ejs/ldap.js41
-rwxr-xr-xtestprogs/ejs/samba3sam.js198
2 files changed, 138 insertions, 101 deletions
diff --git a/testprogs/ejs/ldap.js b/testprogs/ejs/ldap.js
index ecd50c3097..7ea66a7998 100755
--- a/testprogs/ejs/ldap.js
+++ b/testprogs/ejs/ldap.js
@@ -25,7 +25,7 @@ if (options.ARGV.length != 1) {
var host = options.ARGV[0];
-function basic_tests(ldb, gc_ldb, base_dn, configuration_dn)
+function basic_tests(ldb, gc_ldb, base_dn, configuration_dn, schema_dn)
{
println("Running basic tests");
@@ -473,6 +473,33 @@ objectClass: user
assert(res.error == 0);
assert (res.msgs.length > 0);
+ println("Testing objectCategory canonacolisation");
+ var attrs = new Array("cn");
+ var res = ldb.search("objectCategory=ntDsDSA", configuration_dn, ldb.SCOPE_SUBTREE, attrs);
+ assert(res.error == 0);
+ if (res.msgs.length == 0) {
+ println("Didn't find any records with objectCategory=ntDsDSA");
+ }
+ assert(res.msgs.length != 0);
+
+ var attrs = new Array("cn");
+ var res = ldb.search("objectCategory=CN=ntDs-DSA," + schema_dn, configuration_dn, ldb.SCOPE_SUBTREE, attrs);
+ assert(res.error == 0);
+ if (res.msgs.length == 0) {
+ println("Didn't find any records with objectCategory=CN=ntDs-DSA," + schema_dn);
+ }
+ assert(res.msgs.length != 0);
+
+ println("Testing objectClass attribute order on "+ base_dn);
+ var attrs = new Array("objectclass");
+ var res = ldb.search("objectClass=domain", base_dn, ldb.SCOPE_BASE, attrs);
+ assert(res.error == 0);
+ assert(res.msgs.length == 1);
+
+ assert(res.msgs[0].objectClass[0] == "top");
+ assert(res.msgs[0].objectClass[1] == "domain");
+ assert(res.msgs[0].objectClass[2] == "domainDNS");
+
}
function basedn_tests(ldb, gc_ldb)
@@ -522,6 +549,15 @@ function find_configurationdn(ldb)
return res.msgs[0].configurationNamingContext;
}
+function find_schemadn(ldb)
+{
+ var attrs = new Array("schemaNamingContext");
+ var res = ldb.search("", "", ldb.SCOPE_BASE, attrs);
+ assert(res.error == 0);
+ assert(res.msgs.length == 1);
+ return res.msgs[0].schemaNamingContext;
+}
+
/* use command line creds if available */
ldb.credentials = options.get_credentials();
gc_ldb.credentials = options.get_credentials();
@@ -529,6 +565,7 @@ gc_ldb.credentials = options.get_credentials();
var ok = ldb.connect("ldap://" + host);
var base_dn = find_basedn(ldb);
var configuration_dn = find_configurationdn(ldb);
+var schema_dn = find_schemadn(ldb);
printf("baseDN: %s\n", base_dn);
@@ -537,7 +574,7 @@ if (!ok) {
gc_ldb = undefined;
}
-basic_tests(ldb, gc_ldb, base_dn, configuration_dn)
+basic_tests(ldb, gc_ldb, base_dn, configuration_dn, schema_dn)
basedn_tests(ldb, gc_ldb)
diff --git a/testprogs/ejs/samba3sam.js b/testprogs/ejs/samba3sam.js
index e0fab647b5..5fa527a694 100755
--- a/testprogs/ejs/samba3sam.js
+++ b/testprogs/ejs/samba3sam.js
@@ -270,7 +270,7 @@ objectClass: user
cn: X
codePage: x
revision: x
-objectCategory: x
+dnsHostName: x
nextRid: y
lastLogon: x
description: x
@@ -282,7 +282,7 @@ objectClass: top
cn: Y
codePage: x
revision: x
-objectCategory: y
+dnsHostName: y
nextRid: y
lastLogon: y
description: x
@@ -292,7 +292,7 @@ objectClass: top
cn: Z
codePage: x
revision: y
-objectCategory: z
+dnsHostName: z
nextRid: y
lastLogon: z
description: y
@@ -342,86 +342,86 @@ description: y
/* Search remote record by local DN */
dn = s4.dn("cn=A");
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("", dn, ldb.SCOPE_BASE, attrs);
assert(res.error == 0);
assert(res.msgs.length == 1);
assert(res.msgs[0].dn == dn);
- assert(res.msgs[0].objectCategory == undefined);
+ assert(res.msgs[0].dnsHostName == undefined);
assert(res.msgs[0].lastLogon == "x");
/* Search remote record by remote DN */
dn = s3.dn("cn=A");
- attrs = new Array("objectCategory", "lastLogon", "sambaLogonTime");
+ attrs = new Array("dnsHostName", "lastLogon", "sambaLogonTime");
res = s3.db.search("", dn, ldb.SCOPE_BASE, attrs);
assert(res.error == 0);
assert(res.msgs.length == 1);
assert(res.msgs[0].dn == dn);
- assert(res.msgs[0].objectCategory == undefined);
+ assert(res.msgs[0].dnsHostName == undefined);
assert(res.msgs[0].lastLogon == undefined);
assert(res.msgs[0].sambaLogonTime == "x");
/* Search split record by local DN */
dn = s4.dn("cn=X");
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("", dn, ldb.SCOPE_BASE, attrs);
assert(res.error == 0);
assert(res.msgs.length == 1);
assert(res.msgs[0].dn == dn);
- assert(res.msgs[0].objectCategory == "x");
+ assert(res.msgs[0].dnsHostName == "x");
assert(res.msgs[0].lastLogon == "x");
/* Search split record by remote DN */
dn = s3.dn("cn=X");
- attrs = new Array("objectCategory", "lastLogon", "sambaLogonTime");
+ attrs = new Array("dnsHostName", "lastLogon", "sambaLogonTime");
res = s3.db.search("", dn, ldb.SCOPE_BASE, attrs);
assert(res.error == 0);
assert(res.msgs.length == 1);
assert(res.msgs[0].dn == dn);
- assert(res.msgs[0].objectCategory == undefined);
+ assert(res.msgs[0].dnsHostName == undefined);
assert(res.msgs[0].lastLogon == undefined);
assert(res.msgs[0].sambaLogonTime == "x");
println("Testing search by attribute");
/* Search by ignored attribute */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(revision=x)", NULL, ldb. SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 2);
assert(res.msgs[0].dn == s4.dn("cn=Y"));
- assert(res.msgs[0].objectCategory == "y");
+ assert(res.msgs[0].dnsHostName == "y");
assert(res.msgs[0].lastLogon == "y");
assert(res.msgs[1].dn == s4.dn("cn=X"));
- assert(res.msgs[1].objectCategory == "x");
+ assert(res.msgs[1].dnsHostName == "x");
assert(res.msgs[1].lastLogon == "x");
/* Search by kept attribute */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(description=y)", NULL, ldb. SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 2);
assert(res.msgs[0].dn == s4.dn("cn=Z"));
- assert(res.msgs[0].objectCategory == "z");
+ assert(res.msgs[0].dnsHostName == "z");
assert(res.msgs[0].lastLogon == "z");
assert(res.msgs[1].dn == s4.dn("cn=C"));
- assert(res.msgs[1].objectCategory == undefined);
+ assert(res.msgs[1].dnsHostName == undefined);
assert(res.msgs[1].lastLogon == "z");
/* Search by renamed attribute */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(badPwdCount=x)", NULL, ldb. SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 2);
assert(res.msgs[0].dn == s4.dn("cn=B"));
- assert(res.msgs[0].objectCategory == undefined);
+ assert(res.msgs[0].dnsHostName == undefined);
assert(res.msgs[0].lastLogon == "y");
assert(res.msgs[1].dn == s4.dn("cn=A"));
- assert(res.msgs[1].objectCategory == undefined);
+ assert(res.msgs[1].dnsHostName == undefined);
assert(res.msgs[1].lastLogon == "x");
/* Search by converted attribute */
- attrs = new Array("objectCategory", "lastLogon", "objectSid");
+ attrs = new Array("dnsHostName", "lastLogon", "objectSid");
/* TODO:
Using the SID directly in the parse tree leads to conversion
errors, letting the search fail with no results.
@@ -431,23 +431,23 @@ description: y
assert(res.error == 0);
assert(res.msgs.length == 2);
assert(res.msgs[0].dn == s4.dn("cn=X"));
- assert(res.msgs[0].objectCategory == "x");
+ assert(res.msgs[0].dnsHostName == "x");
assert(res.msgs[0].lastLogon == "x");
assert(res.msgs[0].objectSid == "S-1-5-21-4231626423-2410014848-2360679739-552");
assert(res.msgs[1].dn == s4.dn("cn=A"));
- assert(res.msgs[1].objectCategory == undefined);
+ assert(res.msgs[1].dnsHostName == undefined);
assert(res.msgs[1].lastLogon == "x");
assert(res.msgs[1].objectSid == "S-1-5-21-4231626423-2410014848-2360679739-552");
/* Search by generated attribute */
/* In most cases, this even works when the mapping is missing
* a `convert_operator' by enumerating the remote db. */
- attrs = new Array("objectCategory", "lastLogon", "primaryGroupID");
+ attrs = new Array("dnsHostName", "lastLogon", "primaryGroupID");
res = ldb.search("(primaryGroupID=512)", NULL, ldb. SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 1);
assert(res.msgs[0].dn == s4.dn("cn=A"));
- assert(res.msgs[0].objectCategory == undefined);
+ assert(res.msgs[0].dnsHostName == undefined);
assert(res.msgs[0].lastLogon == "x");
assert(res.msgs[0].primaryGroupID == "512");
@@ -468,23 +468,23 @@ description: y
*/
/* Search by remote name of renamed attribute */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(sambaBadPasswordCount=*)", "", ldb. SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 0);
/* Search by objectClass */
- attrs = new Array("objectCategory", "lastLogon", "objectClass");
+ attrs = new Array("dnsHostName", "lastLogon", "objectClass");
res = ldb.search("(objectClass=user)", NULL, ldb. SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 2);
assert(res.msgs[0].dn == s4.dn("cn=X"));
- assert(res.msgs[0].objectCategory == "x");
+ assert(res.msgs[0].dnsHostName == "x");
assert(res.msgs[0].lastLogon == "x");
assert(res.msgs[0].objectClass != undefined);
assert(res.msgs[0].objectClass[3] == "user");
assert(res.msgs[1].dn == s4.dn("cn=A"));
- assert(res.msgs[1].objectCategory == undefined);
+ assert(res.msgs[1].dnsHostName == undefined);
assert(res.msgs[1].lastLogon == "x");
assert(res.msgs[1].objectClass != undefined);
assert(res.msgs[1].objectClass[0] == "user");
@@ -494,19 +494,19 @@ description: y
assert(res.error == 0);
assert(res.msgs.length == 3);
assert(res.msgs[0].dn == s4.dn("cn=B"));
- assert(res.msgs[0].objectCategory == undefined);
+ assert(res.msgs[0].dnsHostName == undefined);
assert(res.msgs[0].lastLogon == "y");
assert(res.msgs[0].objectClass != undefined);
for (i=0;i<res.msgs[0].objectClass.length;i++) {
assert(res.msgs[0].objectClass[i] != "user");
}
assert(res.msgs[1].dn == s4.dn("cn=X"));
- assert(res.msgs[1].objectCategory == "x");
+ assert(res.msgs[1].dnsHostName == "x");
assert(res.msgs[1].lastLogon == "x");
assert(res.msgs[1].objectClass != undefined);
assert(res.msgs[1].objectClass[3] == "user");
assert(res.msgs[2].dn == s4.dn("cn=A"));
- assert(res.msgs[2].objectCategory == undefined);
+ assert(res.msgs[2].dnsHostName == undefined);
assert(res.msgs[2].lastLogon == "x");
assert(res.msgs[2].objectClass != undefined);
assert(res.msgs[2].objectClass[0] == "user");
@@ -514,43 +514,43 @@ description: y
println("Testing search by parse tree");
/* Search by conjunction of local attributes */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(&(codePage=x)(revision=x))", NULL, ldb.SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 2);
assert(res.msgs[0].dn == s4.dn("cn=Y"));
- assert(res.msgs[0].objectCategory == "y");
+ assert(res.msgs[0].dnsHostName == "y");
assert(res.msgs[0].lastLogon == "y");
assert(res.msgs[1].dn == s4.dn("cn=X"));
- assert(res.msgs[1].objectCategory == "x");
+ assert(res.msgs[1].dnsHostName == "x");
assert(res.msgs[1].lastLogon == "x");
/* Search by conjunction of remote attributes */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(&(lastLogon=x)(description=x))", NULL, ldb.SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 2);
assert(res.msgs[0].dn == s4.dn("cn=X"));
- assert(res.msgs[0].objectCategory == "x");
+ assert(res.msgs[0].dnsHostName == "x");
assert(res.msgs[0].lastLogon == "x");
assert(res.msgs[1].dn == s4.dn("cn=A"));
- assert(res.msgs[1].objectCategory == undefined);
+ assert(res.msgs[1].dnsHostName == undefined);
assert(res.msgs[1].lastLogon == "x");
/* Search by conjunction of local and remote attribute */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(&(codePage=x)(description=x))", NULL, ldb.SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 2);
assert(res.msgs[0].dn == s4.dn("cn=Y"));
- assert(res.msgs[0].objectCategory == "y");
+ assert(res.msgs[0].dnsHostName == "y");
assert(res.msgs[0].lastLogon == "y");
assert(res.msgs[1].dn == s4.dn("cn=X"));
- assert(res.msgs[1].objectCategory == "x");
+ assert(res.msgs[1].dnsHostName == "x");
assert(res.msgs[1].lastLogon == "x");
/* Search by conjunction of local and remote attribute w/o match */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(&(codePage=x)(nextRid=x))", NULL, ldb.SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 0);
@@ -559,203 +559,203 @@ description: y
assert(res.msgs.length == 0);
/* Search by disjunction of local attributes */
- attrs = new Array("objectCategory", "lastLogon");
- res = ldb.search("(|(revision=x)(objectCategory=x))", NULL, ldb.SCOPE_DEFAULT, attrs);
+ attrs = new Array("dnsHostName", "lastLogon");
+ res = ldb.search("(|(revision=x)(dnsHostName=x))", NULL, ldb.SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 2);
assert(res.msgs[0].dn == s4.dn("cn=Y"));
- assert(res.msgs[0].objectCategory == "y");
+ assert(res.msgs[0].dnsHostName == "y");
assert(res.msgs[0].lastLogon == "y");
assert(res.msgs[1].dn == s4.dn("cn=X"));
- assert(res.msgs[1].objectCategory == "x");
+ assert(res.msgs[1].dnsHostName == "x");
assert(res.msgs[1].lastLogon == "x");
/* Search by disjunction of remote attributes */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(|(badPwdCount=x)(lastLogon=x))", NULL, ldb.SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 3);
assert(res.msgs[0].dn == s4.dn("cn=B"));
- assert(res.msgs[0].objectCategory == undefined);
+ assert(res.msgs[0].dnsHostName == undefined);
assert(res.msgs[0].lastLogon == "y");
assert(res.msgs[1].dn == s4.dn("cn=X"));
- assert(res.msgs[1].objectCategory == "x");
+ assert(res.msgs[1].dnsHostName == "x");
assert(res.msgs[1].lastLogon == "x");
assert(res.msgs[2].dn == s4.dn("cn=A"));
- assert(res.msgs[2].objectCategory == undefined);
+ assert(res.msgs[2].dnsHostName == undefined);
assert(res.msgs[2].lastLogon == "x");
/* Search by disjunction of local and remote attribute */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(|(revision=x)(lastLogon=y))", NULL, ldb.SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 3);
assert(res.msgs[0].dn == s4.dn("cn=Y"));
- assert(res.msgs[0].objectCategory == "y");
+ assert(res.msgs[0].dnsHostName == "y");
assert(res.msgs[0].lastLogon == "y");
assert(res.msgs[1].dn == s4.dn("cn=B"));
- assert(res.msgs[1].objectCategory == undefined);
+ assert(res.msgs[1].dnsHostName == undefined);
assert(res.msgs[1].lastLogon == "y");
assert(res.msgs[2].dn == s4.dn("cn=X"));
- assert(res.msgs[2].objectCategory == "x");
+ assert(res.msgs[2].dnsHostName == "x");
assert(res.msgs[2].lastLogon == "x");
/* Search by disjunction of local and remote attribute w/o match */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(|(codePage=y)(nextRid=z))", NULL, ldb.SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 0);
/* Search by negated local attribute */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(!(revision=x))", NULL, ldb.SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 4);
assert(res.msgs[0].dn == s4.dn("cn=B"));
- assert(res.msgs[0].objectCategory == undefined);
+ assert(res.msgs[0].dnsHostName == undefined);
assert(res.msgs[0].lastLogon == "y");
assert(res.msgs[1].dn == s4.dn("cn=A"));
- assert(res.msgs[1].objectCategory == undefined);
+ assert(res.msgs[1].dnsHostName == undefined);
assert(res.msgs[1].lastLogon == "x");
assert(res.msgs[2].dn == s4.dn("cn=Z"));
- assert(res.msgs[2].objectCategory == "z");
+ assert(res.msgs[2].dnsHostName == "z");
assert(res.msgs[2].lastLogon == "z");
assert(res.msgs[3].dn == s4.dn("cn=C"));
- assert(res.msgs[3].objectCategory == undefined);
+ assert(res.msgs[3].dnsHostName == undefined);
assert(res.msgs[3].lastLogon == "z");
/* Search by negated remote attribute */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(!(description=x))", NULL, ldb.SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 2);
assert(res.msgs[0].dn == s4.dn("cn=Z"));
- assert(res.msgs[0].objectCategory == "z");
+ assert(res.msgs[0].dnsHostName == "z");
assert(res.msgs[0].lastLogon == "z");
assert(res.msgs[1].dn == s4.dn("cn=C"));
- assert(res.msgs[1].objectCategory == undefined);
+ assert(res.msgs[1].dnsHostName == undefined);
assert(res.msgs[1].lastLogon == "z");
/* Search by negated conjunction of local attributes */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(!(&(codePage=x)(revision=x)))", NULL, ldb.SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 4);
assert(res.msgs[0].dn == s4.dn("cn=B"));
- assert(res.msgs[0].objectCategory == undefined);
+ assert(res.msgs[0].dnsHostName == undefined);
assert(res.msgs[0].lastLogon == "y");
assert(res.msgs[1].dn == s4.dn("cn=A"));
- assert(res.msgs[1].objectCategory == undefined);
+ assert(res.msgs[1].dnsHostName == undefined);
assert(res.msgs[1].lastLogon == "x");
assert(res.msgs[2].dn == s4.dn("cn=Z"));
- assert(res.msgs[2].objectCategory == "z");
+ assert(res.msgs[2].dnsHostName == "z");
assert(res.msgs[2].lastLogon == "z");
assert(res.msgs[3].dn == s4.dn("cn=C"));
- assert(res.msgs[3].objectCategory == undefined);
+ assert(res.msgs[3].dnsHostName == undefined);
assert(res.msgs[3].lastLogon == "z");
/* Search by negated conjunction of remote attributes */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(!(&(lastLogon=x)(description=x)))", NULL, ldb.SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 4);
assert(res.msgs[0].dn == s4.dn("cn=Y"));
- assert(res.msgs[0].objectCategory == "y");
+ assert(res.msgs[0].dnsHostName == "y");
assert(res.msgs[0].lastLogon == "y");
assert(res.msgs[1].dn == s4.dn("cn=B"));
- assert(res.msgs[1].objectCategory == undefined);
+ assert(res.msgs[1].dnsHostName == undefined);
assert(res.msgs[1].lastLogon == "y");
assert(res.msgs[2].dn == s4.dn("cn=Z"));
- assert(res.msgs[2].objectCategory == "z");
+ assert(res.msgs[2].dnsHostName == "z");
assert(res.msgs[2].lastLogon == "z");
assert(res.msgs[3].dn == s4.dn("cn=C"));
- assert(res.msgs[3].objectCategory == undefined);
+ assert(res.msgs[3].dnsHostName == undefined);
assert(res.msgs[3].lastLogon == "z");
/* Search by negated conjunction of local and remote attribute */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(!(&(codePage=x)(description=x)))", NULL, ldb.SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 4);
assert(res.msgs[0].dn == s4.dn("cn=B"));
- assert(res.msgs[0].objectCategory == undefined);
+ assert(res.msgs[0].dnsHostName == undefined);
assert(res.msgs[0].lastLogon == "y");
assert(res.msgs[1].dn == s4.dn("cn=A"));
- assert(res.msgs[1].objectCategory == undefined);
+ assert(res.msgs[1].dnsHostName == undefined);
assert(res.msgs[1].lastLogon == "x");
assert(res.msgs[2].dn == s4.dn("cn=Z"));
- assert(res.msgs[2].objectCategory == "z");
+ assert(res.msgs[2].dnsHostName == "z");
assert(res.msgs[2].lastLogon == "z");
assert(res.msgs[3].dn == s4.dn("cn=C"));
- assert(res.msgs[3].objectCategory == undefined);
+ assert(res.msgs[3].dnsHostName == undefined);
assert(res.msgs[3].lastLogon == "z");
/* Search by negated disjunction of local attributes */
- attrs = new Array("objectCategory", "lastLogon");
- res = ldb.search("(!(|(revision=x)(objectCategory=x)))", NULL, ldb.SCOPE_DEFAULT, attrs);
+ attrs = new Array("dnsHostName", "lastLogon");
+ res = ldb.search("(!(|(revision=x)(dnsHostName=x)))", NULL, ldb.SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs[0].dn == s4.dn("cn=B"));
- assert(res.msgs[0].objectCategory == undefined);
+ assert(res.msgs[0].dnsHostName == undefined);
assert(res.msgs[0].lastLogon == "y");
assert(res.msgs[1].dn == s4.dn("cn=A"));
- assert(res.msgs[1].objectCategory == undefined);
+ assert(res.msgs[1].dnsHostName == undefined);
assert(res.msgs[1].lastLogon == "x");
assert(res.msgs[2].dn == s4.dn("cn=Z"));
- assert(res.msgs[2].objectCategory == "z");
+ assert(res.msgs[2].dnsHostName == "z");
assert(res.msgs[2].lastLogon == "z");
assert(res.msgs[3].dn == s4.dn("cn=C"));
- assert(res.msgs[3].objectCategory == undefined);
+ assert(res.msgs[3].dnsHostName == undefined);
assert(res.msgs[3].lastLogon == "z");
/* Search by negated disjunction of remote attributes */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(!(|(badPwdCount=x)(lastLogon=x)))", NULL, ldb.SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 3);
assert(res.msgs[0].dn == s4.dn("cn=Y"));
- assert(res.msgs[0].objectCategory == "y");
+ assert(res.msgs[0].dnsHostName == "y");
assert(res.msgs[0].lastLogon == "y");
assert(res.msgs[1].dn == s4.dn("cn=Z"));
- assert(res.msgs[1].objectCategory == "z");
+ assert(res.msgs[1].dnsHostName == "z");
assert(res.msgs[1].lastLogon == "z");
assert(res.msgs[2].dn == s4.dn("cn=C"));
- assert(res.msgs[2].objectCategory == undefined);
+ assert(res.msgs[2].dnsHostName == undefined);
assert(res.msgs[2].lastLogon == "z");
/* Search by negated disjunction of local and remote attribute */
- attrs = new Array("objectCategory", "lastLogon");
+ attrs = new Array("dnsHostName", "lastLogon");
res = ldb.search("(!(|(revision=x)(lastLogon=y)))", NULL, ldb.SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 3);
assert(res.msgs[0].dn == s4.dn("cn=A"));
- assert(res.msgs[0].objectCategory == undefined);
+ assert(res.msgs[0].dnsHostName == undefined);
assert(res.msgs[0].lastLogon == "x");
assert(res.msgs[1].dn == s4.dn("cn=Z"));
- assert(res.msgs[1].objectCategory == "z");
+ assert(res.msgs[1].dnsHostName == "z");
assert(res.msgs[1].lastLogon == "z");
assert(res.msgs[2].dn == s4.dn("cn=C"));
- assert(res.msgs[2].objectCategory == undefined);
+ assert(res.msgs[2].dnsHostName == undefined);
assert(res.msgs[2].lastLogon == "z");
/* Search by complex parse tree */
- attrs = new Array("objectCategory", "lastLogon");
- res = ldb.search("(|(&(revision=x)(objectCategory=x))(!(&(description=x)(nextRid=y)))(badPwdCount=y))", NULL, ldb.SCOPE_DEFAULT, attrs);
+ attrs = new Array("dnsHostName", "lastLogon");
+ res = ldb.search("(|(&(revision=x)(dnsHostName=x))(!(&(description=x)(nextRid=y)))(badPwdCount=y))", NULL, ldb.SCOPE_DEFAULT, attrs);
assert(res.error == 0);
assert(res.msgs.length == 5);
assert(res.msgs[0].dn == s4.dn("cn=B"));
- assert(res.msgs[0].objectCategory == undefined);
+ assert(res.msgs[0].dnsHostName == undefined);
assert(res.msgs[0].lastLogon == "y");
assert(res.msgs[1].dn == s4.dn("cn=X"));
- assert(res.msgs[1].objectCategory == "x");
+ assert(res.msgs[1].dnsHostName == "x");
assert(res.msgs[1].lastLogon == "x");
assert(res.msgs[2].dn == s4.dn("cn=A"));
- assert(res.msgs[2].objectCategory == undefined);
+ assert(res.msgs[2].dnsHostName == undefined);
assert(res.msgs[2].lastLogon == "x");
assert(res.msgs[3].dn == s4.dn("cn=Z"));
- assert(res.msgs[3].objectCategory == "z");
+ assert(res.msgs[3].dnsHostName == "z");
assert(res.msgs[3].lastLogon == "z");
assert(res.msgs[4].dn == s4.dn("cn=C"));
- assert(res.msgs[4].objectCategory == undefined);
+ assert(res.msgs[4].dnsHostName == undefined);
assert(res.msgs[4].lastLogon == "z");
/* Clean up */