]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-relay/init.c
Sync with HEAD
[openldap] / servers / slapd / back-relay / init.c
index 9cb0a91a756a5cc6016a65c4e0d2fc1db52f019d..d5a3d9ac15a5d4abacad01c05896079954e688ba 100644 (file)
@@ -97,10 +97,20 @@ relay_back_db_open( Backend *be )
 
        if ( !BER_BVISNULL( &ri->ri_realsuffix ) ) {
                ri->ri_bd = select_backend( &ri->ri_realsuffix, 0, 1 );
+
                /* must be there: it was during config! */
                assert( ri->ri_bd );
 
-               /* FIXME: (somehow) copy supported controls ? */
+               /* inherit controls */
+               if ( ri->ri_bd->be_controls ) {
+                       be->be_controls = ldap_charray_dup( ri->ri_bd->be_controls );
+               }
+
+       } else {
+               /* inherit all? */
+               if ( frontendDB->be_controls ) {
+                       be->be_controls = ldap_charray_dup( frontendDB->be_controls );
+               }
        }
 
        return 0;