From b660e51decaa1da99bce7eac80e6a6fad69b6dcb Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 9 Jun 2009 22:09:41 +0200 Subject: [PATCH] If there are no mods, don't bother the ldap server --- source3/passdb/pdb_ads.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c index c3e918964527..8e30dfb5bce5 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, -- 2.34.1