s4:ldap.py - add testcase which demonstrates the reset of the "primaryGroupID"
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Thu, 10 Jun 2010 14:18:41 +0000 (16:18 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Thu, 10 Jun 2010 14:22:09 +0000 (16:22 +0200)
source4/lib/ldb/tests/python/ldap.py

index 9682b4bc5320ba3afdf624582a5d0ddd37e9de10..db69b47ab3b1e85e5ff7fde58493272da37e5547 100755 (executable)
@@ -1028,6 +1028,13 @@ objectClass: container
             "dn": "cn=ldaptestuser,cn=users," + self.base_dn,
             "objectclass": ["user", "person"]})
 
+        # We should be able to reset our actual primary group
+        m = Message()
+        m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn)
+        m["primaryGroupID"] = MessageElement("513", FLAG_MOD_REPLACE,
+          "primaryGroupID")
+        ldb.modify(m)
+
         # Try to add invalid primary group
         m = Message()
         m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn)