diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-06-10 16:15:10 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-06-10 16:22:09 +0200 |
commit | d604d499390dea1a10bfdd462b512bfe1845a101 (patch) | |
tree | a09fa14a7f31bbeb2407e926fd2585bdb2a2ecc5 /source4/dsdb/samdb/ldb_modules/samldb.c | |
parent | 13ca999b3b4660e530ac0b91342c40ff8a3c7a31 (diff) | |
download | samba-d604d499390dea1a10bfdd462b512bfe1845a101.tar.gz samba-d604d499390dea1a10bfdd462b512bfe1845a101.tar.bz2 samba-d604d499390dea1a10bfdd462b512bfe1845a101.zip |
s4:samldb LDB module - fix up the case when the old and new "primaryGroupID" are the same
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/samldb.c')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/samldb.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index a50739baa0..5d64b6d398 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -1176,16 +1176,16 @@ static int samldb_prim_group_change(struct samldb_ctx *ac) return LDB_ERR_UNWILLING_TO_PERFORM; } - el = samdb_find_attribute(ldb, res->msgs[0], "memberOf", - ldb_dn_get_linearized(new_prim_group_dn)); - if (el == NULL) { + /* Only update the "member" attributes when we really do have a change */ + if (ldb_dn_compare(new_prim_group_dn, prev_prim_group_dn) != 0) { /* We need to be already a normal member of the new primary * group in order to be successful. */ - return LDB_ERR_UNWILLING_TO_PERFORM; - } + el = samdb_find_attribute(ldb, res->msgs[0], "memberOf", + ldb_dn_get_linearized(new_prim_group_dn)); + if (el == NULL) { + return LDB_ERR_UNWILLING_TO_PERFORM; + } - /* Only update the "member" attributes when we really do have a change */ - if (ldb_dn_compare(new_prim_group_dn, prev_prim_group_dn) != 0) { /* Remove the "member" attribute on the new primary group */ msg = talloc_zero(ac, struct ldb_message); msg->dn = new_prim_group_dn; |