~ubuntu-branches/ubuntu/maverick/openldap/maverick-proposed

« back to all changes in this revision

Viewing changes to servers/slapd/overlays/dynlist.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug, Steve Langasek, Mathias Gug
  • Date: 2009-02-18 18:44:00 UTC
  • mfrom: (1.1.2 upstream) (0.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20090218184400-zw4mjse9eywt5566
Tags: 2.4.14-0ubuntu1
[ Steve Langasek ]
* New upstream version
  - Fixes a bug with the pcache overlay not returning cached entries
    (closes: #497697)
  - Update evolution-ntlm patch to apply to current Makefiles.
  - (tentatively) drop gnutls-ciphers, since this bug was reported to be
    fixed upstream in 2.4.8.  The fix applied in 2.4.8 didn't match the
    patch from the bug report, so this should be watched for regressions.
* Build against db4.7 instead of db4.2 at last!  Closes: #421946.
* Build with --disable-ndb, to avoid a misbuild when libmysqlclient is
  installed in the build environment.
* New patch, no-crlcheck-for-gnutls, to fix a build failure when using
  --with-tls=gnutls.

[ Mathias Gug ]
* Merge from debian unstable, remaining changes:
  - debian/apparmor-profile: add AppArmor profile
  - debian/slapd.postinst: Reload AA profile on configuration
  - updated debian/slapd.README.Debian for note on AppArmor
  - debian/control: Recommends apparmor >= 2.1+1075-0ubuntu6
  - debian/control: Conflicts with apparmor-profiles << 2.1+1075-0ubuntu4
    to make sure that if earlier version of apparmour-profiles gets
    installed it won't overwrite our profile.
  - Modify Maintainer value to match the DebianMaintainerField
    speficication.
  - follow ApparmorProfileMigration and force apparmor compalin mode on 
    some upgrades (LP: #203529)
  - debian/slapd.dirs: add etc/apparmor.d/force-complain
  - debian/slapd.preinst: create symlink for force-complain on pre-feisty
    upgrades, upgrades where apparmor-profiles profile is unchanged (ie
    non-enforcing) and upgrades where apparmor profile does not exist.
  - debian/slapd.postrm: remove symlink in force-complain/ on purge
  - debian/patches/fix-ucred-libc due to changes how newer glibc handle
    the ucred struct now.
  - debian/control:
    - Build-depend on libltdl7-dev rather then libltdl3-dev.
  - debian/patches/autogen.sh:
    - Call libtoolize with the --install option to install config.{guess,sub}
      files.
  - Don't use local statement in config script as it fails if /bin/sh
    points to bash (LP: #286063).
  - Disable the testsuite on hppa. Allows building of packages on this
    architecture again, once this package is in the archive.
    LP: #288908.
  - debian/slapd.postinst, debian/slapd.script-common: set correct ownership
    and permissions on /var/lib/ldap, /etc/ldap/slapd.d (group readable) and
    /var/run/slapd (world readable). (LP: #257667).
  - debian/patches/nssov-build, debian/rules: 
    Build and package the nss overlay.
    debian/schema/misc.ldif: add ldif file for the misc schema, which defines
    rfc822MailMember (required by the nss overlay).
  - debian/{control,rules}: enable PIE hardening
  - Use cn=config as the default configuration backend instead of 
    slapd.conf. Migrate slapd.conf  file to /etc/ldap/slapd.d/ on upgrade
    asking the end user to enter a new password to control the access to the
    cn=config tree.
* debian/patches/corrupt-contextCSN: The contextCSN can get corrupted at
  times. (ITS: #5947)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* dynlist.c - dynamic list overlay */
2
 
/* $OpenLDAP: pkg/ldap/servers/slapd/overlays/dynlist.c,v 1.20.2.17 2008/07/10 00:43:03 quanah Exp $ */
 
2
/* $OpenLDAP: pkg/ldap/servers/slapd/overlays/dynlist.c,v 1.20.2.25 2009/01/30 19:10:13 quanah Exp $ */
3
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4
4
 *
5
 
 * Copyright 2003-2008 The OpenLDAP Foundation.
 
5
 * Copyright 2003-2009 The OpenLDAP Foundation.
6
6
 * Portions Copyright 2004-2005 Pierangelo Masarati.
7
7
 * Portions Copyright 2008 Emmanuel Dreyfus.
8
8
 * All rights reserved.
62
62
static AttributeDescription *ad_dgIdentity, *ad_dgAuthz;
63
63
 
64
64
typedef struct dynlist_map_t {
65
 
        AttributeDescription *dlm_member_ad;
66
 
        AttributeDescription *dlm_mapped_ad;
67
 
        struct dynlist_map_t *dlm_next;
 
65
        AttributeDescription    *dlm_member_ad;
 
66
        AttributeDescription    *dlm_mapped_ad;
 
67
        struct dynlist_map_t    *dlm_next;
68
68
} dynlist_map_t;
69
69
 
70
70
typedef struct dynlist_info_t {
71
71
        ObjectClass             *dli_oc;
72
72
        AttributeDescription    *dli_ad;
73
73
        struct dynlist_map_t    *dli_dlm;
 
74
        struct berval           dli_uri;
 
75
        LDAPURLDesc             *dli_lud;
 
76
        struct berval           dli_uri_nbase;
 
77
        Filter                  *dli_uri_filter;
74
78
        struct berval           dli_default_filter;
75
79
        struct dynlist_info_t   *dli_next;
76
80
} dynlist_info_t;
77
81
 
78
82
#define DYNLIST_USAGE \
79
 
        "\"dynlist-attrset <oc> <URL-ad> [[<mapped-ad>:]<member-ad> ...]\": "
 
83
        "\"dynlist-attrset <oc> [uri] <URL-ad> [[<mapped-ad>:]<member-ad> ...]\": "
80
84
 
81
85
static dynlist_info_t *
82
86
dynlist_is_dynlist_next( Operation *op, SlapReply *rs, dynlist_info_t *old_dli )
102
106
        }
103
107
 
104
108
        for ( ; dli; dli = dli->dli_next ) {
 
109
                if ( dli->dli_lud != NULL ) {
 
110
                        /* check base and scope */
 
111
                        if ( !BER_BVISNULL( &dli->dli_uri_nbase ) ) {
 
112
                                int d = rs->sr_entry->e_nname.bv_len - dli->dli_uri_nbase.bv_len;
 
113
 
 
114
                                if ( d < 0 ) {
 
115
                                        continue;
 
116
                                }
 
117
 
 
118
                                if ( !dnIsSuffix( &rs->sr_entry->e_nname, &dli->dli_uri_nbase ) ) {
 
119
                                        continue;
 
120
                                }
 
121
 
 
122
                                switch ( dli->dli_lud->lud_scope ) {
 
123
                                case LDAP_SCOPE_BASE:
 
124
                                        if ( d != 0 ) {
 
125
                                                continue;
 
126
                                        }
 
127
                                        break;
 
128
 
 
129
                                case LDAP_SCOPE_ONELEVEL: {
 
130
                                        struct berval pdn;
 
131
 
 
132
                                        dnParent( &rs->sr_entry->e_nname, &pdn );
 
133
                                        if ( pdn.bv_len != dli->dli_uri_nbase.bv_len ) {
 
134
                                                continue;
 
135
                                        }
 
136
                                        } break;
 
137
 
 
138
                                case LDAP_SCOPE_SUBORDINATE:
 
139
                                        if ( d == 0 ) {
 
140
                                                continue;
 
141
                                        }
 
142
                                        break;
 
143
 
 
144
                                case LDAP_SCOPE_SUBTREE:
 
145
                                case LDAP_SCOPE_DEFAULT:
 
146
                                        break;
 
147
 
 
148
                                default:
 
149
                                        continue;
 
150
                                }
 
151
                        }
 
152
 
 
153
                        /* check filter */
 
154
                        if ( dli->dli_uri_filter && test_filter( op, rs->sr_entry, dli->dli_uri_filter ) != LDAP_COMPARE_TRUE ) {
 
155
                                continue;
 
156
                        }
 
157
                }
 
158
 
105
159
                if ( attr_valfind( a,
106
160
                                SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH |
107
161
                                SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH,
306
360
                        ad = a->a_desc;
307
361
                        for ( dlm = dlc->dlc_dli->dli_dlm; dlm; dlm = dlm->dlm_next ) {
308
362
                                if ( dlm->dlm_member_ad == a->a_desc ) {
309
 
                                        ad = dlm->dlm_mapped_ad;
 
363
                                        if ( dlm->dlm_mapped_ad ) {
 
364
                                                ad = dlm->dlm_mapped_ad;
 
365
                                        }
310
366
                                        break;
311
367
                                }
312
368
                        }
369
425
 
370
426
        /* Don't generate member list if it wasn't requested */
371
427
        for ( dlm = dli->dli_dlm; dlm; dlm = dlm->dlm_next ) {
372
 
                if ( userattrs ||
373
 
                     ad_inlist( dlm->dlm_member_ad, rs->sr_attrs ) ) 
 
428
                AttributeDescription *ad = dlm->dlm_mapped_ad ? dlm->dlm_mapped_ad : dlm->dlm_member_ad;
 
429
                if ( userattrs || ad_inlist( ad, rs->sr_attrs ) ) 
374
430
                        break;
375
431
        }
376
432
        if ( dli->dli_dlm && !dlm )
396
452
                o.o_groups = NULL;
397
453
        }
398
454
 
 
455
        e_flags = rs->sr_flags;
399
456
        if ( !( rs->sr_flags & REP_ENTRY_MODIFIABLE ) ) {
400
457
                e = entry_dup( rs->sr_entry );
 
458
                e_flags |= ( REP_ENTRY_MODIFIABLE | REP_ENTRY_MUSTBEFREED );
401
459
        } else {
402
460
                e = rs->sr_entry;
403
461
        }
404
 
        e_flags = rs->sr_flags | ( REP_ENTRY_MODIFIABLE | REP_ENTRY_MUSTBEFREED );
405
462
 
406
463
        dlc.dlc_e = e;
407
464
        dlc.dlc_dli = dli;
421
478
                int             i, j;
422
479
                struct berval   dn;
423
480
                int             rc;
424
 
                dynlist_map_t   *dlm;
425
481
 
426
482
                BER_BVZERO( &o.o_req_dn );
427
483
                BER_BVZERO( &o.o_req_ndn );
498
554
                                        if ( o.ors_attrs[j].an_desc != NULL &&
499
555
                                                        is_at_operational( o.ors_attrs[j].an_desc->ad_type ) )
500
556
                                        {
501
 
                                                if ( !opattrs && !ad_inlist( o.ors_attrs[j].an_desc, rs->sr_attrs ) )
502
 
                                                {
 
557
                                                if ( !opattrs ) {
503
558
                                                        continue;
504
559
                                                }
505
560
 
 
561
                                                if ( !ad_inlist( o.ors_attrs[j].an_desc, rs->sr_attrs ) ) {
 
562
                                                        /* lookup if mapped -- linear search,
 
563
                                                         * not very efficient unless list
 
564
                                                         * is very short */
 
565
                                                        for ( dlm = dli->dli_dlm; dlm; dlm = dlm->dlm_next ) {
 
566
                                                                if ( dlm->dlm_member_ad == o.ors_attrs[j].an_desc ) {
 
567
                                                                        break;
 
568
                                                                }
 
569
                                                        }
 
570
 
 
571
                                                        if ( dlm == NULL ) {
 
572
                                                                continue;
 
573
                                                        }
 
574
                                                }
 
575
 
506
576
                                        } else {
507
577
                                                if ( !userattrs && 
508
578
                                                                o.ors_attrs[j].an_desc != NULL &&
509
579
                                                                !ad_inlist( o.ors_attrs[j].an_desc, rs->sr_attrs ) )
510
580
                                                {
511
 
                                                        continue;
 
581
                                                        /* lookup if mapped -- linear search,
 
582
                                                         * not very efficient unless list
 
583
                                                         * is very short */
 
584
                                                        for ( dlm = dli->dli_dlm; dlm; dlm = dlm->dlm_next ) {
 
585
                                                                if ( dlm->dlm_member_ad == o.ors_attrs[j].an_desc ) {
 
586
                                                                        break;
 
587
                                                                }
 
588
                                                        }
 
589
 
 
590
                                                        if ( dlm == NULL ) {
 
591
                                                                continue;
 
592
                                                        }
512
593
                                                }
513
594
                                        }
514
595
                                }
553
634
                        slap_op_groups_free( &o );
554
635
                }
555
636
                if ( o.ors_filter ) {
556
 
                        filter_free_x( &o, o.ors_filter );
 
637
                        filter_free_x( &o, o.ors_filter, 1 );
557
638
                }
558
639
                if ( o.ors_attrs && o.ors_attrs != rs->sr_attrs
559
640
                                && o.ors_attrs != slap_anlist_no_attrs )
775
856
 
776
857
                if ( r.sr_flags & REP_ENTRY_MUSTBEFREED ) {
777
858
                        entry_free( r.sr_entry );
 
859
                        r.sr_entry = NULL;
 
860
                        r.sr_flags ^= REP_ENTRY_MUSTBEFREED;
778
861
                }
779
862
        }
780
863
 
851
934
        ptr = lutil_strcopy( ptr, dli->dli_oc->soc_cname.bv_val );
852
935
        ptr = lutil_strcopy( ptr, "))" );
853
936
 
854
 
        assert( dli->dli_default_filter.bv_len == ptr - dli->dli_default_filter.bv_val );
 
937
        assert( ptr == &dli->dli_default_filter.bv_val[dli->dli_default_filter.bv_len] );
855
938
 
856
939
        return 0;
857
940
}
1117
1200
 
1118
1201
/* XXXmanu 255 is the maximum arguments we allow. Can we go beyond? */
1119
1202
static ConfigTable dlcfg[] = {
1120
 
        { "dynlist-attrset", "group-oc> <URL-ad> <member-ad",
1121
 
                3, 255, 0, ARG_MAGIC|DL_ATTRSET, dl_cfgen,
1122
 
                "( OLcfgOvAt:8.1 NAME 'olcDLattrSet' "
 
1203
        { "dynlist-attrset", "group-oc> [uri] <URL-ad> <[mapped:]member-ad> [...]",
 
1204
                3, 0, 0, ARG_MAGIC|DL_ATTRSET, dl_cfgen,
 
1205
                "( OLcfgOvAt:8.1 NAME 'olcDlAttrSet' "
1123
1206
                        "DESC 'Dynamic list: <group objectClass>, <URL attributeDescription>, <member attributeDescription>' "
1124
1207
                        "EQUALITY caseIgnoreMatch "
1125
1208
                        "SYNTAX OMsDirectoryString "
1165
1248
                                assert( dli->dli_oc != NULL );
1166
1249
                                assert( dli->dli_ad != NULL );
1167
1250
 
 
1251
                                /* FIXME: check buffer overflow! */
1168
1252
                                ptr += snprintf( c->cr_msg, sizeof( c->cr_msg ),
1169
 
                                        SLAP_X_ORDERED_FMT "%s %s", i,
1170
 
                                        dli->dli_oc->soc_cname.bv_val,
1171
 
                                        dli->dli_ad->ad_cname.bv_val );
 
1253
                                        SLAP_X_ORDERED_FMT "%s", i,
 
1254
                                        dli->dli_oc->soc_cname.bv_val );
 
1255
 
 
1256
                                if ( !BER_BVISNULL( &dli->dli_uri ) ) {
 
1257
                                        *ptr++ = ' ';
 
1258
                                        *ptr++ = '"';
 
1259
                                        ptr = lutil_strncopy( ptr, dli->dli_uri.bv_val,
 
1260
                                                dli->dli_uri.bv_len );
 
1261
                                        *ptr++ = '"';
 
1262
                                }
 
1263
 
 
1264
                                *ptr++ = ' ';
 
1265
                                ptr = lutil_strncopy( ptr, dli->dli_oc->soc_cname.bv_val,
 
1266
                                        dli->dli_oc->soc_cname.bv_len );
1172
1267
 
1173
1268
                                for ( dlm = dli->dli_dlm; dlm; dlm = dlm->dlm_next ) {
1174
1269
                                        ptr[ 0 ] = ' ';
1212
1307
 
1213
1308
                                        dli_next = dli->dli_next;
1214
1309
 
 
1310
                                        if ( !BER_BVISNULL( &dli->dli_uri ) ) {
 
1311
                                                ch_free( dli->dli_uri.bv_val );
 
1312
                                        }
 
1313
 
 
1314
                                        if ( dli->dli_lud != NULL ) {
 
1315
                                                ldap_free_urldesc( dli->dli_lud );
 
1316
                                        }
 
1317
 
 
1318
                                        if ( !BER_BVISNULL( &dli->dli_uri_nbase ) ) {
 
1319
                                                ber_memfree( dli->dli_uri_nbase.bv_val );
 
1320
                                        }
 
1321
 
 
1322
                                        if ( dli->dli_uri_filter != NULL ) {
 
1323
                                                filter_free( dli->dli_uri_filter );
 
1324
                                        }
 
1325
 
1215
1326
                                        ch_free( dli->dli_default_filter.bv_val );
1216
1327
 
1217
1328
                                        while ( dlm != NULL ) {
1240
1351
 
1241
1352
                                dli = *dlip;
1242
1353
                                *dlip = dli->dli_next;
 
1354
 
 
1355
                                if ( !BER_BVISNULL( &dli->dli_uri ) ) {
 
1356
                                        ch_free( dli->dli_uri.bv_val );
 
1357
                                }
 
1358
 
 
1359
                                if ( dli->dli_lud != NULL ) {
 
1360
                                        ldap_free_urldesc( dli->dli_lud );
 
1361
                                }
 
1362
 
 
1363
                                if ( !BER_BVISNULL( &dli->dli_uri_nbase ) ) {
 
1364
                                        ber_memfree( dli->dli_uri_nbase.bv_val );
 
1365
                                }
 
1366
 
 
1367
                                if ( dli->dli_uri_filter != NULL ) {
 
1368
                                        filter_free( dli->dli_uri_filter );
 
1369
                                }
 
1370
 
1243
1371
                                ch_free( dli->dli_default_filter.bv_val );
1244
1372
 
1245
1373
                                dlm = dli->dli_dlm;
1273
1401
                                        *dli_next = NULL;
1274
1402
                ObjectClass             *oc = NULL;
1275
1403
                AttributeDescription    *ad = NULL;
 
1404
                int                     attridx = 2;
 
1405
                LDAPURLDesc             *lud = NULL;
 
1406
                struct berval           nbase = BER_BVNULL;
 
1407
                Filter                  *filter = NULL;
 
1408
                struct berval           uri = BER_BVNULL;
1276
1409
                dynlist_map_t           *dlm = NULL;
1277
1410
                const char              *text;
1278
1411
 
1286
1419
                        return 1;
1287
1420
                }
1288
1421
 
1289
 
                rc = slap_str2ad( c->argv[ 2 ], &ad, &text );
 
1422
                if ( strncasecmp( c->argv[ attridx ], "ldap://", STRLENOF("ldap://") ) == 0 ) {
 
1423
                        if ( ldap_url_parse( c->argv[ attridx ], &lud ) != LDAP_URL_SUCCESS ) {
 
1424
                                snprintf( c->cr_msg, sizeof( c->cr_msg ), DYNLIST_USAGE
 
1425
                                        "unable to parse URI \"%s\"",
 
1426
                                        c->argv[ attridx ] );
 
1427
                                rc = 1;
 
1428
                                goto done_uri;
 
1429
                        }
 
1430
 
 
1431
                        if ( lud->lud_host != NULL ) {
 
1432
                                if ( lud->lud_host[0] == '\0' ) {
 
1433
                                        ch_free( lud->lud_host );
 
1434
                                        lud->lud_host = NULL;
 
1435
 
 
1436
                                } else {
 
1437
                                        snprintf( c->cr_msg, sizeof( c->cr_msg ), DYNLIST_USAGE
 
1438
                                                "host not allowed in URI \"%s\"",
 
1439
                                                c->argv[ attridx ] );
 
1440
                                        rc = 1;
 
1441
                                        goto done_uri;
 
1442
                                }
 
1443
                        }
 
1444
 
 
1445
                        if ( lud->lud_attrs != NULL ) {
 
1446
                                snprintf( c->cr_msg, sizeof( c->cr_msg ), DYNLIST_USAGE
 
1447
                                        "attrs not allowed in URI \"%s\"",
 
1448
                                        c->argv[ attridx ] );
 
1449
                                rc = 1;
 
1450
                                goto done_uri;
 
1451
                        }
 
1452
 
 
1453
                        if ( lud->lud_exts != NULL ) {
 
1454
                                snprintf( c->cr_msg, sizeof( c->cr_msg ), DYNLIST_USAGE
 
1455
                                        "extensions not allowed in URI \"%s\"",
 
1456
                                        c->argv[ attridx ] );
 
1457
                                rc = 1;
 
1458
                                goto done_uri;
 
1459
                        }
 
1460
 
 
1461
                        if ( lud->lud_dn != NULL && lud->lud_dn[ 0 ] != '\0' ) {
 
1462
                                struct berval dn;
 
1463
                                ber_str2bv( lud->lud_dn, 0, 0, &dn );
 
1464
                                rc = dnNormalize( 0, NULL, NULL, &dn, &nbase, NULL );
 
1465
                                if ( rc != LDAP_SUCCESS ) {
 
1466
                                        snprintf( c->cr_msg, sizeof( c->cr_msg ), DYNLIST_USAGE
 
1467
                                                "DN normalization failed in URI \"%s\"",
 
1468
                                                c->argv[ attridx ] );
 
1469
                                        goto done_uri;
 
1470
                                }
 
1471
                        }
 
1472
 
 
1473
                        if ( lud->lud_filter != NULL && lud->lud_filter[ 0 ] != '\0' ) {
 
1474
                                filter = str2filter( lud->lud_filter );
 
1475
                                if ( filter == NULL ) {
 
1476
                                        snprintf( c->cr_msg, sizeof( c->cr_msg ), DYNLIST_USAGE
 
1477
                                                "filter parsing failed in URI \"%s\"",
 
1478
                                                c->argv[ attridx ] );
 
1479
                                        rc = 1;
 
1480
                                        goto done_uri;
 
1481
                                }
 
1482
                        }
 
1483
 
 
1484
                        ber_str2bv( c->argv[ attridx ], 0, 1, &uri );
 
1485
 
 
1486
done_uri:;
 
1487
                        if ( rc ) {
 
1488
                                if ( lud ) {
 
1489
                                        ldap_free_urldesc( lud );
 
1490
                                }
 
1491
 
 
1492
                                if ( !BER_BVISNULL( &nbase ) ) {
 
1493
                                        ber_memfree( nbase.bv_val );
 
1494
                                }
 
1495
 
 
1496
                                if ( filter != NULL ) {
 
1497
                                        filter_free( filter );
 
1498
                                }
 
1499
 
 
1500
                                Debug( LDAP_DEBUG_ANY, "%s: %s.\n",
 
1501
                                        c->log, c->cr_msg, 0 );
 
1502
 
 
1503
                                return rc;
 
1504
                        }
 
1505
 
 
1506
                        attridx++;
 
1507
                }
 
1508
 
 
1509
                rc = slap_str2ad( c->argv[ attridx ], &ad, &text );
1290
1510
                if ( rc != LDAP_SUCCESS ) {
1291
1511
                        snprintf( c->cr_msg, sizeof( c->cr_msg ), DYNLIST_USAGE
1292
1512
                                "unable to find AttributeDescription \"%s\"",
1293
 
                                c->argv[ 2 ] );
 
1513
                                c->argv[ attridx ] );
1294
1514
                        Debug( LDAP_DEBUG_ANY, "%s: %s.\n",
1295
1515
                                c->log, c->cr_msg, 0 );
1296
1516
                        return 1;
1300
1520
                        snprintf( c->cr_msg, sizeof( c->cr_msg ), DYNLIST_USAGE
1301
1521
                                "AttributeDescription \"%s\" "
1302
1522
                                "must be a subtype of \"labeledURI\"",
1303
 
                                c->argv[ 2 ] );
 
1523
                                c->argv[ attridx ] );
1304
1524
                        Debug( LDAP_DEBUG_ANY, "%s: %s.\n",
1305
1525
                                c->log, c->cr_msg, 0 );
1306
1526
                        return 1;
1307
1527
                }
1308
1528
 
1309
 
                for ( i = 3; i < c->argc; i++ ) {
 
1529
                attridx++;
 
1530
 
 
1531
                for ( i = attridx; i < c->argc; i++ ) {
1310
1532
                        char *arg; 
1311
1533
                        char *cp;
1312
1534
                        AttributeDescription *member_ad = NULL;
1393
1615
                (*dlip)->dli_dlm = dlm;
1394
1616
                (*dlip)->dli_next = dli_next;
1395
1617
 
 
1618
                (*dlip)->dli_lud = lud;
 
1619
                (*dlip)->dli_uri_nbase = nbase;
 
1620
                (*dlip)->dli_uri_filter = filter;
 
1621
                (*dlip)->dli_uri = uri;
 
1622
 
1396
1623
                rc = dynlist_build_def_filter( *dlip );
1397
1624
 
1398
1625
                } break;
1599
1826
 
1600
1827
                        dli_next = dli->dli_next;
1601
1828
 
 
1829
                        if ( !BER_BVISNULL( &dli->dli_uri ) ) {
 
1830
                                ch_free( dli->dli_uri.bv_val );
 
1831
                        }
 
1832
 
 
1833
                        if ( dli->dli_lud != NULL ) {
 
1834
                                ldap_free_urldesc( dli->dli_lud );
 
1835
                        }
 
1836
 
 
1837
                        if ( !BER_BVISNULL( &dli->dli_uri_nbase ) ) {
 
1838
                                ber_memfree( dli->dli_uri_nbase.bv_val );
 
1839
                        }
 
1840
 
 
1841
                        if ( dli->dli_uri_filter != NULL ) {
 
1842
                                filter_free( dli->dli_uri_filter );
 
1843
                        }
 
1844
 
1602
1845
                        ch_free( dli->dli_default_filter.bv_val );
 
1846
 
1603
1847
                        dlm = dli->dli_dlm;
1604
1848
                        while ( dlm != NULL ) {
1605
1849
                                dlm_next = dlm->dlm_next;