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

« back to all changes in this revision

Viewing changes to tests/scripts/test044-dynlist

  • 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
#! /bin/sh
2
2
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
3
3
##
4
 
## Copyright 1998-2008 The OpenLDAP Foundation.
 
4
## Copyright 1998-2009 The OpenLDAP Foundation.
5
5
## All rights reserved.
6
6
##
7
7
## Redistribution and use in source and binary forms, with or without
254
254
olcDLattrSet: {0}
255
255
-
256
256
add: olcDLattrSet
 
257
olcDLattrSet: groupOfURLs memberURL sn:cn mail
 
258
-
 
259
EOMODS
 
260
 
 
261
echo "==========================================================" >> $LOG1
 
262
 
 
263
echo "Testing attribute mapping"
 
264
 
 
265
echo "Testing list search of all (mapped) attrs..."
 
266
echo "# Testing list search of all (mapped) attrs..." >> $SEARCHOUT
 
267
$LDAPSEARCH -S "" -b "$LISTDN" -h $LOCALHOST -p $PORT1 \
 
268
        '(cn=Dynamic List)' '*' \
 
269
        >> $SEARCHOUT 2>&1
 
270
RC=$?
 
271
if test $RC != 0 ; then
 
272
        echo "ldapsearch failed ($RC)!"
 
273
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
274
        exit $RC
 
275
fi
 
276
 
 
277
echo "Testing list search of a (mapped) listed attr..."
 
278
echo "# Testing list search of a (mapped) listed attr..." >> $SEARCHOUT
 
279
$LDAPSEARCH -S "" -b "$LISTDN" -h $LOCALHOST -p $PORT1 \
 
280
        '(cn=Dynamic List)' sn \
 
281
        >> $SEARCHOUT 2>&1
 
282
RC=$?
 
283
if test $RC != 0 ; then
 
284
        echo "ldapsearch failed ($RC)!"
 
285
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
286
        exit $RC
 
287
fi
 
288
 
 
289
echo "Testing list search of a (n unmapped) listed attr..."
 
290
echo "# Testing list search of a (n unmapped) listed attr..." >> $SEARCHOUT
 
291
$LDAPSEARCH -S "" -b "$LISTDN" -h $LOCALHOST -p $PORT1 \
 
292
        '(cn=Dynamic List)' mail \
 
293
        >> $SEARCHOUT 2>&1
 
294
RC=$?
 
295
if test $RC != 0 ; then
 
296
        echo "ldapsearch failed ($RC)!"
 
297
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
298
        exit $RC
 
299
fi
 
300
 
 
301
echo "Testing list compare (mapped attrs) ..."
 
302
echo "# Testing list compare (mapped attrs) ..." >> $SEARCHOUT
 
303
$LDAPCOMPARE -h $LOCALHOST -p $PORT1 \
 
304
        "cn=Dynamic List,$LISTDN" "sn:Bjorn Jensen" \
 
305
        >> $SEARCHOUT 2>&1
 
306
RC=$?
 
307
case $RC in
 
308
5)
 
309
        echo "ldapcompare returned FALSE ($RC)!"
 
310
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
311
        exit $RC
 
312
        ;;
 
313
6)
 
314
        echo "ldapcompare returned TRUE ($RC)"
 
315
        ;;
 
316
0)
 
317
        echo "ldapcompare returned success ($RC)!"
 
318
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
319
        exit -1
 
320
        ;;
 
321
*)
 
322
        echo "ldapcompare failed ($RC)!"
 
323
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
324
        exit $RC
 
325
        ;;
 
326
esac
 
327
echo "" >> $SEARCHOUT
 
328
 
 
329
echo "Testing list compare (mapped attrs; should return FALSE)..."
 
330
echo "# Testing list compare (mapped attrs; should return FALSE)..." >> $SEARCHOUT
 
331
$LDAPCOMPARE -h $LOCALHOST -p $PORT1 \
 
332
        "cn=Dynamic List,$LISTDN" "sn:FALSE" \
 
333
        >> $SEARCHOUT 2>&1
 
334
RC=$?
 
335
case $RC in
 
336
5)
 
337
        echo "ldapcompare returned FALSE ($RC)"
 
338
        ;;
 
339
6)
 
340
        echo "ldapcompare returned TRUE ($RC)!"
 
341
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
342
        exit $RC
 
343
        ;;
 
344
0)
 
345
        echo "ldapcompare returned success ($RC)!"
 
346
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
347
        exit -1
 
348
        ;;
 
349
*)
 
350
        echo "ldapcompare failed ($RC)!"
 
351
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
352
        exit $RC
 
353
        ;;
 
354
esac
 
355
echo "" >> $SEARCHOUT
 
356
 
 
357
echo "Reconfiguring slapd..."
 
358
$LDAPMODIFY -x -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF > \
 
359
        $TESTOUT 2>&1 << EOMODS
 
360
version: 1
 
361
dn: olcOverlay={0}dynlist,olcDatabase={2}$BACKEND,cn=config
 
362
changetype: modify
 
363
delete: olcDLattrSet
 
364
olcDLattrSet: {0}
 
365
-
 
366
add: olcDLattrSet
257
367
olcDLattrSet: groupOfURLs memberURL member
 
368
-
258
369
EOMODS
259
370
 
260
371
echo "==========================================================" >> $LOG1