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

« back to all changes in this revision

Viewing changes to tests/scripts/test022-ppolicy

  • 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
 
# $OpenLDAP: pkg/ldap/tests/scripts/test022-ppolicy,v 1.17.2.5 2008/02/11 23:26:51 kurt Exp $
 
2
# $OpenLDAP: pkg/ldap/tests/scripts/test022-ppolicy,v 1.17.2.7 2009/01/22 00:01:19 kurt Exp $
3
3
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
4
4
##
5
 
## Copyright 1998-2008 The OpenLDAP Foundation.
 
5
## Copyright 1998-2009 The OpenLDAP Foundation.
6
6
## All rights reserved.
7
7
##
8
8
## Redistribution and use in source and binary forms, with or without
142
142
dn: uid=nd, ou=People, dc=example, dc=com
143
143
changetype: modify
144
144
delete: userpassword
145
 
userpassword: testpassword
 
145
userpassword: $PASS
146
146
-
147
147
replace: userpassword
148
148
userpassword: 20urgle12-1
220
220
dn: uid=nd, ou=People, dc=example, dc=com
221
221
changetype: modify
222
222
replace: userPassword
223
 
userPassword: testpassword
 
223
userPassword: $PASS
224
224
-
225
225
replace: pwdReset
226
226
pwdReset: TRUE
288
288
 
289
289
sleep 2
290
290
 
 
291
OLDPASS=$PASS
 
292
PASS=successexpect
 
293
 
291
294
$LDAPPASSWD -h $LOCALHOST -p $PORT1 \
292
 
        -w $PASS -s failexpect -a $PASS \
 
295
        -w $OLDPASS -s $PASS -a $OLDPASS \
293
296
        -D "$USER" >> $TESTOUT 2>&1
294
297
RC=$?
295
298
if test $RC != 0 ; then
299
302
fi
300
303
 
301
304
echo "Testing length requirement..."
302
 
 
 
305
# check control in response (ITS#5711)
303
306
$LDAPPASSWD -h $LOCALHOST -p $PORT1 \
304
 
        -w failexpect -a failexpect -s spw \
305
 
        -D "$USER" > ${TESTOUT}.2 2>&1
 
307
        -w $PASS -a $PASS -s 2shr \
 
308
        -D "$USER" -e ppolicy > ${TESTOUT}.2 2>&1
306
309
RC=$?
307
310
cat ${TESTOUT}.2 >> $TESTOUT
308
311
if test $RC = 0 ; then
316
319
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
317
320
        exit 1
318
321
fi
 
322
COUNT=`grep "Password is too short for policy" ${TESTOUT}.2 | wc -l`
 
323
if test $COUNT != 1 ; then
 
324
        echo "Control not returned in response"
 
325
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
326
        exit 1
 
327
fi
319
328
 
320
329
echo "Testing hashed length requirement..."
321
330
 
322
 
$LDAPMODIFY -h $LOCALHOST -p $PORT1 -D "$USER" -w failexpect > \
 
331
$LDAPMODIFY -h $LOCALHOST -p $PORT1 -D "$USER" -w $PASS > \
323
332
        ${TESTOUT}.2 2>&1 << EOMODS
324
333
dn: $USER
325
334
changetype: modify
326
335
delete: userPassword
327
 
userPassword: failexpect
 
336
userPassword: $PASS
328
337
-
329
338
add: userPassword
330
339
userPassword: {MD5}xxxxxx