From 32a9d5c7ed4afd65226334be68fdba7b4b1ebe7f Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 3 Aug 2007 19:19:36 +0000 Subject: [PATCH] require ';binary' when appropriate (ITS#5071) --- servers/slapd/entry.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 )) { -- 2.39.5