diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-10-30 17:48:51 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-10-30 18:15:31 +0000 |
commit | c0ebf5d7435c3c4968eefafc6c566dc818e600a0 (patch) | |
tree | 1945e6c2aa0442498b81175fde1427bd097e3949 /source4 | |
parent | 98fefa8a017bbb67f6c33080c8a80c77c34e42b8 (diff) | |
download | samba-c0ebf5d7435c3c4968eefafc6c566dc818e600a0.tar.gz samba-c0ebf5d7435c3c4968eefafc6c566dc818e600a0.tar.bz2 samba-c0ebf5d7435c3c4968eefafc6c566dc818e600a0.zip |
s4:sam.py - add a short double swap "primaryGroupID" test
It's not really meaningful but can happen.
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Oct 30 18:15:31 UTC 2010 on sn-devel-104
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/dsdb/tests/python/sam.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/dsdb/tests/python/sam.py b/source4/dsdb/tests/python/sam.py index ce720b76cb..bbcc4a818e 100755 --- a/source4/dsdb/tests/python/sam.py +++ b/source4/dsdb/tests/python/sam.py @@ -402,6 +402,15 @@ class SamTests(unittest.TestCase): FLAG_MOD_REPLACE, "primaryGroupID") ldb.modify(m) + # Swap the groups (does not really make sense but does the same) + m = Message() + m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn) + m["primaryGroupID"] = MessageElement(str(group_rid_1), + FLAG_MOD_REPLACE, "primaryGroupID") + m["primaryGroupID"] = MessageElement(str(group_rid_2), + FLAG_MOD_REPLACE, "primaryGroupID") + ldb.modify(m) + # Old primary group should contain a "member" attribute for the user, # the new shouldn't contain anymore one res1 = ldb.search("cn=ldaptestgroup, cn=users," + self.base_dn, |