From: Volker Lendecke Date: Tue, 9 Jun 2009 20:09:41 +0000 (+0200) Subject: If there are no mods, don't bother the ldap server X-Git-Tag: tdb-1.1.5~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b660e51decaa1da99bce7eac80e6a6fad69b6dcb;p=thirdparty%2Fsamba.git If there are no mods, don't bother the ldap server --- diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c index c3e91896452..8e30dfb5bce 100644 --- a/source3/passdb/pdb_ads.c +++ b/source3/passdb/pdb_ads.c @@ -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,