From c112597ba794bfd24c1f56de7ba14bec4a70f38e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 5 Nov 2007 02:29:17 +0100 Subject: r25826: Prove that adding a user or computer via LDAP doesn't magicly give them any more group memberships. Andrew Bartlett (This used to be commit c805934017af2c983b31738cb888103a5f972fdc) --- testprogs/ejs/ldap.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'testprogs') diff --git a/testprogs/ejs/ldap.js b/testprogs/ejs/ldap.js index 8376b15fbb..56fbf4f0df 100755 --- a/testprogs/ejs/ldap.js +++ b/testprogs/ejs/ldap.js @@ -432,6 +432,8 @@ objectClass: user assert(res.msgs[0].objectCategory == ("CN=Person,CN=Schema,CN=Configuration," + base_dn)); assert(res.msgs[0].sAMAccountType == 805306368); // assert(res[0].userAccountControl == 546); + assert(res.msgs[0].memberOf[0] == ("CN=ldaptestgroup2,CN=Users," + base_dn)); + assert(res.msgs[0].memberOf.length == 1); println("Testing ldb.search for (&(cn=ldaptestuser)(objectCategory=cn=person,cn=schema,cn=configuration," + base_dn + "))"); var res2 = ldb.search("(&(cn=ldaptestuser)(objectCategory=cn=person,cn=schema,cn=configuration," + base_dn + "))"); @@ -510,6 +512,7 @@ objectClass: user // assert(res.msgs[0].sAMAccountType == 805306368); // assert(res.msgs[0].userAccountControl == 546); assert(res.msgs[0].memberOf[0] == ("CN=ldaptestgroup2,CN=Users," + base_dn)); + assert(res.msgs[0].memberOf.length == 1); println("Testing ldb.search for (&(cn=ldaptestcomputer)(objectCategory=cn=computer,cn=schema,cn=configuration," + base_dn + "))"); var res2 = ldb.search("(&(cn=ldaptestcomputer)(objectCategory=cn=computer,cn=schema,cn=configuration," + base_dn + "))"); -- cgit