Bug 675320 - empty modify operation with repl on or lastmod off will crash server
https://bugzilla.redhat.com/show_bug.cgi?id=675320
Resolves: bug 675320
Bug Description: empty modify operation with repl on or lastmod off will crash server
Reviewed by: nkinder, nhosoi (Thanks!)
Branch: 389-ds-base-1.2.8
Fix Description: Check the modifications after lastmod is applied, if any.
If there are still no mods to apply, just return LDAP_SUCCESS to the client
and end the modify request. This makes it so that an empty modify is
allowed, but no further processing is done to avoid code that may not deal
with mods == NULL.
I also found a problem with the way an empty modify was handled. OpenLDAP
does not return an explicit error code if there was a problem reading the
sequence of modify ops, so we have to resort to other checking. This allows
an empty modify to pass through, when using either mozldap or openldap.
Platforms tested: RHEL5 x86_64, RHEL6 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit 1980427b8c78e79982c056ac270c6c3b11188830)