diff options
author | Nathan Kinder <nkinder@redhat.com> | 2010-10-19 08:10:04 -0700 |
---|---|---|
committer | Nathan Kinder <nkinder@redhat.com> | 2010-10-19 08:29:12 -0700 |
commit | 6160200187b5b5f7ee662762b997c5c55401fe77 (patch) | |
tree | 7446dc66c7e827cca4dd5ef464aa7c579c4cfaa0 /ldap/servers | |
parent | f4c6760ea5da7849e5b1f3b2f8d08bd7f6eedd1a (diff) | |
download | ds-6160200187b5b5f7ee662762b997c5c55401fe77.tar.gz ds-6160200187b5b5f7ee662762b997c5c55401fe77.tar.xz ds-6160200187b5b5f7ee662762b997c5c55401fe77.zip |
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.
Diffstat (limited to 'ldap/servers')
-rw-r--r-- | ldap/servers/slapd/back-ldbm/ldbm_modify.c | 4 | ||||
-rw-r--r-- | ldap/servers/slapd/modify.c | 18 |
2 files changed, 1 insertions, 21 deletions
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c b/ldap/servers/slapd/back-ldbm/ldbm_modify.c index 5e3b9b53..9ee7525c 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 92b06d78..d15310a1 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; |