]> git.sur5r.net Git - openldap/commitdiff
require ';binary' when appropriate (ITS#5071)
authorPierangelo Masarati <ando@openldap.org>
Fri, 3 Aug 2007 19:19:36 +0000 (19:19 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 3 Aug 2007 19:19:36 +0000 (19:19 +0000)
servers/slapd/entry.c

index 7f1461d24f2ac544c84475ac536269ca4014d5ac..c2fd04ed5926fbc60966b5c9b097a9aee3b25bd2 100644 (file)
@@ -265,6 +265,16 @@ str2entry2( char *s, int checkvals )
                                        goto fail;
                                }
                        }
+
+                       /* require ';binary' when appropriate (ITS#5071) */
+                       if ( slap_syntax_is_binary( ad->ad_type->sat_syntax ) && !slap_ad_is_binary( ad ) ) {
+                               Debug( LDAP_DEBUG_ANY,
+                                       "str2entry: attributeType %s #%d: "
+                                       "needs ';binary' transfer as per syntax %s\n", 
+                                       ad->ad_cname.bv_val, 0,
+                                       ad->ad_type->sat_syntax->ssyn_oid );
+                               goto fail;
+                       }
                }
 
                if (( ad_prev && ad != ad_prev ) || ( i == lines )) {