]> git.sur5r.net Git - openldap/commitdiff
Minor adjustments to last commit
authorKurt Zeilenga <kurt@openldap.org>
Thu, 15 Jun 2000 22:53:18 +0000 (22:53 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 15 Jun 2000 22:53:18 +0000 (22:53 +0000)
servers/slapd/attr.c
servers/slapd/back-ldbm/modify.c

index f4aa43308d64a9069d7da4523826c7349aa40c01..9239e161f812e6c378608858e8c8f7ec2edcb634 100644 (file)
@@ -109,9 +109,9 @@ Attribute *attrs_dup( Attribute *a )
 
 int
 attr_merge(
-    Entry              *e,
+       Entry           *e,
        AttributeDescription *desc,
-    struct berval      **vals )
+       struct berval   **vals )
 {
        Attribute       **a;
 
index 86a1bbd41d162dfab88d7353853389c311d40007..bf5ebd44095272d1e4d8d531ab0a130d5e186b6c 100644 (file)
@@ -275,9 +275,9 @@ add_values(
 
        /* check if the values we're adding already exist */
        if ( a != NULL ) {
-               /* do allow add of additional attribute if
-                       no equality rule exists */
-               if( mr == NULL ) {
+               if( mr == NULL || !mr->smr_match ) {
+                       /* do not allow add of additional attribute
+                               if no equality rule exists */
                        return LDAP_INAPPROPRIATE_MATCHING;
                }
 
@@ -339,9 +339,9 @@ delete_values(
                    LDAP_NO_SUCH_ATTRIBUTE : LDAP_SUCCESS );
        }
 
-       /* disallow specific attributes from being deleted if
-               no equality rule */
        if( mr == NULL || !mr->smr_match ) {
+               /* disallow specific attributes from being deleted if
+                       no equality rule */
                return LDAP_INAPPROPRIATE_MATCHING;
        }