ldap/servers/slapd/back-ldbm/ldbm_modify.c | 4 +--- ldap/servers/slapd/modify.c | 18 ------------------ 2 files changed, 1 insertion(+), 21 deletions(-)
New commits: commit 6160200187b5b5f7ee662762b997c5c55401fe77 Author: Nathan Kinder nkinder@redhat.com Date: Tue Oct 19 08:10:04 2010 -0700
Bug 305131 - Allow empty modify operation
This patch allows an empty modify operation. We currently reject an empty modify operation, but this patch makes the empty operation update the modifyTimestamp and modifiersName attributes similar to a touch-type operation.
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c b/ldap/servers/slapd/back-ldbm/ldbm_modify.c index 5e3b9b5..9ee7525 100644 --- a/ldap/servers/slapd/back-ldbm/ldbm_modify.c +++ b/ldap/servers/slapd/back-ldbm/ldbm_modify.c @@ -623,9 +623,7 @@ mods_have_effect (Slapi_Entry *entry, Slapi_Mods *smods)
if ( entry && entry->e_sdn.dn ) { for ( j = 0; j < smods->num_mods - 1; j++ ) { - if ( ((mod = smods->mods[j]) != NULL) && - strcasecmp (mod->mod_type, "modifiersname") && - strcasecmp (mod->mod_type, "modifytime") ) { + if ((mod = smods->mods[j]) != NULL) { for ( attr = entry->e_attrs; attr; attr = attr->a_next ) { /* Mods have effect if at least a null-value-mod is * to actually remove an existing attribute diff --git a/ldap/servers/slapd/modify.c b/ldap/servers/slapd/modify.c index 92b06d7..d15310a 100644 --- a/ldap/servers/slapd/modify.c +++ b/ldap/servers/slapd/modify.c @@ -341,24 +341,6 @@ do_modify( Slapi_PBlock *pb ) goto free_and_return; }
- /* see if there were actually any mods to perform */ - if ( slapi_mods_get_num_mods (&smods) == 0 ) - { - int lderr; - char *emsg; - - if ( ignored_some_mods ) { - lderr = LDAP_UNWILLING_TO_PERFORM; - emsg = "no modifiable attributes specified"; - } else { - lderr = LDAP_PROTOCOL_ERROR; - emsg = "no modifications specified"; - } - op_shared_log_error_access (pb, "MOD", dn, emsg); - send_ldap_result( pb, lderr, NULL, emsg, 0, NULL ); - goto free_and_return; - } - #ifdef LDAP_DEBUG LDAPDebug( LDAP_DEBUG_ARGS, "modifications:\n", 0, 0, 0 ); for (mod = slapi_mods_get_first_mod(&smods); mod != NULL;
389-commits@lists.fedoraproject.org