diff options
author | Volker Lendecke <vl@samba.org> | 2011-02-20 17:41:22 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-02-20 20:50:13 +0100 |
commit | 288b396411bfe8f8eb7353193991a1910c97751e (patch) | |
tree | 649e71028340e2a5c731dc8473773d35006bbefe /source3 | |
parent | fd880fda0d19bf261368c761b2e92314613357ae (diff) | |
download | samba-288b396411bfe8f8eb7353193991a1910c97751e.tar.gz samba-288b396411bfe8f8eb7353193991a1910c97751e.tar.bz2 samba-288b396411bfe8f8eb7353193991a1910c97751e.zip |
s3: Fix error returns in pdb_ads_mod_groupmem
Diffstat (limited to 'source3')
-rw-r--r-- | source3/passdb/pdb_ads.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c index ad38256abb..91a981b91f 100644 --- a/source3/passdb/pdb_ads.c +++ b/source3/passdb/pdb_ads.c @@ -1214,10 +1214,12 @@ static NTSTATUS pdb_ads_mod_groupmem(struct pdb_methods *m, if (rc != TLDAP_SUCCESS) { DEBUG(10, ("ldap_modify failed: %s\n", tldap_errstr(talloc_tos(), state->ld, rc))); - if (rc == TLDAP_TYPE_OR_VALUE_EXISTS) { + if ((mod_op == TLDAP_MOD_ADD) && + (rc == TLDAP_ALREADY_EXISTS)) { return NT_STATUS_MEMBER_IN_GROUP; } - if (rc == TLDAP_NO_SUCH_ATTRIBUTE) { + if ((mod_op == TLDAP_MOD_DELETE) && + (rc == TLDAP_UNWILLING_TO_PERFORM)) { return NT_STATUS_MEMBER_NOT_IN_GROUP; } return NT_STATUS_LDAP(rc); |