From: Pierangelo Masarati Date: Fri, 3 Aug 2007 19:19:36 +0000 (+0000) Subject: require ';binary' when appropriate (ITS#5071) X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~275 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=32a9d5c7ed4afd65226334be68fdba7b4b1ebe7f;p=openldap require ';binary' when appropriate (ITS#5071) --- diff --git a/servers/slapd/entry.c b/servers/slapd/entry.c index 7f1461d24f..c2fd04ed59 100644 --- a/servers/slapd/entry.c +++ b/servers/slapd/entry.c @@ -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 )) {