~ubuntu-branches/ubuntu/wily/389-ds-base/wily-proposed

« back to all changes in this revision

Viewing changes to ldap/servers/plugins/dna/dna.c

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2014-07-08 15:50:11 UTC
  • mto: (19.1.1 experimental) (0.3.1)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: package-import@ubuntu.com-20140708155011-48naeyka2x89ew8g
Tags: upstream-1.3.2.19
ImportĀ upstreamĀ versionĀ 1.3.2.19

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
#define DNA_HOSTNAME           "dnaHostname"
102
102
#define DNA_PORTNUM            "dnaPortNum"
103
103
#define DNA_SECURE_PORTNUM     "dnaSecurePortNum"
 
104
#define DNA_REMOTE_BUFSIZ      15 /* max size for bind method & protocol */
104
105
#define DNA_REMOTE_BIND_METHOD "dnaRemoteBindMethod"
105
106
#define DNA_REMOTE_CONN_PROT   "dnaRemoteConnProtocol"
106
107
 
191
192
static PRCList *dna_global_config = NULL;
192
193
static Slapi_RWLock *g_dna_cache_lock;
193
194
 
 
195
static struct dnaServer *dna_global_servers = NULL;
 
196
static Slapi_RWLock *g_dna_cache_server_lock;
 
197
 
194
198
static void *_PluginID = NULL;
195
199
static const char *_PluginDN = NULL;
196
200
 
206
210
 */
207
211
struct dnaServer {
208
212
    PRCList list;
 
213
    Slapi_DN *sdn;
209
214
    char *host;
210
215
    unsigned int port;
211
216
    unsigned int secureport;
216
221
    char *remote_conn_prot;
217
222
    char *remote_binddn; /* contains pointer to main config binddn */
218
223
    char *remote_bindpw; /* contains pointer to main config bindpw */
 
224
    struct dnaServer *next; /* used for the global server list */
219
225
};
220
226
 
221
227
static char *dna_extend_exop_oid_list[] = {
243
249
 */
244
250
static int dna_load_plugin_config(Slapi_PBlock *pb, int use_eventq);
245
251
static int dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int apply);
246
 
static void dna_delete_config();
 
252
static void dna_delete_config(PRCList *list);
247
253
static void dna_free_config_entry(struct configEntry ** entry);
248
254
static int dna_load_host_port();
249
255
 
264
270
                                  PRUint64 new, PRUint64 last);
265
271
static int dna_update_shared_config(struct configEntry * config_entry);
266
272
static void dna_update_config_event(time_t event_time, void *arg);
267
 
static int dna_get_shared_servers(struct configEntry *config_entry, PRCList **servers);
 
273
static int dna_get_shared_servers(struct configEntry *config_entry, PRCList **servers, int get_all);
268
274
static void dna_free_shared_server(struct dnaServer **server);
269
275
static void dna_delete_shared_servers(PRCList **servers);
270
276
static int dna_release_range(char *range_dn, PRUint64 *lower, PRUint64 *upper);
287
293
static int dna_isrepl(Slapi_PBlock *pb);
288
294
static int dna_get_remote_config_info( struct dnaServer *server, char **bind_dn, char **bind_passwd,
289
295
                                       char **bind_method, int *is_ssl, int *port);
290
 
 
 
296
static int dna_load_shared_servers();
 
297
static void dna_delete_global_servers();
 
298
static int dna_get_shared_config_attr_val(struct configEntry *config_entry, char *attr, char *value);
 
299
static PRCList *dna_config_copy();
291
300
/**
292
301
 *
293
302
 * the ops (where the real work is done)
320
329
}
321
330
#endif
322
331
 
 
332
/*
 
333
 * During the plugin startup we delay the creation of the shared config entries
 
334
 * so all the other betxn plugins have time to start.  During the "delayed"
 
335
 * update config event we will need a copy of the global config, as we can not
 
336
 * hold the read lock while starting a transaction(potential deadlock).
 
337
 */
 
338
static PRCList *
 
339
dna_config_copy()
 
340
{
 
341
    PRCList *copy = (PRCList *)slapi_ch_calloc(1, sizeof(struct configEntry));
 
342
    PRCList *config_list;
 
343
    PR_INIT_CLIST(copy);
 
344
    int first = 1;
 
345
 
 
346
 
 
347
    if (!PR_CLIST_IS_EMPTY(dna_global_config)) {
 
348
        config_list = PR_LIST_HEAD(dna_global_config);
 
349
        while (config_list != dna_global_config) {
 
350
            struct configEntry *new_entry = (struct configEntry *)slapi_ch_calloc(1, sizeof(struct configEntry));
 
351
            struct configEntry *config_entry = (struct configEntry *) config_list;
 
352
 
 
353
            new_entry->dn = slapi_ch_strdup(config_entry->dn);
 
354
            new_entry->types = slapi_ch_array_dup(config_entry->types);
 
355
            new_entry->prefix = slapi_ch_strdup(config_entry->prefix);
 
356
            new_entry->filter = slapi_ch_strdup(config_entry->filter);
 
357
            new_entry->slapi_filter = slapi_filter_dup(config_entry->slapi_filter);
 
358
            new_entry->generate = slapi_ch_strdup(config_entry->generate);
 
359
            new_entry->scope = slapi_ch_strdup(config_entry->scope);
 
360
            new_entry->shared_cfg_base = slapi_ch_strdup(config_entry->shared_cfg_base);
 
361
            new_entry->shared_cfg_dn   = slapi_ch_strdup(config_entry->shared_cfg_dn);
 
362
            new_entry->remote_binddn   = slapi_ch_strdup(config_entry->remote_binddn);
 
363
            new_entry->remote_bindpw   = slapi_ch_strdup(config_entry->remote_bindpw);
 
364
            new_entry->timeout = config_entry->timeout;
 
365
            new_entry->interval = config_entry->interval;
 
366
            new_entry->threshold = config_entry->threshold;
 
367
            new_entry->nextval = config_entry->nextval;
 
368
            new_entry->maxval = config_entry->maxval;
 
369
            new_entry->remaining = config_entry->remaining;
 
370
            new_entry->extend_in_progress = config_entry->extend_in_progress;
 
371
            new_entry->next_range_lower = config_entry->next_range_lower;
 
372
            new_entry->next_range_upper = config_entry->next_range_upper;
 
373
            new_entry->lock = NULL;
 
374
            new_entry->extend_lock = NULL;
 
375
 
 
376
            if(first){
 
377
                PR_INSERT_LINK(&(new_entry->list), copy);
 
378
                first = 0;
 
379
            } else {
 
380
                PR_INSERT_BEFORE(&(new_entry->list), copy);
 
381
            }
 
382
            config_list = PR_NEXT_LINK(config_list);
 
383
        }
 
384
    }
 
385
 
 
386
    return copy;
 
387
}
 
388
 
323
389
/**
324
390
 *
325
391
 * Deal with cache locking
340
406
    slapi_rwlock_unlock(g_dna_cache_lock);
341
407
}
342
408
 
 
409
void dna_server_read_lock()
 
410
{
 
411
    slapi_rwlock_rdlock(g_dna_cache_server_lock);
 
412
}
 
413
 
 
414
void dna_server_write_lock()
 
415
{
 
416
    slapi_rwlock_wrlock(g_dna_cache_server_lock);
 
417
}
 
418
 
 
419
void dna_server_unlock()
 
420
{
 
421
    slapi_rwlock_unlock(g_dna_cache_server_lock);
 
422
}
 
423
 
343
424
/**
344
425
 *
345
426
 * Get the dna plug-in version
553
634
    }
554
635
 
555
636
    g_dna_cache_lock = slapi_new_rwlock();
556
 
 
557
637
    if (!g_dna_cache_lock) {
558
638
        slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
559
 
                        "dna_start: lock creation failed\n");
 
639
                        "dna_start: global config lock creation failed\n");
 
640
        return DNA_FAILURE;
 
641
    }
560
642
 
 
643
    g_dna_cache_server_lock = slapi_new_rwlock();
 
644
    if (!g_dna_cache_server_lock) {
 
645
        slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
 
646
                        "dna_start: global server lock creation failed\n");
561
647
        return DNA_FAILURE;
562
648
    }
563
649
 
602
688
    }
603
689
 
604
690
    g_plugin_started = 1;
 
691
 
 
692
    /*
 
693
     * Load all shared server configs
 
694
     */
 
695
    if (dna_load_shared_servers() ) {
 
696
        slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
 
697
                        "dna_start: shared config server initialization failed.\n");
 
698
        return DNA_FAILURE;
 
699
    }
 
700
 
605
701
    slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
606
702
                    "dna: ready for service\n");
607
703
    slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
628
724
 
629
725
    dna_write_lock();
630
726
    g_plugin_started = 0;
631
 
    dna_delete_config();
632
 
    dna_unlock();
633
 
 
 
727
    dna_delete_config(NULL);
634
728
    slapi_ch_free((void **)&dna_global_config);
 
729
    dna_unlock();
 
730
 
 
731
    dna_delete_global_servers();
 
732
    slapi_destroy_rwlock(g_dna_cache_server_lock);
 
733
    g_dna_cache_server_lock = NULL;
635
734
 
636
735
    slapi_ch_free_string(&hostname);
637
736
    slapi_ch_free_string(&portnum);
653
752
}
654
753
 
655
754
/*
 
755
 * Free the global linkedl ist of shared servers
 
756
 */
 
757
static void
 
758
dna_delete_global_servers()
 
759
{
 
760
    struct dnaServer *server, *next;
 
761
 
 
762
    if(dna_global_servers){
 
763
        server = dna_global_servers;
 
764
        while(server){
 
765
            next = server->next;
 
766
            dna_free_shared_server(&server);
 
767
            server = next;
 
768
        }
 
769
        dna_global_servers = NULL;
 
770
    }
 
771
}
 
772
 
 
773
/*
 
774
 * Look through the global config entries, and build a global
 
775
 * shared server config list.
 
776
 */
 
777
static int
 
778
dna_load_shared_servers()
 
779
{
 
780
    struct configEntry *config_entry = NULL;
 
781
    struct dnaServer *server = NULL, *global_servers = NULL;
 
782
    PRCList *server_list = NULL;
 
783
    PRCList *config_list = NULL;
 
784
    int freed_servers = 0;
 
785
    int ret = 0;
 
786
 
 
787
    /* Now build the new list. */
 
788
    dna_write_lock();
 
789
    if (!PR_CLIST_IS_EMPTY(dna_global_config)) {
 
790
        config_list = PR_LIST_HEAD(dna_global_config);
 
791
        while (config_list != dna_global_config) {
 
792
            PRCList *shared_list = NULL;
 
793
            config_entry = (struct configEntry *) config_list;
 
794
 
 
795
            if(dna_get_shared_servers(config_entry,
 
796
                                      &shared_list,
 
797
                                      1 /* get all the servers */))
 
798
            {
 
799
                dna_unlock();
 
800
                return -1;
 
801
            }
 
802
 
 
803
            dna_server_write_lock();
 
804
            if(!freed_servers){
 
805
                dna_delete_global_servers();
 
806
                freed_servers = 1;
 
807
            }
 
808
            if (shared_list) {
 
809
                server_list = PR_LIST_HEAD(shared_list);
 
810
                while (server_list != shared_list) {
 
811
                    server = (struct dnaServer *)server_list;
 
812
                    if(global_servers == NULL){
 
813
                        dna_global_servers = global_servers = server;
 
814
                    } else {
 
815
                        global_servers->next = server;
 
816
                        global_servers = server;
 
817
                    }
 
818
                    server_list = PR_NEXT_LINK(server_list);
 
819
                }
 
820
                slapi_ch_free((void **)&shared_list);
 
821
            }
 
822
            dna_server_unlock();
 
823
 
 
824
            config_list = PR_NEXT_LINK(config_list);
 
825
        }
 
826
    }
 
827
    dna_unlock();
 
828
 
 
829
    return ret;
 
830
}
 
831
 
 
832
/*
656
833
 * config looks like this
657
834
 * - cn=myplugin
658
835
 * --- cn=posix
677
854
                    use_eventq?"using event queue":"");
678
855
 
679
856
    dna_write_lock();
680
 
    dna_delete_config();
 
857
    dna_delete_config(NULL);
681
858
 
682
859
    search_pb = slapi_pblock_new();
683
860
 
1236
1413
}
1237
1414
 
1238
1415
static void
1239
 
dna_delete_config()
 
1416
dna_delete_config(PRCList *list)
1240
1417
{
1241
 
    PRCList *list;
 
1418
    PRCList *list_entry, *delete_list;
1242
1419
 
1243
 
    while (!PR_CLIST_IS_EMPTY(dna_global_config)) {
1244
 
        list = PR_LIST_HEAD(dna_global_config);
1245
 
        dna_delete_configEntry(list);
 
1420
    if(list){
 
1421
        delete_list = list;
 
1422
    } else {
 
1423
        delete_list = dna_global_config;
 
1424
    }
 
1425
    while (!PR_CLIST_IS_EMPTY(delete_list)) {
 
1426
        list_entry = PR_LIST_HEAD(delete_list);
 
1427
        dna_delete_configEntry(list_entry);
1246
1428
    }
1247
1429
 
1248
1430
    return;
1257
1439
        return;
1258
1440
    }
1259
1441
    s = *server;
 
1442
    slapi_sdn_free(&s->sdn);
1260
1443
    slapi_ch_free_string(&s->host);
1261
1444
    slapi_ch_free_string(&s->remote_bind_method);
1262
1445
    slapi_ch_free_string(&s->remote_conn_prot);
1324
1507
 * Event queue callback that we use to do the initial
1325
1508
 * update of the shared config entries shortly after
1326
1509
 * startup.
 
1510
 *
 
1511
 * Since we need to start a backend transaction, a copy/snapshot of the global
 
1512
 * config is used, and then freed.
1327
1513
 */
1328
1514
static void
1329
1515
dna_update_config_event(time_t event_time, void *arg)
1330
1516
{
1331
1517
    Slapi_PBlock *pb = NULL;
1332
1518
    struct configEntry *config_entry = NULL;
1333
 
    PRCList *list = NULL;
 
1519
    PRCList *copy = NULL, *list = NULL;
1334
1520
 
1335
 
    /* Get read lock to prevent config changes */
 
1521
    /* Get the read lock so we can copy the config */
1336
1522
    dna_read_lock();
1337
1523
 
1338
1524
    /* Bail out if the plug-in close function was just called. */
1340
1526
        goto bail;
1341
1527
    }
1342
1528
 
1343
 
    /* Loop through all config entries and update the shared
1344
 
     * config entries. */
 
1529
    /* Loop through all config entries and update the shared config entries. */
1345
1530
    if (!PR_CLIST_IS_EMPTY(dna_global_config)) {
1346
 
        list = PR_LIST_HEAD(dna_global_config);
 
1531
        /*
 
1532
         * We need to use a copy of the config because we can not hold
 
1533
         * the read lock and start a backend transaction.
 
1534
         */
 
1535
        copy = dna_config_copy();
 
1536
        dna_unlock();
1347
1537
 
1348
 
        /* Create the pblock.  We'll reuse this for all
1349
 
         * shared config updates. */
 
1538
        /* Create the pblock.  We'll reuse it for all shared config updates. */
1350
1539
        if ((pb = slapi_pblock_new()) == NULL)
1351
1540
            goto bail;
1352
1541
 
1353
 
        while (list != dna_global_config) {
 
1542
        list = PR_LIST_HEAD(copy);
 
1543
        while (list != copy) {
1354
1544
            config_entry = (struct configEntry *) list;
1355
1545
 
1356
1546
            /* If a shared config dn is set, update the shared config. */
1359
1549
                Slapi_PBlock *dna_pb = NULL;
1360
1550
                Slapi_DN *sdn = slapi_sdn_new_normdn_byref(config_entry->shared_cfg_dn);
1361
1551
                Slapi_Backend *be = slapi_be_select(sdn);
 
1552
 
1362
1553
                slapi_sdn_free(&sdn);
1363
1554
                if (be) {
1364
1555
                    dna_pb = slapi_pblock_new();
1371
1562
                    }
1372
1563
                }
1373
1564
 
1374
 
                slapi_lock_mutex(config_entry->lock);
1375
 
 
1376
1565
                /* First delete the existing shared config entry.  This
1377
1566
                 * will allow the entry to be updated for things like
1378
1567
                 * port number changes, etc. */
1385
1574
                /* Now force the entry to be recreated */
1386
1575
                dna_update_shared_config(config_entry);
1387
1576
 
1388
 
                slapi_unlock_mutex(config_entry->lock);
1389
1577
                if (dna_pb) {
1390
1578
                    if (0 == rc) {
1391
1579
                        slapi_back_transaction_commit(dna_pb);
1397
1585
 
1398
1586
            list = PR_NEXT_LINK(list);
1399
1587
        }
 
1588
        dna_delete_config(copy);
 
1589
        slapi_ch_free((void **)&copy);
 
1590
    } else {
 
1591
        dna_unlock();
1400
1592
    }
1401
1593
 
1402
1594
bail:
1403
 
    dna_unlock();
1404
1595
    slapi_pblock_destroy(pb);
1405
1596
}
1406
1597
 
1445
1636
    } else if (!skip_range_request && config_entry->shared_cfg_base) {
1446
1637
        /* Find out if there are any other servers to request
1447
1638
         * range from. */
1448
 
        dna_get_shared_servers(config_entry, &servers);
 
1639
        dna_get_shared_servers(config_entry, &servers, 0 );
1449
1640
 
1450
1641
        if (servers) {
1451
1642
            /* We have other servers we can try to extend
1535
1726
}
1536
1727
 
1537
1728
static int
1538
 
dna_get_shared_servers(struct configEntry *config_entry, PRCList **servers)
 
1729
dna_get_shared_servers(struct configEntry *config_entry, PRCList **servers, int get_all)
1539
1730
{
1540
1731
    int ret = LDAP_SUCCESS;
1541
1732
    Slapi_PBlock *pb = NULL;
1585
1776
        /* We found some entries.  Go through them and
1586
1777
         * order them based off of remaining values. */
1587
1778
        for (i = 0; entries[i]; i++) {
1588
 
            /* skip our own shared config entry */
1589
 
            if (slapi_sdn_compare(cfg_sdn, slapi_entry_get_sdn(entries[i]))) {
 
1779
            /* skip our own shared config entry, unless we want all the servers */
 
1780
            if (get_all || slapi_sdn_compare(cfg_sdn, slapi_entry_get_sdn(entries[i]))) {
1590
1781
                struct dnaServer *server = NULL;
1591
1782
 
1592
1783
                /* set up the server list entry */
1593
1784
                server = (struct dnaServer *) slapi_ch_calloc(1,
1594
1785
                         sizeof(struct dnaServer));
 
1786
                server->sdn = slapi_sdn_new_dn_byval(slapi_entry_get_ndn(entries[i]));
1595
1787
                server->host = slapi_entry_attr_get_charptr(entries[i],
1596
1788
                                                            DNA_HOSTNAME);
1597
1789
                server->port = slapi_entry_attr_get_uint(entries[i], DNA_PORTNUM);
1660
1852
                } else {
1661
1853
                    /* Find the right slot for this entry. We
1662
1854
                     * want to order the entries based off of
1663
 
                     * the remaining number of values, higest
 
1855
                     * the remaining number of values, highest
1664
1856
                     * to lowest. */
1665
1857
                    struct dnaServer *sitem;
1666
1858
                    PRCList* item = PR_LIST_HEAD(*servers);
1937
2129
    return ret;
1938
2130
}
1939
2131
 
 
2132
static int
 
2133
dna_dn_is_shared_config(Slapi_PBlock *pb, char *dn)
 
2134
{
 
2135
    struct configEntry *config_entry = NULL;
 
2136
    Slapi_Entry *entry = NULL;
 
2137
    Slapi_Attr *attr = NULL;
 
2138
    PRCList *list = NULL;
 
2139
    int ret = 0;
 
2140
 
 
2141
    dna_read_lock();
 
2142
    if (!PR_CLIST_IS_EMPTY(dna_global_config)) {
 
2143
        list = PR_LIST_HEAD(dna_global_config);
 
2144
        while (list != dna_global_config) {
 
2145
            config_entry = (struct configEntry *) list;
 
2146
            if (slapi_dn_issuffix(dn, config_entry->shared_cfg_base)) {
 
2147
                slapi_pblock_get(pb, SLAPI_ENTRY_POST_OP, &entry);
 
2148
                /* If the entry has the dnaHost attribute, it is a shared entry */
 
2149
                if (slapi_entry_attr_find(entry, DNA_HOSTNAME, &attr) == 0) {
 
2150
                    ret = 1;
 
2151
                    break;
 
2152
                }
 
2153
            }
 
2154
            list = PR_NEXT_LINK(list);
 
2155
        }
 
2156
    }
 
2157
    dna_unlock();
 
2158
 
 
2159
    return ret;
 
2160
}
 
2161
 
1940
2162
#define DNA_LDAP_TAG_SK_REVERSE 0x81L
1941
2163
 
1942
2164
static LDAPControl *dna_build_sort_control(const char *attr)
2265
2487
}
2266
2488
 
2267
2489
/*
 
2490
 * Get a value from the global server list.  The dna_server_read_lock()
 
2491
 * should be held prior to calling this function.
 
2492
 */
 
2493
static int
 
2494
dna_get_shared_config_attr_val(struct configEntry *config_entry, char *attr, char *value)
 
2495
{
 
2496
    struct dnaServer *server = NULL;
 
2497
    Slapi_DN *server_sdn = NULL;
 
2498
    int found = 0;
 
2499
 
 
2500
    server_sdn = slapi_sdn_new_dn_byref(config_entry->shared_cfg_dn);
 
2501
    if (dna_global_servers) {
 
2502
        server = dna_global_servers;
 
2503
        while (server) {
 
2504
            if(slapi_sdn_compare(server->sdn, server_sdn) == 0){
 
2505
                if(strcmp(attr, DNA_REMOTE_BIND_METHOD) == 0){
 
2506
                    PR_snprintf(value, DNA_REMOTE_BUFSIZ, "%s", server->remote_bind_method);
 
2507
                    found = 1;
 
2508
                    break;
 
2509
                } else if(strcmp(attr, DNA_REMOTE_CONN_PROT) == 0){
 
2510
                    PR_snprintf(value, DNA_REMOTE_BUFSIZ, "%s", server->remote_conn_prot);
 
2511
                    found = 1;
 
2512
                    break;
 
2513
                }
 
2514
            }
 
2515
            server = server->next;
 
2516
        }
 
2517
    }
 
2518
    slapi_sdn_free(&server_sdn);
 
2519
 
 
2520
    return found;
 
2521
}
 
2522
/*
2268
2523
 * dna_update_shared_config()
2269
2524
 *
2270
2525
 * Updates the shared config entry if one is
2274
2529
 * before calling this function.
2275
2530
 * */
2276
2531
static int
2277
 
dna_update_shared_config(struct configEntry * config_entry)
 
2532
dna_update_shared_config(struct configEntry *config_entry)
2278
2533
{
2279
2534
    int ret = LDAP_SUCCESS;
2280
2535
 
2316
2571
             * already exist, we add it. */
2317
2572
            if (ret == LDAP_NO_SUCH_OBJECT) {
2318
2573
                Slapi_Entry *e = NULL;
2319
 
                Slapi_DN *sdn = 
2320
 
                        slapi_sdn_new_normdn_byref(config_entry->shared_cfg_dn);
 
2574
                Slapi_DN *sdn = slapi_sdn_new_normdn_byref(config_entry->shared_cfg_dn);
 
2575
                char bind_meth[DNA_REMOTE_BUFSIZ];
 
2576
                char conn_prot[DNA_REMOTE_BUFSIZ];
2321
2577
 
2322
2578
                /* Set up the new shared config entry */
2323
2579
                e = slapi_entry_alloc();
2333
2589
                }
2334
2590
                slapi_entry_add_string(e, DNA_REMAINING, remaining_vals);
2335
2591
 
 
2592
                /* Grab the remote server settings */
 
2593
                dna_server_read_lock();
 
2594
                if(dna_get_shared_config_attr_val(config_entry, DNA_REMOTE_BIND_METHOD, bind_meth)) {
 
2595
                    slapi_entry_add_string(e, DNA_REMOTE_BIND_METHOD, bind_meth);
 
2596
                }
 
2597
                if(dna_get_shared_config_attr_val(config_entry, DNA_REMOTE_CONN_PROT, conn_prot)){
 
2598
                    slapi_entry_add_string(e, DNA_REMOTE_CONN_PROT,conn_prot);
 
2599
                }
 
2600
                dna_server_unlock();
 
2601
 
2336
2602
                /* clear pb for re-use */
2337
2603
                slapi_pblock_init(pb);
2338
2604
 
3932
4198
            if (dna_dn_is_config(dn)) {
3933
4199
                dna_load_plugin_config(pb, 0);
3934
4200
            }
 
4201
            if(dna_dn_is_shared_config(pb, dn) == 0){
 
4202
                dna_load_shared_servers();
 
4203
            }
3935
4204
        }
3936
4205
    }
3937
4206