If there are no mods, don't bother the ldap server
authorVolker Lendecke <vl@samba.org>
Tue, 9 Jun 2009 20:09:41 +0000 (22:09 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 9 Jun 2009 20:40:36 +0000 (22:40 +0200)
source3/passdb/pdb_ads.c

index c3e918964527cc39f745dd178e75e734105f1a73..8e30dfb5bce51a2bd56a2b5a43d0bc29c152eec3 100644 (file)
@@ -475,6 +475,11 @@ static NTSTATUS pdb_ads_update_sam_account(struct pdb_methods *m,
                return NT_STATUS_NO_MEMORY;
        }
 
+       if (num_mods == 0) {
+               /* Nothing to do, just return success */
+               return NT_STATUS_OK;
+       }
+
        rc = tldap_modify(state->ld, priv->dn, num_mods, mods, NULL, NULL);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_modify for %s failed: %s\n", priv->dn,