From: Pierangelo Masarati Date: Thu, 4 Oct 2007 22:18:34 +0000 (+0000) Subject: ITS#5168 also affects back-meta X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~555 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=55a988831a145ba85fa99cbc3997a2d9d5ab173f;p=openldap ITS#5168 also affects back-meta --- diff --git a/servers/slapd/back-meta/map.c b/servers/slapd/back-meta/map.c index 1871ebbddf..f0985af6e7 100644 --- a/servers/slapd/back-meta/map.c +++ b/servers/slapd/back-meta/map.c @@ -57,6 +57,7 @@ #include #include "slap.h" +#include "lutil.h" #include "../back-ldap/back-ldap.h" #include "back-meta.h" @@ -212,6 +213,7 @@ map_attr_value( int remap ) { struct berval vtmp; + char uuid[ LDAP_LUTIL_UUIDSTR_BUFSIZE ]; int freeval = 0; ldap_back_map( &dc->target->mt_rwmap.rwm_at, &ad->ad_cname, mapped_attr, remap ); @@ -258,6 +260,14 @@ map_attr_value( return -1; } + } else if ( ad->ad_type->sat_syntax == slap_schema.si_ad_entryUUID->ad_type->sat_syntax ) { + vtmp.bv_len = lutil_uuidstr_from_normalized( value->bv_val, + value->bv_len, uuid, LDAP_LUTIL_UUIDSTR_BUFSIZE ); + if ( vtmp.bv_len < 0 ) { + return -1; + } + vtmp.bv_val = uuid; + } else if ( ad == slap_schema.si_ad_objectClass || ad == slap_schema.si_ad_structuralObjectClass ) { ldap_back_map( &dc->target->mt_rwmap.rwm_oc, value, &vtmp, remap ); if ( BER_BVISNULL( &vtmp ) || BER_BVISEMPTY( &vtmp ) ) {