diff -Nru openldap2.3-2.4.7/ANNOUNCEMENT openldap2.3-2.4.9/ANNOUNCEMENT --- openldap2.3-2.4.7/ANNOUNCEMENT 2007-10-31 05:00:29.000000000 -0400 +++ openldap2.3-2.4.9/ANNOUNCEMENT 2008-02-11 18:26:37.000000000 -0500 @@ -106,6 +106,6 @@ --- OpenLDAP is a registered trademark of the OpenLDAP Foundation. -Copyright 1999-2007 The OpenLDAP Foundation, Redwood City, +Copyright 1999-2008 The OpenLDAP Foundation, Redwood City, California, USA. All Rights Reserved. Permission to copy and distribute verbatim copies of this document is granted. diff -Nru openldap2.3-2.4.7/build/config.guess openldap2.3-2.4.9/build/config.guess --- openldap2.3-2.4.7/build/config.guess 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/config.guess 2008-02-11 18:26:37.000000000 -0500 @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-07-02-OpenLDAP' -# $OpenLDAP: pkg/ldap/build/config.guess,v 1.19.2.2 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/build/config.guess,v 1.19.2.3 2008/02/11 23:26:37 kurt Exp $ # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ # configuration script generated by Autoconf, and is distributable # under the same distributions terms as OpenLDAP itself. -## Portions Copyright 1998-2007 The OpenLDAP Foundation. +## Portions Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/config.sub openldap2.3-2.4.9/build/config.sub --- openldap2.3-2.4.7/build/config.sub 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/config.sub 2008-02-11 18:26:37.000000000 -0500 @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-07-04-OpenLDAP' -# $OpenLDAP: pkg/ldap/build/config.sub,v 1.19.2.2 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/build/config.sub,v 1.19.2.3 2008/02/11 23:26:37 kurt Exp $ # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -34,7 +34,7 @@ # configuration script generated by Autoconf, and is distributable # under the same distributions terms as OpenLDAP itself. -## Portions Copyright 1998-2007 The OpenLDAP Foundation. +## Portions Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/crupdate openldap2.3-2.4.9/build/crupdate --- openldap2.3-2.4.7/build/crupdate 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/crupdate 2008-02-11 18:26:37.000000000 -0500 @@ -1,8 +1,8 @@ #! /bin/sh -# $OpenLDAP: pkg/ldap/build/crupdate,v 1.7.2.2 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/build/crupdate,v 1.7.2.3 2008/02/11 23:26:37 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without @@ -18,5 +18,5 @@ set -e # exit immediately if any errors occur -find . -type f -not -name 'LICENSE*' -print -exec perl -pi -e 's/Copyright ([0-9]{4})([,\-][0-9]{2,4})*,? The OpenLDAP Foundation/Copyright $1-2007 The OpenLDAP Foundation/g;' {} \; +find . -type f -not -name 'LICENSE*' -print -exec perl -pi -e 's/Copyright ([0-9]{4})([,\-][0-9]{2,4})*,? The OpenLDAP Foundation/Copyright $1-2008 The OpenLDAP Foundation/g;' {} \; diff -Nru openldap2.3-2.4.7/build/dir.mk openldap2.3-2.4.9/build/dir.mk --- openldap2.3-2.4.7/build/dir.mk 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/dir.mk 2008-02-11 18:26:37.000000000 -0500 @@ -1,7 +1,7 @@ -# $OpenLDAP: pkg/ldap/build/dir.mk,v 1.17.2.2 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/build/dir.mk,v 1.17.2.3 2008/02/11 23:26:37 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/info.mk openldap2.3-2.4.9/build/info.mk --- openldap2.3-2.4.7/build/info.mk 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/info.mk 2008-02-11 18:26:37.000000000 -0500 @@ -1,7 +1,7 @@ -# $OpenLDAP: pkg/ldap/build/info.mk,v 1.12.2.2 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/build/info.mk,v 1.12.2.3 2008/02/11 23:26:37 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/lib.mk openldap2.3-2.4.9/build/lib.mk --- openldap2.3-2.4.7/build/lib.mk 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/lib.mk 2008-02-11 18:26:37.000000000 -0500 @@ -1,7 +1,7 @@ -# $OpenLDAP: pkg/ldap/build/lib.mk,v 1.23.2.2 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/build/lib.mk,v 1.23.2.3 2008/02/11 23:26:37 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/lib-shared.mk openldap2.3-2.4.9/build/lib-shared.mk --- openldap2.3-2.4.7/build/lib-shared.mk 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/lib-shared.mk 2008-02-11 18:26:37.000000000 -0500 @@ -1,7 +1,7 @@ -# $OpenLDAP: pkg/ldap/build/lib-shared.mk,v 1.22.2.2 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/build/lib-shared.mk,v 1.22.2.3 2008/02/11 23:26:37 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/lib-static.mk openldap2.3-2.4.9/build/lib-static.mk --- openldap2.3-2.4.7/build/lib-static.mk 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/lib-static.mk 2008-02-11 18:26:37.000000000 -0500 @@ -1,7 +1,7 @@ -# $OpenLDAP: pkg/ldap/build/lib-static.mk,v 1.13.2.2 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/build/lib-static.mk,v 1.13.2.3 2008/02/11 23:26:37 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/ltmain.sh openldap2.3-2.4.9/build/ltmain.sh --- openldap2.3-2.4.7/build/ltmain.sh 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/ltmain.sh 2008-02-11 18:26:37.000000000 -0500 @@ -28,7 +28,7 @@ # configuration script generated by Autoconf, and is distributable # under the same distributions terms as OpenLDAP itself. -## Portions Copyright 1998-2007 The OpenLDAP Foundation. +## Portions Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/man.mk openldap2.3-2.4.9/build/man.mk --- openldap2.3-2.4.7/build/man.mk 2007-11-08 21:55:50.000000000 -0500 +++ openldap2.3-2.4.9/build/man.mk 2008-02-11 18:26:37.000000000 -0500 @@ -1,7 +1,7 @@ -# $OpenLDAP: pkg/ldap/build/man.mk,v 1.32.2.3 2007/11/09 02:55:50 hyc Exp $ +# $OpenLDAP: pkg/ldap/build/man.mk,v 1.32.2.4 2008/02/11 23:26:37 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/missing openldap2.3-2.4.9/build/missing --- openldap2.3-2.4.7/build/missing 2007-02-13 15:22:01.000000000 -0500 +++ openldap2.3-2.4.9/build/missing 2008-02-11 18:26:37.000000000 -0500 @@ -29,7 +29,7 @@ # configuration script generated by Autoconf, and is distributable # under the same distributions terms as OpenLDAP itself. -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/mkdep openldap2.3-2.4.9/build/mkdep --- openldap2.3-2.4.7/build/mkdep 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/mkdep 2008-02-11 18:26:37.000000000 -0500 @@ -1,8 +1,8 @@ #! /bin/sh - -# $OpenLDAP: pkg/ldap/build/mkdep,v 1.32.2.2 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/build/mkdep,v 1.32.2.3 2008/02/11 23:26:37 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/mkdep.aix openldap2.3-2.4.9/build/mkdep.aix --- openldap2.3-2.4.7/build/mkdep.aix 2007-02-13 15:22:01.000000000 -0500 +++ openldap2.3-2.4.9/build/mkdep.aix 2008-02-11 18:26:37.000000000 -0500 @@ -1,7 +1,7 @@ #! /bin/sh ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/mkrelease openldap2.3-2.4.9/build/mkrelease --- openldap2.3-2.4.7/build/mkrelease 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/mkrelease 2008-02-11 18:26:37.000000000 -0500 @@ -1,8 +1,8 @@ #! /bin/sh -# $OpenLDAP: pkg/ldap/build/mkrelease,v 1.23.2.3 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/build/mkrelease,v 1.23.2.4 2008/02/11 23:26:37 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/mkvers.bat openldap2.3-2.4.9/build/mkvers.bat --- openldap2.3-2.4.7/build/mkvers.bat 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/mkvers.bat 2008-02-11 18:26:37.000000000 -0500 @@ -1,7 +1,7 @@ -:: $OpenLDAP: pkg/ldap/build/mkvers.bat,v 1.7.2.2 2007/08/31 23:13:50 quanah Exp $ +:: $OpenLDAP: pkg/ldap/build/mkvers.bat,v 1.7.2.3 2008/02/11 23:26:37 kurt Exp $ :: This work is part of OpenLDAP Software . :: -:: Copyright 1998-2007 The OpenLDAP Foundation. +:: Copyright 1998-2008 The OpenLDAP Foundation. :: All rights reserved. :: :: Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/mkversion openldap2.3-2.4.9/build/mkversion --- openldap2.3-2.4.7/build/mkversion 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/mkversion 2008-02-11 18:26:37.000000000 -0500 @@ -1,9 +1,9 @@ #! /bin/sh # Create a version.c file -# $OpenLDAP: pkg/ldap/build/mkversion,v 1.14.2.2 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/build/mkversion,v 1.14.2.3 2008/02/11 23:26:37 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without @@ -55,7 +55,7 @@ cat << __EOF__ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -68,7 +68,7 @@ */ static const char copyright[] = -"Copyright 1998-2007 The OpenLDAP Foundation. All rights reserved.\n" +"Copyright 1998-2008 The OpenLDAP Foundation. All rights reserved.\n" "COPYING RESTRICTIONS APPLY\n"; $static $const char $SYMBOL[] = diff -Nru openldap2.3-2.4.7/build/mod.mk openldap2.3-2.4.9/build/mod.mk --- openldap2.3-2.4.7/build/mod.mk 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/mod.mk 2008-02-11 18:26:37.000000000 -0500 @@ -1,7 +1,7 @@ -# $OpenLDAP: pkg/ldap/build/mod.mk,v 1.25.2.2 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/build/mod.mk,v 1.25.2.3 2008/02/11 23:26:37 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/openldap.m4 openldap2.3-2.4.9/build/openldap.m4 --- openldap2.3-2.4.7/build/openldap.m4 2007-08-31 20:38:35.000000000 -0400 +++ openldap2.3-2.4.9/build/openldap.m4 2008-02-11 18:26:37.000000000 -0500 @@ -1,8 +1,8 @@ dnl OpenLDAP Autoconf Macros -dnl $OpenLDAP: pkg/ldap/build/openldap.m4,v 1.157.2.4 2007/09/01 00:38:35 hyc Exp $ +dnl $OpenLDAP: pkg/ldap/build/openldap.m4,v 1.157.2.5 2008/02/11 23:26:37 kurt Exp $ dnl This work is part of OpenLDAP Software . dnl -dnl Copyright 1998-2007 The OpenLDAP Foundation. +dnl Copyright 1998-2008 The OpenLDAP Foundation. dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/rules.mk openldap2.3-2.4.9/build/rules.mk --- openldap2.3-2.4.7/build/rules.mk 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/rules.mk 2008-02-11 18:26:38.000000000 -0500 @@ -1,7 +1,7 @@ -# $OpenLDAP: pkg/ldap/build/rules.mk,v 1.15.2.2 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/build/rules.mk,v 1.15.2.3 2008/02/11 23:26:38 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/srv.mk openldap2.3-2.4.9/build/srv.mk --- openldap2.3-2.4.7/build/srv.mk 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/srv.mk 2008-02-11 18:26:38.000000000 -0500 @@ -1,7 +1,7 @@ -# $OpenLDAP: pkg/ldap/build/srv.mk,v 1.18.2.2 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/build/srv.mk,v 1.18.2.3 2008/02/11 23:26:38 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/top.mk openldap2.3-2.4.9/build/top.mk --- openldap2.3-2.4.7/build/top.mk 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/top.mk 2008-02-11 18:26:38.000000000 -0500 @@ -1,7 +1,7 @@ -# $OpenLDAP: pkg/ldap/build/top.mk,v 1.103.2.4 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/build/top.mk,v 1.103.2.5 2008/02/11 23:26:38 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/version.h openldap2.3-2.4.9/build/version.h --- openldap2.3-2.4.7/build/version.h 2007-02-13 15:22:01.000000000 -0500 +++ openldap2.3-2.4.9/build/version.h 2008-02-11 18:26:38.000000000 -0500 @@ -1,6 +1,6 @@ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -13,6 +13,6 @@ */ static const char copyright[] = -"Copyright 1998-2007 The OpenLDAP Foundation. All rights reserved.\n" +"Copyright 1998-2008 The OpenLDAP Foundation. All rights reserved.\n" "COPYING RESTRICTIONS APPLY.\n"; diff -Nru openldap2.3-2.4.7/build/version.sh openldap2.3-2.4.9/build/version.sh --- openldap2.3-2.4.7/build/version.sh 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/build/version.sh 2008-02-11 18:26:38.000000000 -0500 @@ -1,8 +1,8 @@ #! /bin/sh -# $OpenLDAP: pkg/ldap/build/version.sh,v 1.16.2.2 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/build/version.sh,v 1.16.2.3 2008/02/11 23:26:38 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/build/version.var openldap2.3-2.4.9/build/version.var --- openldap2.3-2.4.7/build/version.var 2007-12-13 15:56:24.000000000 -0500 +++ openldap2.3-2.4.9/build/version.var 2008-05-07 15:26:02.000000000 -0400 @@ -1,8 +1,8 @@ #! /bin/sh -# $OpenLDAP: pkg/ldap/build/version.var,v 1.9.2.19 2007/12/13 20:56:24 kurt Exp $ +# $OpenLDAP: pkg/ldap/build/version.var,v 1.9.2.26 2008/05/07 19:26:02 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without @@ -15,9 +15,9 @@ ol_package=OpenLDAP ol_major=2 ol_minor=4 -ol_patch=7 -ol_api_inc=20407 +ol_patch=9 +ol_api_inc=20409 ol_api_current=2 -ol_api_revision=3 +ol_api_revision=5 ol_api_age=0 -ol_release_date="2007/12/14" +ol_release_date="2008/05/07" diff -Nru openldap2.3-2.4.7/CHANGES openldap2.3-2.4.9/CHANGES --- openldap2.3-2.4.7/CHANGES 2007-12-13 15:56:24.000000000 -0500 +++ openldap2.3-2.4.9/CHANGES 2008-05-07 15:26:01.000000000 -0400 @@ -1,5 +1,127 @@ OpenLDAP 2.4 Change Log +OpenLDAP 2.4.9 Release (2008/05/07) + Fixed libldap to use unsigned port (ITS#5436) + Fixed libldap error message for missing close paren (ITS#5458) + Fixed libldap_r tpool pause checks (ITS#5364, #5407) + Fixed slapcat error checking (ITS#5387) + Fixed slapd abstract objectClass inheritance check (ITS#5474) + Fixed slapd add operations requiring naming attrs (ITS#5412) + Fixed slapd connection handling (ITS#5469) + Fixed slapd delta-syncrepl resync (ITS#5378) + Fixed slapd frontendDB backend selection (ITS#5419) + Fixed slapd pagedresults stale state (ITS#5409) + Fixed slapd pointer dereference (ITS#5388) + Fixed slapd null argument dereference (ITS#5435) + Fixed slapd REP_ENTRY flags (ITS#5340) + Fixed slapd sets attribute description parsing (ITS#5402) + Fixed slapd syncrepl hang on back-config (ITS#5407) + Fixed slapd syncrepl compare_csns crash (ITS#5413) + Fixed slapd syncrepl contextCSN update clash (ITS#5426) + Fixed slapd syncrepl/glue failure (ITS#5430) + Fixed slapd syncrepl crash on empty CSN (ITS#5432) + Fixed slapd syncrepl refreshAndPersist (ITS#5454) + Fixed slapd syncrepl modrdn processing (ITS#5397) + Fixed slapd syncrepl MMR partial refresh (ITS#5470) + Fixed slapd value list termination (ITS#5450) + Fixed slapd/slapo-accesslog rq mutex usage (ITS#5442) + Fixed slapd-bdb ID_NOCACHE handling (ITS#5439) + Fixed slapd-bdb entryinfo state if db_lock fails (ITS#5455) + Fixed slapd-bdb referral rewrite (ITS#5339) + Fixed slapd-config overlay stacking (ITS#5346) + Fixed slapd-config attribute publishing (ITS#5383) + Fixed slapd-ldap connection handler (ITS#5404) + Fixed slapd-ldif file name handling & multi-suffix/dir catch (ITS#5408) + Fixed slapd-meta connections on error (ITS#5440) + Fixed slapd-meta crash on search (ITS#5481) + Fixed slapo-accesslog null callback stack crash (ITS#5490) + Fixed slapo-auditlog unnecessary syscall (ITS#5441) + Added slapo-dynlist mapping to dynamic attrs generation (ITS#5466) + Fixed slapo-refint dnSubtreeMatch (ITS#5427) + Fixed slapo-refint global referential integrity (ITS#5428) + Fixed slapo-syncprov psearch on closed connection (ITS#5401) + Fixed slapo-syncprov psearch task delay (ITS#5405) + Fixed slapo-syncprov psearch filter identity (ITS#5418, #5486) + Fixed slapo-syncprov/glue contextCSN update (ITS#5433) + Fixed slapo-syncprov/glue search ops (ITS#5434) + Fixed slapo-syncprov null cookie (ITS#5437,#5444) + Fixed slapo-syncprov double-free (ITS#5445) + Fixed slapo-syncprov free syncop correctly (ITS#5484) + Fixed slapo-syncprov glue deadlock (ITS#5451) + Build Environment + Fixed leave function naming for OSF1 (ITS#5411) + Documentation + Fixed slapd.access(5) authz-regexp documented behavior (ITS#5400) + Fixed slapd.meta(5) idassert-* documentation (ITS#5406) + admin24 delta-syncrepl documentation (ITS#5476) + admin24 set documentation (ITS#5278,ITS#5279,ITS#5281) + admin24 slapo-ppolicy documentation (ITS#5479) + admin24 syncrepl directives update (ITS#5425) + +OpenLDAP 2.4.8 Release (2008/02/19) + Fixed ldapmodify verbose logging (ITS#5247) + Fixed ldapdelete with sizelimit (ITS#5294) + Fixed ldapdelete with subentries control (ITS#5293) + Fixed ldapsearch exit code init (ITS#5317) + Fixed libldap extended decoding (ITS#5304) + Fixed libldap filter abort (ITS#5300) + Fixed libldap ldap_parse_sasl_bind_result (ITS#5263) + Fixed libldap result codes for open (ITS#5338) + Fixed libldap search timeout crash (ITS#5291) + Fixed libldap paged results crash (ITS#5315) + Fixed libldap cipher suite with GnuTLS (ITS#5341) + Fixed slapd support for 2.1 CSN (ITS#5348) + Fixed slapd include handling (ITS#5276) + Fixed slapd modrdn check for valid new DN (ITS#5344) + Fixed slapd multi-step SASL binds (ITS#5298) + Fixed slapd non-atomic signal variables (ITS#5248) + Fixed slapd overlay ordering when moving to slapd.d (ITS#5284) + Fixed slapd NULL printf (ITS#5264) + Fixed slapd NULL set values (ITS#5286) + Fixed slapd segv with SASL/OTP (ITS#5259) + Fixed slapd timestamp race condition (ITS#5370) + Fixed slapd cn=config crash on delete (ITS#5343) + Fixed slapd cn=config global acls (ITS#5352) + Fixed slapd truncated cookie (ITS#5362) + Fixed slapd sasl with CLEARTEXT (ITS#5368) + Fixed slapd str2entry with no attrs (ITS#5308) + Fixed slapd TLSVerifyClient default (ITS#5360) + Fixed slapd HAVE_TLS dependency (ITS#5379) + Fixed slapd delta-syncrepl refresh mode (ITS#5376) + Fixed slapd ACL sets URI attrs (ITS#5384) + Fixed slapd invalid entryUUID filter (ITS#5386) + Fixed slapd-bdb idlcache on adds (ITS#5086) + Fixed slapd-bdb crash with modrdn (ITS#5358) + Fixed slapd-bdb segv with bdb4.6 (ITS#5322) + Fixed slapd-bdb modrdn to same dn (ITS#5319) + Fixed slapd-bdb MMR (ITS#5332) + Added slapd-bdb/slapd-hdb DB encryption (ITS#5359) + Fixed slapd-ldif delete (ITS#5265) + Fixed slapd-meta link to slapd-ldap (ITS#5355) + Fixed slapd-meta setting of sm_nvalues (ITS#5375) + Fixed slapd-monitor crash (ITS#5311) + Fixed slapd-relay compare (ITS#4937) + Added slapd-sock (ITS#4094) + Fixed slapo-accesslog cleanup on successful response (ITS#5374) + Added slapo-autogroup contrib module (ITS#5145) + Added slapo-constraint cross-attribute constraints (ITS#4987) + Fixed slapo-memberof objectClass inheritance (ITS#5299) + Added slapo-memberof global overlay support (ITS#5301) + Fixed slapo-memberof leak (ITS#5302) + Fixed slapo-ppolicy only password check with policy (ITS#5285) + Fixed slapo-ppolicy del/replace password without new one (ITS#5373) + Fixed slapo-syncprov hang on checkpoint (ITS#5261) + Added slapo-translucent local searching (ITS#5283) + Removed lint + Build Environment + Fixed libldap_r threaded library linking (ITS#4982) + Fixed libldap use of %n (ITS#5324) + Fixed test047 to skip if rwm is not available (ITS#5292) + Documentation + DB_CONFIG.example URL wrong in comments (ITS#5288) + Add cn=config example for auditlog (ITS#5245) + ldapmodify(1) clarification for RFC2849 (ITS#5312) + OpenLDAP 2.4.7 Release (2007/12/14) Added slapd ordered indexing of integer attributes (ITS#5239) Fixed slapd paged results control handling (ITS#5191) diff -Nru openldap2.3-2.4.7/clients/Makefile.in openldap2.3-2.4.9/clients/Makefile.in --- openldap2.3-2.4.7/clients/Makefile.in 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/clients/Makefile.in 2008-02-11 18:26:38.000000000 -0500 @@ -1,8 +1,8 @@ # Clients Makefile.in for OpenLDAP -# $OpenLDAP: pkg/ldap/clients/Makefile.in,v 1.17.2.2 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/clients/Makefile.in,v 1.17.2.3 2008/02/11 23:26:38 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/clients/tools/common.c openldap2.3-2.4.9/clients/tools/common.c --- openldap2.3-2.4.7/clients/tools/common.c 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/clients/tools/common.c 2008-02-11 18:26:38.000000000 -0500 @@ -1,8 +1,8 @@ /* common.c - common routines for the ldap client tools */ -/* $OpenLDAP: pkg/ldap/clients/tools/common.c,v 1.78.2.4 2007/08/31 23:13:50 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/clients/tools/common.c,v 1.78.2.7 2008/02/11 23:26:38 kurt Exp $ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * Portions Copyright 2003 Kurt D. Zeilenga. * Portions Copyright 2003 IBM Corporation. * All rights reserved. @@ -149,8 +149,8 @@ }; /* "features" */ -static int gotintr; -static int abcan; +enum { Intr_None = 0, Intr_Abandon, Intr_Cancel, Intr_Ignore }; +static volatile sig_atomic_t gotintr, abcan; #ifdef LDAP_CONTROL_X_SESSION_TRACKING @@ -223,6 +223,17 @@ #ifdef HAVE_TLS ldap_pvt_tls_destroy(); #endif + + if ( ldapuri != NULL ) { + ber_memfree( ldapuri ); + ldapuri = NULL; + } + + if ( pr_cookie.bv_val != NULL ) { + ber_memfree( pr_cookie.bv_val ); + pr_cookie.bv_val = NULL; + pr_cookie.bv_len = 0; + } } void @@ -558,19 +569,19 @@ /* this shouldn't go here, really; but it's a feature... */ } else if ( strcasecmp( control, "abandon" ) == 0 ) { - abcan = LDAP_REQ_ABANDON; + abcan = Intr_Abandon; if ( crit ) { gotintr = abcan; } } else if ( strcasecmp( control, "cancel" ) == 0 ) { - abcan = LDAP_REQ_EXTENDED; + abcan = Intr_Cancel; if ( crit ) { gotintr = abcan; } } else if ( strcasecmp( control, "ignore" ) == 0 ) { - abcan = -1; + abcan = Intr_Ignore; if ( crit ) { gotintr = abcan; } @@ -746,7 +757,7 @@ case 'P': ival = strtol( optarg, &next, 10 ); if ( next == NULL || next[0] != '\0' ) { - fprintf( stderr, "%s: unabel to parse protocol version \"%s\"\n", prog, optarg ); + fprintf( stderr, "%s: unable to parse protocol version \"%s\"\n", prog, optarg ); exit( EXIT_FAILURE ); } switch( ival ) { @@ -1720,19 +1731,19 @@ int rc; switch ( gotintr ) { - case LDAP_REQ_EXTENDED: + case Intr_Cancel: rc = ldap_cancel_s( ld, msgid, NULL, NULL ); fprintf( stderr, "got interrupt, cancel got %d: %s\n", rc, ldap_err2string( rc ) ); return -1; - case LDAP_REQ_ABANDON: + case Intr_Abandon: rc = ldap_abandon_ext( ld, msgid, NULL, NULL ); fprintf( stderr, "got interrupt, abandon got %d: %s\n", rc, ldap_err2string( rc ) ); return -1; - case -1: + case Intr_Ignore: /* just unbind, ignoring the request */ return -1; } diff -Nru openldap2.3-2.4.7/clients/tools/common.h openldap2.3-2.4.9/clients/tools/common.h --- openldap2.3-2.4.7/clients/tools/common.h 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/clients/tools/common.h 2008-02-11 18:26:38.000000000 -0500 @@ -1,8 +1,8 @@ /* common.h - common definitions for the ldap client tools */ -/* $OpenLDAP: pkg/ldap/clients/tools/common.h,v 1.24.2.2 2007/08/31 23:13:50 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/clients/tools/common.h,v 1.24.2.3 2008/02/11 23:26:38 kurt Exp $ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/clients/tools/ldapcompare.c openldap2.3-2.4.9/clients/tools/ldapcompare.c --- openldap2.3-2.4.7/clients/tools/ldapcompare.c 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/clients/tools/ldapcompare.c 2008-02-11 18:26:38.000000000 -0500 @@ -1,8 +1,8 @@ /* ldapcompare.c -- LDAP compare tool */ -/* $OpenLDAP: pkg/ldap/clients/tools/ldapcompare.c,v 1.43.2.3 2007/08/31 23:13:50 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/clients/tools/ldapcompare.c,v 1.43.2.4 2008/02/11 23:26:38 kurt Exp $ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * Portions Copyright 1998-2003 Kurt D. Zeilenga. * Portions Copyright 1998-2001 Net Boolean Incorporated. * All rights reserved. diff -Nru openldap2.3-2.4.7/clients/tools/ldapdelete.c openldap2.3-2.4.9/clients/tools/ldapdelete.c --- openldap2.3-2.4.7/clients/tools/ldapdelete.c 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/clients/tools/ldapdelete.c 2008-02-11 19:32:01.000000000 -0500 @@ -1,8 +1,8 @@ /* ldapdelete.c - simple program to delete an entry using LDAP */ -/* $OpenLDAP: pkg/ldap/clients/tools/ldapdelete.c,v 1.118.2.4 2007/08/31 23:13:50 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/clients/tools/ldapdelete.c,v 1.118.2.7 2008/02/12 00:32:01 quanah Exp $ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * Portions Copyright 1998-2003 Kurt D. Zeilenga. * All rights reserved. * @@ -51,6 +51,7 @@ static int prune = 0; +static int sizelimit = -1; static int dodelete LDAP_P(( @@ -59,7 +60,8 @@ static int deletechildren LDAP_P(( LDAP *ld, - const char *dn )); + const char *dn, + int subentries )); void usage( void ) @@ -76,11 +78,13 @@ const char options[] = "r" - "cd:D:e:f:h:H:IMnO:o:p:P:QR:U:vVw:WxX:y:Y:Z"; + "cd:D:e:f:h:H:IMnO:o:p:P:QR:U:vVw:WxX:y:Y:z:Z"; int handle_private_option( int i ) { + int ival; + char *next; switch ( i ) { #if 0 int crit; @@ -115,6 +119,29 @@ prune = 1; break; + case 'z': /* size limit */ + if ( strcasecmp( optarg, "none" ) == 0 ) { + sizelimit = 0; + + } else if ( strcasecmp( optarg, "max" ) == 0 ) { + sizelimit = LDAP_MAXINT; + + } else { + ival = strtol( optarg, &next, 10 ); + if ( next == NULL || next[0] != '\0' ) { + fprintf( stderr, + _("Unable to parse size limit \"%s\"\n"), optarg ); + exit( EXIT_FAILURE ); + } + sizelimit = ival; + } + if( sizelimit < 0 || sizelimit > LDAP_MAXINT ) { + fprintf( stderr, _("%s: invalid sizelimit (%d) specified\n"), + prog, sizelimit ); + exit( EXIT_FAILURE ); + } + break; + default: return 0; } @@ -212,6 +239,7 @@ char *matcheddn = NULL, *text = NULL, **refs = NULL; LDAPControl **ctrls = NULL; LDAPMessage *res; + int subentries = 0; if ( verbose ) { printf( _("%sdeleting entry \"%s\"\n"), @@ -225,7 +253,10 @@ /* If prune is on, remove a whole subtree. Delete the children of the * DN recursively, then the DN requested. */ - if ( prune ) deletechildren( ld, dn ); + if ( prune ) { +retry:; + deletechildren( ld, dn, subentries ); + } rc = ldap_delete_ext( ld, dn, NULL, NULL, &id ); if ( rc != LDAP_SUCCESS ) { @@ -257,7 +288,18 @@ rc = ldap_parse_result( ld, res, &code, &matcheddn, &text, &refs, &ctrls, 1 ); - if( rc != LDAP_SUCCESS ) { + switch ( rc ) { + case LDAP_SUCCESS: + break; + + case LDAP_NOT_ALLOWED_ON_NONLEAF: + if ( prune && !subentries ) { + subentries = 1; + goto retry; + } + /* fallthru */ + + default: fprintf( stderr, "%s: ldap_parse_result: %s (%d)\n", prog, ldap_err2string( rc ), rc ); return rc; @@ -290,7 +332,7 @@ if (ctrls) { tool_print_ctrls( ld, ctrls ); ldap_controls_free( ctrls ); - } + } ber_memfree( text ); ber_memfree( matcheddn ); @@ -304,27 +346,55 @@ */ static int deletechildren( LDAP *ld, - const char *dn ) + const char *base, + int subentries ) { LDAPMessage *res, *e; int entries; - int rc; + int rc = LDAP_SUCCESS, srch_rc; static char *attrs[] = { LDAP_NO_ATTRS, NULL }; - LDAPControl c, *ctrls[2]; + LDAPControl c, *ctrls[2], **ctrlsp = NULL; BerElement *ber = NULL; - LDAPMessage *res_se; - if ( verbose ) printf ( _("deleting children of: %s\n"), dn ); + if ( verbose ) printf ( _("deleting children of: %s\n"), base ); + + if ( subentries ) { + /* + * Do a one level search at base for subentry children. + */ + + if ((ber = ber_alloc_t(LBER_USE_DER)) == NULL) { + return EXIT_FAILURE; + } + rc = ber_printf( ber, "b", 1 ); + if ( rc == -1 ) { + ber_free( ber, 1 ); + fprintf( stderr, _("Subentries control encoding error!\n")); + return EXIT_FAILURE; + } + if ( ber_flatten2( ber, &c.ldctl_value, 0 ) == -1 ) { + return EXIT_FAILURE; + } + c.ldctl_oid = LDAP_CONTROL_SUBENTRIES; + c.ldctl_iscritical = 1; + ctrls[0] = &c; + ctrls[1] = NULL; + ctrlsp = ctrls; + } /* - * Do a one level search at dn for children. For each, delete its children. + * Do a one level search at base for children. For each, delete its children. */ - - rc = ldap_search_ext_s( ld, dn, LDAP_SCOPE_ONELEVEL, NULL, attrs, 1, - NULL, NULL, NULL, -1, &res ); - if ( rc != LDAP_SUCCESS ) { - tool_perror( "ldap_search", rc, NULL, NULL, NULL, NULL ); - return( rc ); +more:; + srch_rc = ldap_search_ext_s( ld, base, LDAP_SCOPE_ONELEVEL, NULL, attrs, 1, + ctrlsp, NULL, NULL, sizelimit, &res ); + switch ( srch_rc ) { + case LDAP_SUCCESS: + case LDAP_SIZELIMIT_EXCEEDED: + break; + default: + tool_perror( "ldap_search", srch_rc, NULL, NULL, NULL, NULL ); + return( srch_rc ); } entries = ldap_count_entries( ld, res ); @@ -344,8 +414,8 @@ return rc; } - rc = deletechildren( ld, dn ); - if ( rc == -1 ) { + rc = deletechildren( ld, dn, 0 ); + if ( rc != LDAP_SUCCESS ) { tool_perror( "ldap_prune", rc, NULL, NULL, NULL, NULL ); ber_memfree( dn ); return rc; @@ -356,7 +426,7 @@ } rc = ldap_delete_ext_s( ld, dn, NULL, NULL ); - if ( rc == -1 ) { + if ( rc != LDAP_SUCCESS ) { tool_perror( "ldap_delete", rc, NULL, NULL, NULL, NULL ); ber_memfree( dn ); return rc; @@ -373,72 +443,9 @@ ldap_msgfree( res ); - /* - * Do a one level search at dn for subentry children. - */ - - if ((ber = ber_alloc_t(LBER_USE_DER)) == NULL) { - return EXIT_FAILURE; - } - rc = ber_printf( ber, "b", 1 ); - if ( rc == -1 ) { - ber_free( ber, 1 ); - fprintf( stderr, _("Subentries control encoding error!\n")); - return EXIT_FAILURE; - } - if ( ber_flatten2( ber, &c.ldctl_value, 0 ) == -1 ) { - return EXIT_FAILURE; - } - c.ldctl_oid = LDAP_CONTROL_SUBENTRIES; - c.ldctl_iscritical = 1; - ctrls[0] = &c; - ctrls[1] = NULL; - - rc = ldap_search_ext_s( ld, dn, LDAP_SCOPE_ONELEVEL, NULL, attrs, 1, - ctrls, NULL, NULL, -1, &res_se ); - if ( rc != LDAP_SUCCESS ) { - tool_perror( "ldap_search", rc, NULL, NULL, NULL, NULL ); - return( rc ); - } - ber_free( ber, 1 ); - - entries = ldap_count_entries( ld, res_se ); - - if ( entries > 0 ) { - int i; - - for (e = ldap_first_entry( ld, res_se ), i = 0; e != NULL; - e = ldap_next_entry( ld, e ), i++ ) - { - char *dn = ldap_get_dn( ld, e ); - - if( dn == NULL ) { - ldap_get_option( ld, LDAP_OPT_RESULT_CODE, &rc ); - tool_perror( "ldap_prune", rc, NULL, NULL, NULL, NULL ); - ber_memfree( dn ); - return rc; - } - - if ( verbose ) { - printf( _("\tremoving %s\n"), dn ); - } - - rc = ldap_delete_ext_s( ld, dn, NULL, NULL ); - if ( rc == -1 ) { - tool_perror( "ldap_delete", rc, NULL, NULL, NULL, NULL ); - ber_memfree( dn ); - return rc; - - } - - if ( verbose ) { - printf( _("\t%s removed\n"), dn ); - } - - ber_memfree( dn ); - } + if ( srch_rc == LDAP_SIZELIMIT_EXCEEDED ) { + goto more; } - ldap_msgfree( res_se ); return rc; } diff -Nru openldap2.3-2.4.7/clients/tools/ldapexop.c openldap2.3-2.4.9/clients/tools/ldapexop.c --- openldap2.3-2.4.7/clients/tools/ldapexop.c 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/clients/tools/ldapexop.c 2008-02-11 18:26:38.000000000 -0500 @@ -1,8 +1,8 @@ /* ldapexop.c -- a tool for performing well-known extended operations */ -/* $OpenLDAP: pkg/ldap/clients/tools/ldapexop.c,v 1.9.2.2 2007/08/31 23:13:50 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/clients/tools/ldapexop.c,v 1.9.2.3 2008/02/11 23:26:38 kurt Exp $ */ /* This work is part of OpenLDAP Software . * - * Copyright 2005-2007 The OpenLDAP Foundation. + * Copyright 2005-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/clients/tools/ldapmodify.c openldap2.3-2.4.9/clients/tools/ldapmodify.c --- openldap2.3-2.4.7/clients/tools/ldapmodify.c 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/clients/tools/ldapmodify.c 2008-02-11 18:26:38.000000000 -0500 @@ -1,8 +1,8 @@ /* ldapmodify.c - generic program to modify or add entries using LDAP */ -/* $OpenLDAP: pkg/ldap/clients/tools/ldapmodify.c,v 1.186.2.3 2007/08/31 23:13:50 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/clients/tools/ldapmodify.c,v 1.186.2.7 2008/02/11 23:26:38 kurt Exp $ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * Portions Copyright 2006 Howard Chu. * Portions Copyright 1998-2003 Kurt D. Zeilenga. * Portions Copyright 1998-2001 Net Boolean Incorporated. @@ -70,15 +70,14 @@ #include "common.h" -static int ldapadd, force = 0; +static int ldapadd; static char *rejfile = NULL; static LDAP *ld = NULL; #define M_SEP 0x7f -/* strings found in replog/LDIF entries (mostly lifted from slurpd/slurp.h) */ +/* strings found in LDIF entries */ static struct berval BV_VERSION = BER_BVC("version"); -static struct berval BV_REPLICA = BER_BVC("replica"); static struct berval BV_DN = BER_BVC("dn"); static struct berval BV_CONTROL = BER_BVC("control"); static struct berval BV_CHANGETYPE = BER_BVC("changetype"); @@ -144,7 +143,6 @@ fprintf( stderr, _(" [!]txn= (transaction)\n")); #endif - fprintf( stderr, _(" -F force all changes records to be used\n")); fprintf( stderr, _(" -S file write skipped modifications to `file'\n")); tool_common_usage(); @@ -152,7 +150,7 @@ } -const char options[] = "aE:FrS:" +const char options[] = "aE:rS:" "cd:D:e:f:h:H:IMnO:o:p:P:QR:U:vVw:WxX:y:Y:Z"; int @@ -217,10 +215,6 @@ ldapadd = 1; break; - case 'F': /* force all changes records to be used */ - force = 1; - break; - case 'r': /* replace (obsolete) */ break; @@ -408,10 +402,10 @@ process_ldif_rec( char *rbuf, int linenum ) { char *line, *dn, *newrdn, *newsup; - int rc, modop, replicaport; + int rc, modop; int expect_modop, expect_sep; int deleteoldrdn; - int saw_replica, use_record, new_entry, delete_entry, got_all; + int new_entry, delete_entry, got_all; LDAPMod **pmods, *lm = NULL; int version; LDAPControl **pctrls; @@ -422,11 +416,10 @@ new_entry = ldapadd; - rc = got_all = saw_replica = delete_entry = modop = expect_modop = 0; + rc = got_all = delete_entry = modop = expect_modop = 0; expect_sep = 0; version = 0; deleteoldrdn = 1; - use_record = force; pmods = NULL; pctrls = NULL; dn = newrdn = newsup = NULL; @@ -464,27 +457,7 @@ freeval[i] = freev; if ( dn == NULL ) { - if ( !use_record && !BVICMP( btype+i, &BV_REPLICA )) { - char *p; - ++saw_replica; - if (( p = strchr( vals[i].bv_val, ':' )) == NULL ) { - replicaport = 0; - } else { - *p++ = '\0'; - if ( lutil_atoi( &replicaport, p ) != 0 ) { - fprintf( stderr, _("%s: unable to parse replica port \"%s\" (line %d) entry: \"%s\"\n"), - prog, p, linenum+i, dn == NULL ? "" : dn ); - rc = LDAP_PARAM_ERROR; - break; - } - } - if ( ldaphost != NULL && - strcasecmp( vals[i].bv_val, ldaphost ) == 0 && - replicaport == ldapport ) - { - use_record = 1; - } - } else if ( linenum+i == 1 && !BVICMP( btype+i, &BV_VERSION )) { + if ( linenum+i == 1 && !BVICMP( btype+i, &BV_VERSION )) { int v; if( vals[i].bv_len == 0 || lutil_atoi( &v, vals[i].bv_val) != 0 || v != 1 ) { fprintf( stderr, @@ -496,13 +469,6 @@ } else if ( !BVICMP( btype+i, &BV_DN )) { dn = vals[i].bv_val; idn = i; - if ( !use_record && saw_replica ) { - printf(_("%s: skipping change record for entry: %s at line %d\n"), - prog, dn, linenum+i); - printf(_("\t(LDAP host/port does not match replica: lines)\n")); - rc = 0; - goto leave; - } } /* skip all lines until we see "dn:" */ } @@ -1136,13 +1102,14 @@ tool_perror( newentry ? "ldap_add" : "ldap_modify", rc, NULL, NULL, NULL, NULL ); goto done; - } else if ( verbose ) { - printf( _("modify complete\n") ); } - rc = process_response( ld, msgid, newentry ? LDAP_RES_ADD : LDAP_RES_MODIFY, dn ); + if ( verbose && rc == LDAP_SUCCESS ) { + printf( _("modify complete\n") ); + } + } else { rc = LDAP_SUCCESS; } @@ -1168,12 +1135,12 @@ fprintf( stderr, _("%s: delete failed: %s\n"), prog, dn ); tool_perror( "ldap_delete", rc, NULL, NULL, NULL, NULL ); goto done; - } else if ( verbose ) { - printf( _("delete complete") ); } - rc = process_response( ld, msgid, LDAP_RES_DELETE, dn ); + if ( verbose && rc == LDAP_SUCCESS ) { + printf( _("delete complete\n") ); + } } else { rc = LDAP_SUCCESS; } @@ -1207,12 +1174,12 @@ fprintf( stderr, _("%s: rename failed: %s\n"), prog, dn ); tool_perror( "ldap_rename", rc, NULL, NULL, NULL, NULL ); goto done; - } else { - printf( _("rename completed\n") ); } - rc = process_response( ld, msgid, LDAP_RES_RENAME, dn ); + if ( verbose && rc == LDAP_SUCCESS ) { + printf( _("rename complete\n") ); + } } else { rc = LDAP_SUCCESS; } diff -Nru openldap2.3-2.4.7/clients/tools/ldapmodrdn.c openldap2.3-2.4.9/clients/tools/ldapmodrdn.c --- openldap2.3-2.4.7/clients/tools/ldapmodrdn.c 2007-08-31 19:13:51.000000000 -0400 +++ openldap2.3-2.4.9/clients/tools/ldapmodrdn.c 2008-02-11 18:26:38.000000000 -0500 @@ -1,8 +1,8 @@ /* ldapmodrdn.c - generic program to modify an entry's RDN using LDAP */ -/* $OpenLDAP: pkg/ldap/clients/tools/ldapmodrdn.c,v 1.116.2.3 2007/08/31 23:13:51 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/clients/tools/ldapmodrdn.c,v 1.116.2.4 2008/02/11 23:26:38 kurt Exp $ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * Portions Copyright 1998-2003 Kurt D. Zeilenga. * Portions Copyright 1998-2001 Net Boolean Incorporated. * Portions Copyright 2001-2003 IBM Corporation. diff -Nru openldap2.3-2.4.7/clients/tools/ldappasswd.c openldap2.3-2.4.9/clients/tools/ldappasswd.c --- openldap2.3-2.4.7/clients/tools/ldappasswd.c 2007-08-31 19:13:51.000000000 -0400 +++ openldap2.3-2.4.9/clients/tools/ldappasswd.c 2008-02-11 18:26:38.000000000 -0500 @@ -1,8 +1,8 @@ /* ldappasswd -- a tool for change LDAP passwords */ -/* $OpenLDAP: pkg/ldap/clients/tools/ldappasswd.c,v 1.136.2.3 2007/08/31 23:13:51 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/clients/tools/ldappasswd.c,v 1.136.2.4 2008/02/11 23:26:38 kurt Exp $ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * Portions Copyright 1998-2003 Kurt D. Zeilenga. * Portions Copyright 1998-2001 Net Boolean Incorporated. * Portions Copyright 2001-2003 IBM Corporation. diff -Nru openldap2.3-2.4.7/clients/tools/ldapsearch.c openldap2.3-2.4.9/clients/tools/ldapsearch.c --- openldap2.3-2.4.7/clients/tools/ldapsearch.c 2007-08-31 19:13:51.000000000 -0400 +++ openldap2.3-2.4.9/clients/tools/ldapsearch.c 2008-02-12 14:59:52.000000000 -0500 @@ -1,8 +1,8 @@ /* ldapsearch -- a tool for searching LDAP directories */ -/* $OpenLDAP: pkg/ldap/clients/tools/ldapsearch.c,v 1.234.2.5 2007/08/31 23:13:51 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/clients/tools/ldapsearch.c,v 1.234.2.9 2008/02/12 19:59:52 quanah Exp $ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * Portions Copyright 1998-2003 Kurt D. Zeilenga. * Portions Copyright 1998-2001 Net Boolean Incorporated. * Portions Copyright 2001-2003 IBM Corporation. @@ -95,6 +95,8 @@ static int timelimit = -1; static int sizelimit = -1; +static char *control; + static char *def_tmpdir; static char *def_urlpre; @@ -255,7 +257,7 @@ handle_private_option( int i ) { int crit, ival; - char *control, *cvalue, *next; + char *cvalue, *next; switch ( i ) { case 'a': /* set alias deref option */ if ( strcasecmp( optarg, "never" ) == 0 ) { @@ -623,7 +625,7 @@ { char *filtpattern, **attrs = NULL, line[BUFSIZ]; FILE *fp = NULL; - int rc, i, first; + int rc, rc1, i, first; LDAP *ld = NULL; BerElement *seber = NULL, *vrber = NULL; @@ -979,6 +981,7 @@ attrs, attrsonly, NULL, NULL, NULL, -1 ); } else { + rc = 0; first = 1; while ( fgets( line, sizeof( line ), fp ) != NULL ) { line[ strlen( line ) - 1 ] = '\0'; @@ -987,11 +990,13 @@ } else { first = 0; } - rc = dosearch( ld, base, scope, filtpattern, line, + rc1 = dosearch( ld, base, scope, filtpattern, line, attrs, attrsonly, NULL, NULL, NULL, -1 ); - if ( rc != 0 && !contoper ) { - break; + if ( rc1 != 0 ) { + rc = rc1; + if ( !contoper ) + break; } } if ( fp != stdin ) { @@ -1040,6 +1045,12 @@ tool_unbind( ld ); tool_destroy(); + if ( base != NULL ) { + ber_memfree( base ); + } + if ( control != NULL ) { + ber_memfree( control ); + } if ( c ) { for ( ; save_nctrls-- > 0; ) { diff -Nru openldap2.3-2.4.7/clients/tools/ldapwhoami.c openldap2.3-2.4.9/clients/tools/ldapwhoami.c --- openldap2.3-2.4.7/clients/tools/ldapwhoami.c 2007-08-31 19:13:51.000000000 -0400 +++ openldap2.3-2.4.9/clients/tools/ldapwhoami.c 2008-02-11 18:26:38.000000000 -0500 @@ -1,8 +1,8 @@ /* ldapwhoami.c -- a tool for asking the directory "Who Am I?" */ -/* $OpenLDAP: pkg/ldap/clients/tools/ldapwhoami.c,v 1.42.2.2 2007/08/31 23:13:51 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/clients/tools/ldapwhoami.c,v 1.42.2.3 2008/02/11 23:26:38 kurt Exp $ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * Portions Copyright 1998-2003 Kurt D. Zeilenga. * Portions Copyright 1998-2001 Net Boolean Incorporated. * Portions Copyright 2001-2003 IBM Corporation. diff -Nru openldap2.3-2.4.7/clients/tools/Makefile.in openldap2.3-2.4.9/clients/tools/Makefile.in --- openldap2.3-2.4.7/clients/tools/Makefile.in 2007-08-31 19:13:50.000000000 -0400 +++ openldap2.3-2.4.9/clients/tools/Makefile.in 2008-02-11 18:26:38.000000000 -0500 @@ -1,8 +1,8 @@ # Makefile for LDAP tools -# $OpenLDAP: pkg/ldap/clients/tools/Makefile.in,v 1.45.2.2 2007/08/31 23:13:50 quanah Exp $ +# $OpenLDAP: pkg/ldap/clients/tools/Makefile.in,v 1.45.2.3 2008/02/11 23:26:38 kurt Exp $ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/configure openldap2.3-2.4.9/configure --- openldap2.3-2.4.7/configure 2007-10-16 19:58:19.000000000 -0400 +++ openldap2.3-2.4.9/configure 2008-02-11 18:36:45.000000000 -0500 @@ -1,9 +1,9 @@ #! /bin/sh -# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.631.2.7 2007/10/16 23:43:09 quanah Exp . +# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.631.2.9 2008/02/11 23:26:37 kurt Exp . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59. # -# Copyright 1998-2007 The OpenLDAP Foundation. All rights reserved. +# Copyright 1998-2008 The OpenLDAP Foundation. All rights reserved. # Restrictions apply, see COPYRIGHT and LICENSE files. # # Copyright (C) 2003 Free Software Foundation, Inc. @@ -465,7 +465,7 @@ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar OPENLDAP_LIBRELEASE OPENLDAP_LIBVERSION OPENLDAP_RELEASE_DATE top_builddir ldap_subdir CC AR CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CPP LIBTOOL PERLBIN OL_MKDEP OL_MKDEP_FLAGS LTSTATIC LIBOBJS LIBSRCS PLAT WITH_SASL WITH_TLS WITH_MODULES_ENABLED WITH_ACI_ENABLED BUILD_THREAD BUILD_LIBS_DYNAMIC BUILD_SLAPD BUILD_SLAPI SLAPD_SLAPI_DEPEND BUILD_BDB BUILD_DNSSRV BUILD_HDB BUILD_LDAP BUILD_META BUILD_MONITOR BUILD_NULL BUILD_PASSWD BUILD_RELAY BUILD_PERL BUILD_SHELL BUILD_SQL BUILD_ACCESSLOG BUILD_AUDITLOG BUILD_CONSTRAINT BUILD_DDS BUILD_DENYOP BUILD_DYNGROUP BUILD_DYNLIST BUILD_LASTMOD BUILD_MEMBEROF BUILD_PPOLICY BUILD_PROXYCACHE BUILD_REFINT BUILD_RETCODE BUILD_RWM BUILD_SEQMOD BUILD_SYNCPROV BUILD_TRANSLUCENT BUILD_UNIQUE BUILD_VALSORT LDAP_LIBS SLAPD_LIBS BDB_LIBS LTHREAD_LIBS LUTIL_LIBS WRAP_LIBS SLAPD_MODULES_CPPFLAGS SLAPD_MODULES_LDFLAGS SLAPD_NO_STATIC SLAPD_STATIC_BACKENDS SLAPD_DYNAMIC_BACKENDS SLAPD_STATIC_OVERLAYS SLAPD_DYNAMIC_OVERLAYS PERL_CPPFLAGS SLAPD_PERL_LDFLAGS MOD_PERL_LDFLAGS KRB4_LIBS KRB5_LIBS SASL_LIBS TLS_LIBS MODULES_LIBS SLAPI_LIBS LIBSLAPI LIBSLAPITOOLS AUTH_LIBS ICU_LIBS SLAPD_SLP_LIBS SLAPD_GMP_LIBS SLAPD_SQL_LDFLAGS SLAPD_SQL_LIBS SLAPD_SQL_INCLUDES LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar OPENLDAP_LIBRELEASE OPENLDAP_LIBVERSION OPENLDAP_RELEASE_DATE top_builddir ldap_subdir CC AR CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CPP LIBTOOL PERLBIN OL_MKDEP OL_MKDEP_FLAGS LTSTATIC LIBOBJS LIBSRCS PLAT WITH_SASL WITH_TLS WITH_MODULES_ENABLED WITH_ACI_ENABLED BUILD_THREAD BUILD_LIBS_DYNAMIC BUILD_SLAPD BUILD_SLAPI SLAPD_SLAPI_DEPEND BUILD_BDB BUILD_DNSSRV BUILD_HDB BUILD_LDAP BUILD_META BUILD_MONITOR BUILD_NULL BUILD_PASSWD BUILD_RELAY BUILD_PERL BUILD_SHELL BUILD_SOCK BUILD_SQL BUILD_ACCESSLOG BUILD_AUDITLOG BUILD_CONSTRAINT BUILD_DDS BUILD_DENYOP BUILD_DYNGROUP BUILD_DYNLIST BUILD_LASTMOD BUILD_MEMBEROF BUILD_PPOLICY BUILD_PROXYCACHE BUILD_REFINT BUILD_RETCODE BUILD_RWM BUILD_SEQMOD BUILD_SYNCPROV BUILD_TRANSLUCENT BUILD_UNIQUE BUILD_VALSORT LDAP_LIBS SLAPD_LIBS BDB_LIBS LTHREAD_LIBS LUTIL_LIBS WRAP_LIBS SLAPD_MODULES_CPPFLAGS SLAPD_MODULES_LDFLAGS SLAPD_NO_STATIC SLAPD_STATIC_BACKENDS SLAPD_DYNAMIC_BACKENDS SLAPD_STATIC_OVERLAYS SLAPD_DYNAMIC_OVERLAYS PERL_CPPFLAGS SLAPD_PERL_LDFLAGS MOD_PERL_LDFLAGS KRB4_LIBS KRB5_LIBS SASL_LIBS TLS_LIBS MODULES_LIBS SLAPI_LIBS LIBSLAPI LIBSLAPITOOLS AUTH_LIBS ICU_LIBS SLAPD_SLP_LIBS SLAPD_GMP_LIBS SLAPD_SQL_LDFLAGS SLAPD_SQL_LIBS SLAPD_SQL_INCLUDES LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1041,6 +1041,7 @@ --enable-perl enable perl backend no|yes|mod [no] --enable-relay enable relay backend no|yes|mod [yes] --enable-shell enable shell backend no|yes|mod [no] + --enable-sock enable sock backend no|yes|mod [no] --enable-sql enable sql backend no|yes|mod [no] SLAPD Overlay Options: @@ -1205,7 +1206,7 @@ This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -Copyright 1998-2007 The OpenLDAP Foundation. All rights reserved. +Copyright 1998-2008 The OpenLDAP Foundation. All rights reserved. Restrictions apply, see COPYRIGHT and LICENSE files. _ACEOF exit 0 @@ -2788,6 +2789,7 @@ perl \ relay \ shell \ + sock \ sql" # Check whether --enable-xxslapbackends or --disable-xxslapbackends was given. @@ -3070,6 +3072,29 @@ ol_enable_shell=${ol_enable_backends:-no} fi; # end --enable-shell +# OpenLDAP --enable-sock + + # Check whether --enable-sock or --disable-sock was given. +if test "${enable_sock+set}" = set; then + enableval="$enable_sock" + + ol_arg=invalid + for ol_val in no yes mod ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sock" >&5 +echo "$as_me: error: bad value $enableval for --enable-sock" >&2;} + { (exit 1); exit 1; }; } + fi + ol_enable_sock="$ol_arg" + +else + ol_enable_sock=${ol_enable_backends:-no} +fi; +# end --enable-sock # OpenLDAP --enable-sql # Check whether --enable-sql or --disable-sql was given. @@ -3683,6 +3708,7 @@ test $ol_enable_perl = no && test $ol_enable_relay = no && test $ol_enable_shell = no && + test $ol_enable_sock = no && test $ol_enable_sql = no ; then if test $ol_enable_slapd = yes ; then @@ -3747,6 +3773,7 @@ BUILD_PERL=no BUILD_RELAY=no BUILD_SHELL=no +BUILD_SOCK=no BUILD_SQL=no BUILD_ACCESSLOG=no @@ -5594,7 +5621,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5597 "configure"' > conftest.$ac_ext + echo '#line 5624 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7574,11 +7601,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7577: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7604: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7581: \$? = $ac_status" >&5 + echo "$as_me:7608: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7836,11 +7863,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7839: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7866: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7843: \$? = $ac_status" >&5 + echo "$as_me:7870: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7898,11 +7925,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7901: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7928: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7905: \$? = $ac_status" >&5 + echo "$as_me:7932: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10146,7 +10173,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <>confdefs.h <<_ACEOF +#define SLAPD_SOCK $MFLAG +_ACEOF + +fi + if test "$ol_link_sql" != no ; then BUILD_SLAPD=yes BUILD_SQL=$ol_enable_sql @@ -40875,6 +40919,7 @@ + # Check whether --with-xxinstall or --without-xxinstall was given. if test "${with_xxinstall+set}" = set; then withval="$with_xxinstall" @@ -40882,7 +40927,7 @@ fi; - ac_config_files="$ac_config_files Makefile:build/top.mk:Makefile.in:build/dir.mk doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk include/Makefile:build/top.mk:include/Makefile.in libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk tests/run tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" + ac_config_files="$ac_config_files Makefile:build/top.mk:Makefile.in:build/dir.mk doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk include/Makefile:build/top.mk:include/Makefile.in libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk servers/slapd/back-sock/Makefile:build/top.mk:servers/slapd/back-sock/Makefile.in:build/mod.mk servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk tests/run tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ac_config_commands="$ac_config_commands default" @@ -41425,6 +41470,7 @@ "servers/slapd/back-perl/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk" ;; "servers/slapd/back-relay/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk" ;; "servers/slapd/back-shell/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk" ;; + "servers/slapd/back-sock/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-sock/Makefile:build/top.mk:servers/slapd/back-sock/Makefile.in:build/mod.mk" ;; "servers/slapd/back-sql/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk" ;; "servers/slapd/shell-backends/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk" ;; "servers/slapd/slapi/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk" ;; @@ -41619,6 +41665,7 @@ s,@BUILD_RELAY@,$BUILD_RELAY,;t t s,@BUILD_PERL@,$BUILD_PERL,;t t s,@BUILD_SHELL@,$BUILD_SHELL,;t t +s,@BUILD_SOCK@,$BUILD_SOCK,;t t s,@BUILD_SQL@,$BUILD_SQL,;t t s,@BUILD_ACCESSLOG@,$BUILD_ACCESSLOG,;t t s,@BUILD_AUDITLOG@,$BUILD_AUDITLOG,;t t @@ -42362,7 +42409,7 @@ cat > $BACKENDSC << ENDX /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42413,7 +42460,7 @@ cat > $OVERLAYSC << ENDX /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/configure.in openldap2.3-2.4.9/configure.in --- openldap2.3-2.4.7/configure.in 2007-10-16 19:43:09.000000000 -0400 +++ openldap2.3-2.4.9/configure.in 2008-02-11 18:26:37.000000000 -0500 @@ -1,7 +1,7 @@ -dnl $OpenLDAP: pkg/ldap/configure.in,v 1.631.2.7 2007/10/16 23:43:09 quanah Exp $ +dnl $OpenLDAP: pkg/ldap/configure.in,v 1.631.2.9 2008/02/11 23:26:37 kurt Exp $ dnl This work is part of OpenLDAP Software . dnl -dnl Copyright 1998-2007 The OpenLDAP Foundation. +dnl Copyright 1998-2008 The OpenLDAP Foundation. dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -23,9 +23,9 @@ define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])dnl dnl ================================================================ dnl Configure.in for OpenLDAP -AC_COPYRIGHT([[Copyright 1998-2007 The OpenLDAP Foundation. All rights reserved. +AC_COPYRIGHT([[Copyright 1998-2008 The OpenLDAP Foundation. All rights reserved. Restrictions apply, see COPYRIGHT and LICENSE files.]]) -AC_REVISION([$OpenLDAP: pkg/ldap/configure.in,v 1.631.2.7 2007/10/16 23:43:09 quanah Exp $]) +AC_REVISION([$OpenLDAP: pkg/ldap/configure.in,v 1.631.2.9 2008/02/11 23:26:37 kurt Exp $]) AC_INIT([OpenLDAP],,[http://www.openldap.org/its/]) m4_define([AC_PACKAGE_BUGREPORT],[]) AC_CONFIG_SRCDIR(build/version.sh)dnl @@ -96,7 +96,7 @@ /* begin of portable.h.pre */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation + * Copyright 1998-2008 The OpenLDAP Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -291,6 +291,7 @@ perl \ relay \ shell \ + sock \ sql" AC_ARG_ENABLE(xxslapbackends,[ @@ -320,6 +321,8 @@ yes, [no yes mod], ol_enable_backends)dnl OL_ARG_ENABLE(shell,[ --enable-shell enable shell backend], no, [no yes mod], ol_enable_backends)dnl +OL_ARG_ENABLE(sock,[ --enable-sock enable sock backend], + no, [no yes mod], ol_enable_backends)dnl OL_ARG_ENABLE(sql,[ --enable-sql enable sql backend], no, [no yes mod], ol_enable_backends)dnl @@ -462,6 +465,7 @@ test $ol_enable_perl = no && test $ol_enable_relay = no && test $ol_enable_shell = no && + test $ol_enable_sock = no && test $ol_enable_sql = no ; then dnl no slapd backend @@ -519,6 +523,7 @@ BUILD_PERL=no BUILD_RELAY=no BUILD_SHELL=no +BUILD_SOCK=no BUILD_SQL=no BUILD_ACCESSLOG=no @@ -2635,6 +2640,19 @@ AC_DEFINE_UNQUOTED(SLAPD_SHELL,$MFLAG,[define to support SHELL backend]) fi +if test "$ol_enable_sock" != no ; then + BUILD_SLAPD=yes + BUILD_SOCK=$ol_enable_sock + if test "$ol_enable_sock" = mod ; then + SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sock" + MFLAG=SLAPD_MOD_DYNAMIC + else + SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sock" + MFLAG=SLAPD_MOD_STATIC + fi + AC_DEFINE_UNQUOTED(SLAPD_SOCK,$MFLAG,[define to support SOCK backend]) +fi + if test "$ol_link_sql" != no ; then BUILD_SLAPD=yes BUILD_SQL=$ol_enable_sql @@ -2903,6 +2921,7 @@ AC_SUBST(BUILD_RELAY) AC_SUBST(BUILD_PERL) AC_SUBST(BUILD_SHELL) + AC_SUBST(BUILD_SOCK) AC_SUBST(BUILD_SQL) dnl overlays AC_SUBST(BUILD_ACCESSLOG) @@ -3003,6 +3022,7 @@ [servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk] [servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk] [servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk] +[servers/slapd/back-sock/Makefile:build/top.mk:servers/slapd/back-sock/Makefile.in:build/mod.mk] [servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk] [servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk] [servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk] @@ -3020,7 +3040,7 @@ cat > $BACKENDSC << ENDX /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -3071,7 +3091,7 @@ cat > $OVERLAYSC << ENDX /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/contrib/ConfigOIDs openldap2.3-2.4.9/contrib/ConfigOIDs --- openldap2.3-2.4.7/contrib/ConfigOIDs 2007-09-29 04:38:12.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ConfigOIDs 2008-02-08 20:03:59.000000000 -0500 @@ -1,3 +1,4 @@ List of OpenLDAP Configuration OIDs allocated to contrib modules OLcfgCt{Oc|At}:1 smbk5pwd +OLcfgCt{Oc|At}:2 autogroup diff -Nru openldap2.3-2.4.7/contrib/ldapc++/configure openldap2.3-2.4.9/contrib/ldapc++/configure --- openldap2.3-2.4.7/contrib/ldapc++/configure 2007-11-20 13:08:42.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/configure 2008-02-11 14:38:09.000000000 -0500 @@ -19719,18 +19719,24 @@ fi -if test "${ac_cv_header_ldap_h+set}" = set; then - { echo "$as_me:$LINENO: checking for ldap.h" >&5 -echo $ECHO_N "checking for ldap.h... $ECHO_C" >&6; } -if test "${ac_cv_header_ldap_h+set}" = set; then + + +for ac_header in termios.h ldap.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_ldap_h" >&5 -echo "${ECHO_T}$ac_cv_header_ldap_h" >&6; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking ldap.h usability" >&5 -echo $ECHO_N "checking ldap.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19738,7 +19744,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -19770,15 +19776,15 @@ echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking ldap.h presence" >&5 -echo $ECHO_N "checking ldap.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -19811,40 +19817,48 @@ # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: ldap.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ldap.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ldap.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ldap.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ldap.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ldap.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ldap.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ldap.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ldap.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ldap.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ldap.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ldap.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ldap.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ldap.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ldap.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ldap.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for ldap.h" >&5 -echo $ECHO_N "checking for ldap.h... $ECHO_C" >&6; } -if test "${ac_cv_header_ldap_h+set}" = set; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_ldap_h=$ac_header_preproc + eval "$as_ac_Header=\$ac_header_preproc" fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_ldap_h" >&5 -echo "${ECHO_T}$ac_cv_header_ldap_h" >&6; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi +done cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ diff -Nru openldap2.3-2.4.7/contrib/ldapc++/configure.in openldap2.3-2.4.9/contrib/ldapc++/configure.in --- openldap2.3-2.4.7/contrib/ldapc++/configure.in 2007-11-20 13:08:43.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/configure.in 2008-04-14 19:20:12.000000000 -0400 @@ -1,7 +1,8 @@ +dnl $OpenLDAP: pkg/ldap/contrib/ldapc++/configure.in,v 1.8.2.5 2008/04/14 23:20:12 quanah Exp $ + dnl Copyright 2000-2003, OpenLDAP Foundation, All Rights Reserved. dnl COPYING RESTRICTIONS APPLY, see COPYRIGHT file - - + dnl Process this file with autoconf to produce a configure script. dnl disable config.cache @@ -67,7 +68,7 @@ ]) dnl Checks for header files. AC_HEADER_TIME -AC_CHECK_HEADER(ldap.h) +AC_CHECK_HEADERS(termios.h ldap.h) AC_EGREP_HEADER(ldap_add_ext,ldap.h,[ dnl NOOP : diff -Nru openldap2.3-2.4.7/contrib/ldapc++/COPYRIGHT openldap2.3-2.4.9/contrib/ldapc++/COPYRIGHT --- openldap2.3-2.4.7/contrib/ldapc++/COPYRIGHT 2007-02-13 15:22:02.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/COPYRIGHT 2008-02-11 18:26:38.000000000 -0500 @@ -1,4 +1,4 @@ -Copyright 1998-2007 The OpenLDAP Foundation +Copyright 1998-2008 The OpenLDAP Foundation All rights reserved. Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/contrib/ldapc++/doxygen.rc openldap2.3-2.4.9/contrib/ldapc++/doxygen.rc --- openldap2.3-2.4.7/contrib/ldapc++/doxygen.rc 2000-10-03 12:25:34.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/doxygen.rc 2008-04-14 19:20:12.000000000 -0400 @@ -1,171 +1,490 @@ -# Doxyfile 1.0.0 +# $OpenLDAP: pkg/ldap/contrib/ldapc++/doxygen.rc,v 1.2.10.2 2008/04/14 23:20:12 quanah Exp $ -# This file describes the settings to be used by doxygen for a project +# Doxyfile 1.5.4 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- -# General configuration options +# Project related configuration options #--------------------------------------------------------------------------- -# The PROJECT_NAME tag is a single word (or a sequence of word surrounded -# by quotes) that should identify the project. +# This tag specifies the encoding used for all characters in the config file that +# follow. The default is UTF-8 which is also the encoding used for all text before +# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into +# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of +# possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. -PROJECT_NAME = ldapsdk +PROJECT_NAME = ldapsdk -# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 0.0.1 +PROJECT_NUMBER = 0.0.1 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = srcdoc +OUTPUT_DIRECTORY = srcdoc -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. # The default language is English, other supported languages are: -# Dutch, French, Italian, Czech, Swedish, German and Japanese +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, +# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, +# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, +# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. -OUTPUT_LANGUAGE = English +OUTPUT_LANGUAGE = English -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. -QUIET = NO +BRIEF_MEMBER_DESC = YES -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. -WARNINGS = YES +REPEAT_BRIEF = yes -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = yes + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. -DISABLE_INDEX = NO +INHERIT_DOCS = YES -# If the EXTRACT_ALL tag is set to YES all classes and functions will be -# included in the documentation, even if no documentation was available. +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. -EXTRACT_ALL = YES +SEPARATE_MEMBER_PAGES = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct (or union) is +# documented as struct with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code where the coding convention is that all structs are +# typedef'ed and only the typedef is referenced never the struct's name. + +TYPEDEF_HIDES_STRUCT = NO + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. -EXTRACT_PRIVATE = YES +EXTRACT_PRIVATE = YES -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members inside documented classes or files. +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. -HIDE_UNDOC_MEMBERS = NO +EXTRACT_STATIC = NO -# If the HIDE_UNDOC_CLASSESS tag is set to YES, Doxygen will hide all -# undocumented classes. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. -HIDE_UNDOC_CLASSES = NO +EXTRACT_LOCAL_CLASSES = YES -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. -BRIEF_MEMBER_DESC = YES +EXTRACT_LOCAL_METHODS = NO -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. +# If this flag is set to YES, the members of anonymous namespaces will be extracted +# and appear in the documentation as a namespace called 'anonymous_namespace{file}', +# where file will be replaced with the base name of the file that contains the anonymous +# namespace. By default anonymous namespace are hidden. -REPEAT_BRIEF = yes +EXTRACT_ANON_NSPACES = NO -# If the ALWAYS_DETAILS_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. -ALWAYS_DETAILED_SEC = yes +HIDE_UNDOC_MEMBERS = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. -FULL_PATH_NAMES = NO +HIDE_UNDOC_CLASSES = NO -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. -STRIP_FROM_PATH = +HIDE_FRIEND_COMPOUNDS = NO -# The INTERNAL_DOCS tag determines if documentation +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. +# to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. -INTERNAL_DOCS = NO +INTERNAL_DOCS = NO -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a class diagram (in Html and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. -CLASS_DIAGRAMS = YES +CASE_SENSE_NAMES = NO -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. -SOURCE_BROWSER = no +HIDE_SCOPE_NAMES = NO -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. -INLINE_SOURCES = NO +SHOW_INCLUDE_FILES = YES -# If the CASE_SENSE_NAMES tag is set to NO (the default) then Doxygen -# will only generate file names in lower case letters. If set to -# YES upper case letters are also allowed. This is useful if you have -# classes or files whose names only differ in case and if your file system -# supports case sensitive file names. +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. -CASE_SENSE_NAMES = NO +INLINE_INFO = YES -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. -VERBATIM_HEADERS = YES +SORT_MEMBER_DOCS = YES -# If the JAVADOC_AUTOBRIEF tag is set to YES (the default) then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the Javadoc-style will -# behave just like the Qt-style comments. +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. -JAVADOC_AUTOBRIEF = YES +SORT_BRIEF_DOCS = NO -# if the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# reimplements. +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. -INHERIT_DOCS = YES +SORT_BY_SCOPE_NAME = NO -# if the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. -INLINE_INFO = YES +GENERATE_TODOLIST = YES -# the TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. -TAB_SIZE = 4 +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text " + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files @@ -176,291 +495,819 @@ # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = ./src +INPUT = ./src + +# This tag can be used to specify the character encoding of the source files that +# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default +# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. +# See http://www.gnu.org/software/libiconv for the list of possible encodings. + +INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left -# blank all files are included. +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 -FILE_PATTERNS = *.cpp *.h +FILE_PATTERNS = *.cpp \ + *.h -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. -RECURSIVE = yes +RECURSIVE = yes -# The EXCLUDE tag can be used to specify files and/or directories that should +# The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = +EXCLUDE = -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. -EXCLUDE_PATTERNS = +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the output. +# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, +# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = +EXAMPLE_PATH = -# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). -IMAGE_PATH = +IMAGE_PATH = -# The INPUT_FILTER tag can be used to specify a program that doxygen should +# The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH +# then you must also enable this option. If you don't then doxygen will produce +# a warning and turn it on anyway + +SOURCE_BROWSER = no + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentstion. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO -INPUT_FILTER = +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. -GENERATE_HTML = YES +GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. -HTML_OUTPUT = +HTML_OUTPUT = + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = +HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = +HTML_FOOTER = -# The HTML_STYLESHEET tag can be used to specify a user defined cascading +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! -HTML_STYLESHEET = +HTML_STYLESHEET = -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. -HTML_ALIGN_MEMBERS = YES +HTML_ALIGN_MEMBERS = YES -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. -GENERATE_HTMLHELP = NO +GENERATE_HTMLHELP = NO -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). -ALPHABETICAL_INDEX = NO +HTML_DYNAMIC_SECTIONS = NO -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. -COLS_IN_ALPHA_INDEX = 5 +TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. -GENERATE_LATEX = no +GENERATE_LATEX = no -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. -LATEX_OUTPUT = +LATEX_OUTPUT = -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general. -COMPACT_LATEX = NO +COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used +# The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. -PAPER_TYPE = a4wide +PAPER_TYPE = a4wide -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until +# the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. -PDF_HYPERLINKS = NO +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages -GENERATE_MAN = no +GENERATE_MAN = no -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. -MAN_OUTPUT = +MAN_OUTPUT = -# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) -MAN_EXTENSION = .3 +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files. -ENABLE_PREPROCESSING = YES +ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional -# compilation will be performed. +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. -MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. -SEARCH_INCLUDES = YES +SEARCH_INCLUDES = YES -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. - -PREDEFINED = - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED tag. +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. -EXPAND_ONLY_PREDEF = NO +SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration options related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- -# The TAGFILES tag can be used to specify one or more tagfiles. +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = -# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = +GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes # will be listed. -ALLEXTERNALS = NO +ALLEXTERNALS = NO -# The PERL_PATH should be the absolute path and name of the perl script +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). -PERL_PATH = /usr/bin/perl +PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the search engine +# Configuration options related to the dot tool #--------------------------------------------------------------------------- -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to +# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to +# specify the directory where the mscgen tool resides. If left empty the tool is assumed to +# be found in the default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. -SEARCHENGINE = NO +CLASS_GRAPH = YES -# The CGI_NAME tag should be the name of the CGI script that -# starts the search engine (doxysearch) with the correct parameters. -# A script with this name will be generated by doxygen. +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. -CGI_NAME = search.cgi +COLLABORATION_GRAPH = YES -# The CGI_URL tag should be the absolute URL to the directory where the -# cgi binaries are located. See the documentation of your http daemon for -# details. +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies -CGI_URL = +GROUP_GRAPHS = YES -# The DOC_URL tag should be the absolute URL to the directory where the -# documentation is located. If left blank the absolute path to the -# documentation, with file:// prepended to it, will be used. +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. -DOC_URL = +UML_LOOK = NO -# The DOC_ABSPATH tag should be the absolute path to the directory where the -# documentation is located. If left blank the directory on the local machine -# will be used. +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. -DOC_ABSPATH = +TEMPLATE_RELATIONS = NO -# The BIN_ABSPATH tag must point to the directory where the doxysearch binary -# is installed. +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. -BIN_ABSPATH = /usr/local/bin/ +INCLUDE_GRAPH = YES -# The EXT_DOC_PATHS tag can be used to specify one or more paths to -# documentation generated for other projects. This allows doxysearch to search -# the documentation for these projects as well. +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will +# generate a caller dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected +# functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the number +# of direct children of the root node in a graph is already larger than +# MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). + +DOT_TRANSPARENT = YES + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. -EXT_DOC_PATHS = +SEARCHENGINE = NO diff -Nru openldap2.3-2.4.7/contrib/ldapc++/examples/main.cpp openldap2.3-2.4.9/contrib/ldapc++/examples/main.cpp --- openldap2.3-2.4.7/contrib/ldapc++/examples/main.cpp 2007-10-01 22:24:57.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/examples/main.cpp 2008-04-14 19:18:59.000000000 -0400 @@ -1,10 +1,11 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/examples/main.cpp,v 1.1.8.3 2008/04/14 23:18:59 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ -#include -#include +#include +#include #include "LDAPConnection.h" #include "LDAPConstraints.h" #include "LDAPSearchReference.h" @@ -14,9 +15,8 @@ #include "LDAPEntry.h" #include "LDAPException.h" #include "LDAPModification.h" -#include "LDAPReferralException.h" -#include"debug.h" +#include "debug.h" int main(){ LDAPConstraints* cons=new LDAPConstraints; @@ -69,7 +69,7 @@ lc->unbind(); delete lc; - }catch (LDAPException e){ + }catch (LDAPException &e){ std::cout << "-------------- caught Exception ---------"<< std::endl; std::cout << e << std::endl; } diff -Nru openldap2.3-2.4.7/contrib/ldapc++/examples/Makefile.am openldap2.3-2.4.9/contrib/ldapc++/examples/Makefile.am --- openldap2.3-2.4.7/contrib/ldapc++/examples/Makefile.am 2007-10-01 22:24:57.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/examples/Makefile.am 2008-04-14 19:18:59.000000000 -0400 @@ -1,3 +1,5 @@ +# $OpenLDAP: pkg/ldap/contrib/ldapc++/examples/Makefile.am,v 1.2.4.3 2008/04/14 23:18:59 quanah Exp $ + ## # Copyright 2003, OpenLDAP Foundation, All Rights Reserved. # COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/examples/Makefile.in openldap2.3-2.4.9/contrib/ldapc++/examples/Makefile.in --- openldap2.3-2.4.7/contrib/ldapc++/examples/Makefile.in 2007-10-01 22:24:57.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/examples/Makefile.in 2008-04-14 19:18:59.000000000 -0400 @@ -14,6 +14,8 @@ @SET_MAKE@ +# $OpenLDAP: pkg/ldap/contrib/ldapc++/examples/Makefile.in,v 1.3.2.3 2008/04/14 23:18:59 quanah Exp $ + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ diff -Nru openldap2.3-2.4.7/contrib/ldapc++/examples/readSchema.cpp openldap2.3-2.4.9/contrib/ldapc++/examples/readSchema.cpp --- openldap2.3-2.4.7/contrib/ldapc++/examples/readSchema.cpp 2007-10-01 22:24:57.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/examples/readSchema.cpp 2008-04-14 19:18:59.000000000 -0400 @@ -1,5 +1,11 @@ -#include -#include +// $OpenLDAP: pkg/ldap/contrib/ldapc++/examples/readSchema.cpp,v 1.1.6.3 2008/04/14 23:18:59 quanah Exp $ +/* + * Copyright 2008, OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + +#include +#include #include "LDAPConnection.h" #include "LDAPConstraints.h" #include "LDAPSearchReference.h" @@ -9,10 +15,9 @@ #include "LDAPEntry.h" #include "LDAPException.h" #include "LDAPModification.h" -#include "LDAPReferralException.h" #include "LDAPSchema.h" -#include"debug.h" +#include "debug.h" int main(){ LDAPConnection *lc=new LDAPConnection("192.168.3.128",389); diff -Nru openldap2.3-2.4.7/contrib/ldapc++/examples/urlTest.cpp openldap2.3-2.4.9/contrib/ldapc++/examples/urlTest.cpp --- openldap2.3-2.4.7/contrib/ldapc++/examples/urlTest.cpp 2007-11-20 13:08:43.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/examples/urlTest.cpp 2008-04-14 19:18:59.000000000 -0400 @@ -1,3 +1,9 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/examples/urlTest.cpp,v 1.1.2.3 2008/04/14 23:18:59 quanah Exp $ +/* + * Copyright 2008, OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + #include #include #include diff -Nru openldap2.3-2.4.7/contrib/ldapc++/Makefile.am openldap2.3-2.4.9/contrib/ldapc++/Makefile.am --- openldap2.3-2.4.7/contrib/ldapc++/Makefile.am 2003-06-05 12:10:44.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/Makefile.am 2008-04-14 19:20:12.000000000 -0400 @@ -1,3 +1,5 @@ +# $OpenLDAP: pkg/ldap/contrib/ldapc++/Makefile.am,v 1.2.6.1 2008/04/14 23:20:12 quanah Exp $ + ## # Copyright 2000-2003, OpenLDAP Foundation, All Rights Reserved. # COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/Makefile.in openldap2.3-2.4.9/contrib/ldapc++/Makefile.in --- openldap2.3-2.4.7/contrib/ldapc++/Makefile.in 2007-10-01 22:24:56.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/Makefile.in 2008-04-14 19:20:12.000000000 -0400 @@ -14,6 +14,8 @@ @SET_MAKE@ +# $OpenLDAP: pkg/ldap/contrib/ldapc++/Makefile.in,v 1.11.2.3 2008/04/14 23:20:12 quanah Exp $ + # Copyright 2000-2003, OpenLDAP Foundation, All Rights Reserved. # COPYING RESTRICTIONS APPLY, see COPYRIGHT file VPATH = @srcdir@ diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/ac/time.h openldap2.3-2.4.9/contrib/ldapc++/src/ac/time.h --- openldap2.3-2.4.7/contrib/ldapc++/src/ac/time.h 2007-10-01 22:24:57.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/ac/time.h 2008-02-11 18:26:38.000000000 -0500 @@ -1,7 +1,7 @@ /* Generic time.h */ -/* $OpenLDAP: pkg/ldap/contrib/ldapc++/src/ac/time.h,v 1.7.2.3 2007/10/02 02:24:57 ralf Exp $ */ +/* $OpenLDAP: pkg/ldap/contrib/ldapc++/src/ac/time.h,v 1.7.2.4 2008/02/11 23:26:38 kurt Exp $ */ /* - * Copyright 1998-2007 The OpenLDAP Foundation, Redwood City, California, USA + * Copyright 1998-2008 The OpenLDAP Foundation, Redwood City, California, USA * All rights reserved. * * Redistribution and use in source and binary forms are permitted only diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/config.h.in openldap2.3-2.4.9/contrib/ldapc++/src/config.h.in --- openldap2.3-2.4.7/contrib/ldapc++/src/config.h.in 2006-08-17 19:50:23.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/config.h.in 2008-02-11 14:11:50.000000000 -0500 @@ -6,6 +6,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LDAP_H + /* Define to 1 if you have the `resolv' library (-lresolv). */ #undef HAVE_LIBRESOLV @@ -30,6 +33,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_TERMIOS_H + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/debug.h openldap2.3-2.4.9/contrib/ldapc++/src/debug.h --- openldap2.3-2.4.7/contrib/ldapc++/src/debug.h 2001-09-28 10:39:59.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/debug.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/debug.h,v 1.5.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAddRequest.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAddRequest.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAddRequest.cpp 2003-06-05 11:35:12.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAddRequest.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPAddRequest.cpp,v 1.6.6.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAddRequest.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAddRequest.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAddRequest.h 2001-03-15 05:07:58.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAddRequest.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPAddRequest.h,v 1.3.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAsynConnection.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAsynConnection.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAsynConnection.cpp 2007-10-18 13:18:30.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAsynConnection.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPAsynConnection.cpp,v 1.13.2.6 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000-2006, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -24,15 +25,20 @@ using namespace std; -LDAPAsynConnection::LDAPAsynConnection(const string& hostname, int port, +LDAPAsynConnection::LDAPAsynConnection(const string& url, int port, LDAPConstraints *cons ){ DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPAsynConnection::LDAPAsynConnection()" << endl); DEBUG(LDAP_DEBUG_CONSTRUCT | LDAP_DEBUG_PARAMETER, - " host:" << hostname << endl << " port:" << port << endl); + " URL:" << url << endl << " port:" << port << endl); cur_session=0; m_constr = 0; - this->init(hostname, port); + // Is this an LDAP URI? + if ( url.find("://") == std::string::npos ) { + this->init(url, port); + } else { + this->initialize(url); + } this->setConstraints(cons); } @@ -95,6 +101,41 @@ } } +LDAPMessageQueue* LDAPAsynConnection::saslBind(const std::string &mech, + const std::string &cred, + const LDAPConstraints *cons) +{ + DEBUG(LDAP_DEBUG_TRACE, "LDAPAsynConnection::saslBind()" << endl); + LDAPSaslBindRequest *req = new LDAPSaslBindRequest(mech, cred, this, cons); + try{ + LDAPMessageQueue *ret = req->sendRequest(); + return ret; + }catch(LDAPException e){ + delete req; + throw; + } + +} + +LDAPMessageQueue* LDAPAsynConnection::saslInteractiveBind( + const std::string &mech, + int flags, + SaslInteractionHandler *sih, + const LDAPConstraints *cons) +{ + DEBUG(LDAP_DEBUG_TRACE, "LDAPAsynConnection::saslInteractiveBind" + << std::endl); + LDAPSaslInteractiveBind *req = + new LDAPSaslInteractiveBind(mech, flags, sih, this, cons); + try { + LDAPMessageQueue *ret = req->sendRequest(); + return ret; + }catch(LDAPException e){ + delete req; + throw; + } +} + LDAPMessageQueue* LDAPAsynConnection::search(const string& base,int scope, const string& filter, const StringList& attrs, diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAsynConnection.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAsynConnection.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAsynConnection.h 2007-10-18 13:18:30.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAsynConnection.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPAsynConnection.h,v 1.11.2.4 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -21,6 +22,7 @@ #include #include #include +#include //* Main class for an asynchronous LDAP connection /** @@ -59,9 +61,6 @@ * Search */ static const int SEARCH_SUB=2; -// static const int SEARCH_SUB=LDAP_SCOPE_SUBTREE; -// static const int SEARCH_ONE=LDAP_SCOPE_ONELEVEL; -// static const int SEARCH_SUB=LDAP_SCOPE_SUBTREE; /** Construtor that initializes a connection to a server * @param hostname Name (or IP-Adress) of the destination host @@ -69,7 +68,7 @@ * @param cons Default constraints to use with operations over * this connection */ - LDAPAsynConnection(const std::string& hostname=std::string("localhost"), + LDAPAsynConnection(const std::string& url=std::string("localhost"), int port=0, LDAPConstraints *cons=new LDAPConstraints() ); //* Destructor @@ -116,7 +115,17 @@ * @param dn the distiguished name to bind as * @param passwd cleartext password to use */ - LDAPMessageQueue* bind(const std::string& dn="", const std::string& passwd="", + LDAPMessageQueue* bind(const std::string& dn="", + const std::string& passwd="", + const LDAPConstraints *cons=0); + + LDAPMessageQueue* saslBind(const std::string& mech, + const std::string& cred, + const LDAPConstraints *cons=0); + + LDAPMessageQueue* saslInteractiveBind(const std::string& mech, + int flags=0, + SaslInteractionHandler *sih=0, const LDAPConstraints *cons=0); /** Performing a search on a directory tree. diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAttribute.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAttribute.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAttribute.cpp 2007-11-20 13:08:43.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAttribute.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,5 +1,6 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPAttribute.cpp,v 1.6.10.2 2008/04/14 23:09:26 quanah Exp $ /* - * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. + * Copyright 2000-2007, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAttribute.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAttribute.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAttribute.h 2002-03-06 16:57:39.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAttribute.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPAttribute.h,v 1.6.8.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000-2002, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAttributeList.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAttributeList.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAttributeList.cpp 2007-11-20 13:08:43.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAttributeList.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,5 +1,6 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPAttributeList.cpp,v 1.7.6.3 2008/04/14 23:09:26 quanah Exp $ /* - * Copyright 2000-2002, OpenLDAP Foundation, All Rights Reserved. + * Copyright 2000-2007, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ @@ -139,6 +140,24 @@ } } +void LDAPAttributeList::replaceAttribute(const LDAPAttribute& attr) +{ + DEBUG(LDAP_DEBUG_TRACE,"LDAPAttribute::replaceAttribute()" << endl); + DEBUG(LDAP_DEBUG_TRACE | LDAP_DEBUG_PARAMETER, + " attr:" << attr << endl); + + LDAPAttributeList::iterator i; + for( i = m_attrs.begin(); i != m_attrs.end(); i++){ + if(attr.getName().size() == i->getName().size()){ + if(equal(attr.getName().begin(), attr.getName().end(), i->getName().begin(), + nocase_compare)){ + m_attrs.erase(i); + break; + } + } + } + m_attrs.push_back(attr); +} LDAPMod** LDAPAttributeList::toLDAPModArray() const{ DEBUG(LDAP_DEBUG_TRACE,"LDAPAttribute::toLDAPModArray()" << endl); diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAttributeList.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAttributeList.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAttributeList.h 2004-02-03 11:11:17.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAttributeList.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPAttributeList.h,v 1.9.6.2 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000-2002, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -84,7 +85,6 @@ */ const LDAPAttribute* getAttributeByName(const std::string& name) const; - /** * Adds one element to the end of the list. * @param attr The attribute to add to the list. @@ -92,6 +92,12 @@ void addAttribute(const LDAPAttribute& attr); /** + * Replace an Attribute in the List + * @param attr The attribute to add to the list. + */ + void replaceAttribute(const LDAPAttribute& attr); + + /** * Translates the list of Attributes to a 0-terminated array of * LDAPMod-structures as needed by the C-API */ diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAttrType.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAttrType.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAttrType.cpp 2007-02-13 15:22:02.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAttrType.cpp 2008-05-01 17:28:42.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPAttrType.cpp,v 1.3.4.3 2008/05/01 21:28:42 quanah Exp $ /* * Copyright 2003, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -18,17 +19,6 @@ usage = 0; } -LDAPAttrType::LDAPAttrType (const LDAPAttrType &at){ - DEBUG(LDAP_DEBUG_CONSTRUCT, - "LDAPAttrType::LDAPAttrType( )" << endl); - - oid = at.oid; - desc = at.desc; - names = at.names; - single = at.single; - usage = at.usage; -} - LDAPAttrType::LDAPAttrType (string at_item) { DEBUG(LDAP_DEBUG_CONSTRUCT, @@ -45,6 +35,11 @@ this->setOid( a->at_oid ); this->setSingle( a->at_single_value ); this->setUsage( a->at_usage ); + this->setSuperiorOid( a->at_sup_oid ); + this->setEqualityOid( a->at_equality_oid ); + this->setOrderingOid( a->at_ordering_oid ); + this->setSubstringOid( a->at_substr_oid ); + this->setSyntaxOid( a->at_syntax_oid ); } // else? -> error } @@ -57,17 +52,17 @@ single = (at_single == 1); } -void LDAPAttrType::setNames (char **at_names) { - names = StringList (at_names); +void LDAPAttrType::setNames ( char **at_names ) { + names = StringList(at_names); } -void LDAPAttrType::setDesc (char *at_desc) { +void LDAPAttrType::setDesc (const char *at_desc) { desc = string (); if (at_desc) desc = at_desc; } -void LDAPAttrType::setOid (char *at_oid) { +void LDAPAttrType::setOid (const char *at_oid) { oid = string (); if (at_oid) oid = at_oid; @@ -77,23 +72,48 @@ usage = at_usage; } -bool LDAPAttrType::isSingle () { - return single; +void LDAPAttrType::setSuperiorOid( const char *oid ){ + if ( oid ) + superiorOid = oid; +} + +void LDAPAttrType::setEqualityOid( const char *oid ){ + if ( oid ) + equalityOid = oid; +} + +void LDAPAttrType::setOrderingOid( const char *oid ){ + if ( oid ) + orderingOid = oid; +} + +void LDAPAttrType::setSubstringOid( const char *oid ){ + if ( oid ) + substringOid = oid; +} + +void LDAPAttrType::setSyntaxOid( const char *oid ){ + if ( oid ) + syntaxOid = oid; } -string LDAPAttrType::getOid () { +bool LDAPAttrType::isSingle() const { + return single; +} + +string LDAPAttrType::getOid() const { return oid; } -string LDAPAttrType::getDesc () { +string LDAPAttrType::getDesc() const { return desc; } -StringList LDAPAttrType::getNames () { +StringList LDAPAttrType::getNames() const { return names; } -string LDAPAttrType::getName () { +string LDAPAttrType::getName() const { if (names.empty()) return ""; @@ -101,6 +121,28 @@ return *(names.begin()); } -int LDAPAttrType::getUsage () { +int LDAPAttrType::getUsage() const { return usage; } + +std::string LDAPAttrType::getSuperiorOid() const { + return superiorOid; +} + +std::string LDAPAttrType::getEqualityOid() const { + return equalityOid; +} + +std::string LDAPAttrType::getOrderingOid() const { + return orderingOid; +} + +std::string LDAPAttrType::getSubstringOid() const { + return substringOid; +} + +std::string LDAPAttrType::getSyntaxOid() const { + return syntaxOid; +} + + diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAttrType.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAttrType.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPAttrType.h 2007-02-13 15:22:02.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPAttrType.h 2008-05-01 17:28:42.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPAttrType.h,v 1.3.4.3 2008/05/01 21:28:42 quanah Exp $ /* * Copyright 2003, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -22,10 +23,11 @@ class LDAPAttrType{ private : StringList names; - string desc, oid; + std::string desc, oid, superiorOid, equalityOid; + std::string orderingOid, substringOid, syntaxOid; bool single; int usage; - + public : /** @@ -34,11 +36,6 @@ LDAPAttrType(); /** - * Copy constructor - */ - LDAPAttrType (const LDAPAttrType& oc); - - /** * Constructs new object and fills the data structure by parsing the * argument. * @param at_item description of attribute type is string returned @@ -57,40 +54,50 @@ /** * Returns attribute description */ - string getDesc (); + string getDesc() const; /** * Returns attribute oid */ - string getOid (); + string getOid() const; /** * Returns attribute name (first one if there are more of them) */ - string getName (); + string getName() const; /** * Returns all attribute names */ - StringList getNames(); + StringList getNames() const; /** * Returns true if attribute type allows only single value */ - bool isSingle(); + bool isSingle() const; /** * Return the 'usage' value: * (0=userApplications, 1=directoryOperation, 2=distributedOperation, * 3=dSAOperation) */ - int getUsage (); - - void setNames (char **at_names); - void setDesc (char *at_desc); - void setOid (char *at_oid); - void setSingle (int at_single_value); - void setUsage (int at_usage ); + int getUsage () const; + std::string getSuperiorOid() const; + std::string getEqualityOid() const; + std::string getOrderingOid() const; + std::string getSubstringOid() const; + std::string getSyntaxOid() const; + + void setNames( char **at_names); + void setDesc(const char *at_desc); + void setOid(const char *at_oid); + void setSingle(int at_single_value); + void setUsage(int at_usage ); + void setSuperiorOid( const char *oid ); + void setEqualityOid( const char *oid ); + void setOrderingOid( const char *oid ); + void setSubstringOid( const char *oid ); + void setSyntaxOid( const char *oid ); }; #endif // LDAP_ATTRTYPE_H diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPBindRequest.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPBindRequest.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPBindRequest.cpp 2007-11-20 13:08:43.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPBindRequest.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,5 +1,6 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPBindRequest.cpp,v 1.6.8.3 2008/04/14 23:09:26 quanah Exp $ /* - * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. + * Copyright 2000-2007, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ @@ -9,8 +10,11 @@ #include "LDAPBindRequest.h" #include "LDAPException.h" +#include "SaslInteractionHandler.h" +#include "SaslInteraction.h" #include +#include using namespace std; @@ -73,10 +77,97 @@ } } -LDAPRequest* LDAPBindRequest::followReferral(LDAPMsg* /*urls*/){ - DEBUG(LDAP_DEBUG_TRACE,"LDAPBindRequest::followReferral()" << endl); - DEBUG(LDAP_DEBUG_TRACE, - "ReferralChasing for bind-operation not implemented yet" << endl); - return 0; +LDAPSaslBindRequest::LDAPSaslBindRequest(const std::string& mech, + const std::string& cred, + LDAPAsynConnection *connect, + const LDAPConstraints *cons, + bool isReferral) : LDAPRequest(connect, cons, isReferral),m_mech(mech), m_cred(cred) {} + +LDAPMessageQueue* LDAPSaslBindRequest::sendRequest() +{ + DEBUG(LDAP_DEBUG_TRACE,"LDAPSaslBindRequest::sendRequest()" << endl); + int msgID=0; + + BerValue tmpcred; + tmpcred.bv_val = (char*) malloc( m_cred.size() * sizeof(char)); + m_cred.copy(tmpcred.bv_val,string::npos); + tmpcred.bv_len = m_cred.size(); + + LDAPControl** tmpSrvCtrls=m_cons->getSrvCtrlsArray(); + LDAPControl** tmpClCtrls=m_cons->getClCtrlsArray(); + int err=ldap_sasl_bind(m_connection->getSessionHandle(), "", m_mech.c_str(), + &tmpcred, tmpSrvCtrls, tmpClCtrls, &msgID); + LDAPControlSet::freeLDAPControlArray(tmpSrvCtrls); + LDAPControlSet::freeLDAPControlArray(tmpClCtrls); + free(tmpcred.bv_val); + + if(err != LDAP_SUCCESS){ + throw LDAPException(err); + }else{ + m_msgID=msgID; + return new LDAPMessageQueue(this); + } +} + +LDAPSaslBindRequest::~LDAPSaslBindRequest() +{ + DEBUG(LDAP_DEBUG_DESTROY,"LDAPSaslBindRequest::~LDAPSaslBindRequest()" << endl); +} + +LDAPSaslInteractiveBind::LDAPSaslInteractiveBind( const std::string& mech, + int flags, SaslInteractionHandler *sih, LDAPAsynConnection *connect, + const LDAPConstraints *cons, bool isReferral) : + LDAPRequest(connect, cons, isReferral), + m_mech(mech), m_flags(flags), m_sih(sih), m_res(0) +{ +} + +static int my_sasl_interact(LDAP *l, unsigned flags, void *cbh, void *interact) +{ + DEBUG(LDAP_DEBUG_TRACE, "LDAPSaslInteractiveBind::my_sasl_interact()" + << std::endl ); + std::list interactions; + + sasl_interact_t *iter = (sasl_interact_t*) interact; + while ( iter->id != SASL_CB_LIST_END ) { + SaslInteraction *si = new SaslInteraction(iter); + interactions.push_back( si ); + iter++; + } + ((SaslInteractionHandler*)cbh)->handleInteractions(interactions); + return LDAP_SUCCESS; +} + +/* This kind of fakes an asynchronous operation, ldap_sasl_interactive_bind_s + * is synchronous */ +LDAPMessageQueue *LDAPSaslInteractiveBind::sendRequest() +{ + DEBUG(LDAP_DEBUG_TRACE, "LDAPSaslInteractiveBind::sendRequest()" << + m_mech << std::endl); + + LDAPControl** tmpSrvCtrls=m_cons->getSrvCtrlsArray(); + LDAPControl** tmpClCtrls=m_cons->getClCtrlsArray(); + int res = ldap_sasl_interactive_bind_s( m_connection->getSessionHandle(), + "", m_mech.c_str(), tmpSrvCtrls, tmpClCtrls, m_flags, + my_sasl_interact, m_sih ); + + DEBUG(LDAP_DEBUG_TRACE, "ldap_sasl_interactive_bind_s returned: " + << res << std::endl); + if(res != LDAP_SUCCESS){ + throw LDAPException(res); + } else { + m_res = new LDAPResult(LDAPMsg::BIND_RESPONSE, res, ""); + } + return new LDAPMessageQueue(this); +} + +LDAPMsg* LDAPSaslInteractiveBind::getNextMessage() const +{ + return m_res; +} + +LDAPSaslInteractiveBind::~LDAPSaslInteractiveBind() +{ + DEBUG(LDAP_DEBUG_DESTROY,"LDAPSaslInteractiveBind::~LDAPSaslInteractiveBind()" << endl); } diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPBindRequest.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPBindRequest.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPBindRequest.h 2001-09-28 10:39:58.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPBindRequest.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPBindRequest.h,v 1.4.10.2 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -7,6 +8,8 @@ #define LDAP_BIND_REQUEST_H #include +#include +#include class LDAPBindRequest : LDAPRequest { private: @@ -15,14 +18,44 @@ std::string m_mech; public: - LDAPBindRequest(const LDAPBindRequest& req); + LDAPBindRequest( const LDAPBindRequest& req); //just for simple authentication LDAPBindRequest(const std::string&, const std::string& passwd, LDAPAsynConnection *connect, const LDAPConstraints *cons, bool isReferral=false); virtual ~LDAPBindRequest(); virtual LDAPMessageQueue *sendRequest(); - virtual LDAPRequest* followReferral(LDAPMsg* urls); +}; + +class LDAPSaslBindRequest : LDAPRequest +{ + public: + LDAPSaslBindRequest( const std::string& mech, const std::string& cred, + LDAPAsynConnection *connect, const LDAPConstraints *cons, + bool isReferral=false); + virtual LDAPMessageQueue *sendRequest(); + virtual ~LDAPSaslBindRequest(); + + private: + std::string m_mech; + std::string m_cred; +}; + +class LDAPSaslInteractiveBind : LDAPRequest +{ + public: + LDAPSaslInteractiveBind( const std::string& mech, int flags, + SaslInteractionHandler *sih, LDAPAsynConnection *connect, + const LDAPConstraints *cons, bool isReferral=false); + virtual LDAPMessageQueue *sendRequest(); + virtual LDAPMsg* getNextMessage() const; + virtual ~LDAPSaslInteractiveBind(); + + private: + std::string m_mech; + int m_flags; + SaslInteractionHandler *m_sih; + LDAPResult *m_res; }; #endif //LDAP_BIND_REQUEST_H diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPCompareRequest.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPCompareRequest.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPCompareRequest.cpp 2001-11-14 11:33:54.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPCompareRequest.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPCompareRequest.cpp,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPCompareRequest.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPCompareRequest.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPCompareRequest.h 2001-09-28 10:39:58.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPCompareRequest.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPCompareRequest.h,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPConnection.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPConnection.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPConnection.cpp 2005-04-20 06:57:51.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPConnection.cpp 2008-04-14 19:28:11.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPConnection.cpp,v 1.10.4.3 2008/04/14 23:28:11 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -7,7 +8,6 @@ #include "LDAPResult.h" #include "LDAPException.h" -#include "LDAPReferralException.h" #include "LDAPUrlList.h" #include "LDAPConnection.h" @@ -60,6 +60,40 @@ delete msg; // memcheck } +void LDAPConnection::saslInteractiveBind( const std::string &mech, + int flags, + SaslInteractionHandler *sih, + const LDAPConstraints *cons) +{ + DEBUG(LDAP_DEBUG_TRACE,"LDAPConnection::bind" << endl); + LDAPMessageQueue* msg=0; + LDAPResult* res=0; + try{ + msg = LDAPAsynConnection::saslInteractiveBind(mech, flags, sih, cons); + res = (LDAPResult*)msg->getNext(); + }catch(LDAPException e){ + delete msg; + delete res; + throw; + } + int resCode=res->getResultCode(); + if(resCode != LDAPResult::SUCCESS) { + if(resCode == LDAPResult::REFERRAL){ + LDAPUrlList urls = res->getReferralUrls(); + delete res; + delete msg; + throw LDAPReferralException(urls); + }else{ + string srvMsg = res->getErrMsg(); + delete res; + delete msg; + throw LDAPException(resCode, srvMsg); + } + } + delete res; + delete msg; +} + void LDAPConnection::unbind(){ LDAPAsynConnection::unbind(); } diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPConnection.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPConnection.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPConnection.h 2005-04-20 06:57:51.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPConnection.h 2008-04-14 19:28:11.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPConnection.h,v 1.8.4.2 2008/04/14 23:28:11 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -88,6 +89,10 @@ */ void bind(const std::string& dn="", const std::string& passwd="", LDAPConstraints* cons=0); + void saslInteractiveBind(const std::string& mech, + int flags=0, + SaslInteractionHandler *sih=0, + const LDAPConstraints *cons=0); /** * Performs the UNBIND-operation on the destination server diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPConstraints.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPConstraints.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPConstraints.cpp 2001-09-28 10:39:58.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPConstraints.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPConstraints.cpp,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPConstraints.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPConstraints.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPConstraints.h 2001-09-28 10:39:58.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPConstraints.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPConstraints.h,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPControl.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPControl.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPControl.cpp 2001-11-14 11:33:54.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPControl.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPControl.cpp,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPControl.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPControl.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPControl.h 2001-11-14 11:33:54.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPControl.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPControl.h,v 1.5.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPControlSet.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPControlSet.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPControlSet.cpp 2001-11-14 11:33:54.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPControlSet.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPControlSet.cpp,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPControlSet.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPControlSet.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPControlSet.h 2001-11-14 11:33:54.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPControlSet.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPControlSet.h,v 1.6.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPDeleteRequest.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPDeleteRequest.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPDeleteRequest.cpp 2003-06-05 11:35:12.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPDeleteRequest.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPDeleteRequest.cpp,v 1.7.6.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPDeleteRequest.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPDeleteRequest.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPDeleteRequest.h 2001-09-28 10:39:58.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPDeleteRequest.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPDeleteRequest.h,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPEntry.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPEntry.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPEntry.cpp 2006-10-19 16:06:35.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPEntry.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPEntry.cpp,v 1.5.8.4 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -22,8 +23,11 @@ LDAPEntry::LDAPEntry(const string& dn, const LDAPAttributeList *attrs){ DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPEntry::LDAPEntry()" << endl); DEBUG(LDAP_DEBUG_CONSTRUCT | LDAP_DEBUG_PARAMETER, - " dn:" << dn << endl << " attrs:" << *attrs << endl); - m_attrs=new LDAPAttributeList(*attrs); + " dn:" << dn << endl); + if ( attrs ) + m_attrs=new LDAPAttributeList(*attrs); + else + m_attrs=new LDAPAttributeList(); m_dn=dn; } @@ -40,6 +44,13 @@ delete m_attrs; } +LDAPEntry& LDAPEntry::operator=(const LDAPEntry& from){ + m_dn = from.m_dn; + delete m_attrs; + m_attrs = new LDAPAttributeList( *(from.m_attrs)); + return *this; +} + void LDAPEntry::setDN(const string& dn){ DEBUG(LDAP_DEBUG_TRACE,"LDAPEntry::setDN()" << endl); DEBUG(LDAP_DEBUG_TRACE | LDAP_DEBUG_PARAMETER, @@ -67,6 +78,21 @@ return m_attrs; } +const LDAPAttribute* LDAPEntry::getAttributeByName(const std::string& name) const +{ + return m_attrs->getAttributeByName(name); +} + +void LDAPEntry::addAttribute(const LDAPAttribute& attr) +{ + m_attrs->addAttribute(attr); +} + +void LDAPEntry::replaceAttribute(const LDAPAttribute& attr) +{ + m_attrs->replaceAttribute(attr); +} + ostream& operator << (ostream& s, const LDAPEntry& le){ s << "DN: " << le.m_dn << ": " << *(le.m_attrs); return s; diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPEntry.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPEntry.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPEntry.h 2006-10-19 16:06:35.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPEntry.h 2008-04-14 19:30:47.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPEntry.h,v 1.6.8.5 2008/04/14 23:30:47 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -17,11 +18,11 @@ */ class LDAPEntry{ - public : + public : /** * Copy-constructor */ - LDAPEntry(const LDAPEntry& entry); + LDAPEntry(const LDAPEntry& entry); /** * Constructs a new entry (also used as standard constructor). @@ -29,8 +30,8 @@ * @param dn The Distinguished Name for the new entry. * @param attrs The attributes for the new entry. */ - LDAPEntry(const std::string& dn=std::string(), - const LDAPAttributeList *attrs=new LDAPAttributeList()); + LDAPEntry(const std::string& dn=std::string(), + const LDAPAttributeList *attrs=0); /** * Used internally only. @@ -38,44 +39,71 @@ * The constructor is used internally to create a LDAPEntry from * the C-API's data structurs. */ - LDAPEntry(const LDAPAsynConnection *ld, LDAPMessage *msg); + LDAPEntry(const LDAPAsynConnection *ld, LDAPMessage *msg); /** * Destructor */ - ~LDAPEntry(); - + ~LDAPEntry(); + + /** + * Assignment operator + */ + LDAPEntry& operator=(const LDAPEntry& from); + /** * Sets the DN-attribute. * @param dn: The new DN for the entry. */ - void setDN(const std::string& dn); + void setDN(const std::string& dn); /** * Sets the attributes of the entry. * @param attr: A pointer to a std::list of the new attributes. */ - void setAttributes(LDAPAttributeList *attrs); + void setAttributes(LDAPAttributeList *attrs); + + /** + * Get an Attribute by its AttributeType (simple wrapper around + * LDAPAttributeList::getAttributeByName() ) + * @param name The name of the Attribute to look for + * @return a pointer to the LDAPAttribute with the AttributeType + * "name" or 0, if there is no Attribute of that Type + */ + const LDAPAttribute* getAttributeByName(const std::string& name) const; + + /** + * Adds one Attribute to the List of Attributes (simple wrapper around + * LDAPAttributeList::addAttribute() ). + * @param attr The attribute to add to the list. + */ + void addAttribute(const LDAPAttribute& attr); + + /** + * Replace an Attribute in the List of Attributes (simple wrapper + * around LDAPAttributeList::replaceAttribute() ). + * @param attr The attribute to add to the list. + */ + void replaceAttribute(const LDAPAttribute& attr); /** * @returns The current DN of the entry. */ - const std::string& getDN() const ; + const std::string& getDN() const ; /** * @returns A const pointer to the attributes of the entry. */ - const LDAPAttributeList* getAttributes() const; + const LDAPAttributeList* getAttributes() const; /** * This method can be used to dump the data of a LDAPResult-Object. * It is only useful for debugging purposes at the moment */ - friend std::ostream& operator << (std::ostream& s, const LDAPEntry& le); + friend std::ostream& operator << (std::ostream& s, const LDAPEntry& le); private : - - LDAPAttributeList *m_attrs; - std::string m_dn; + LDAPAttributeList *m_attrs; + std::string m_dn; }; #endif //LDAP_ENTRY_H diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPEntryList.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPEntryList.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPEntryList.cpp 2001-09-07 11:43:55.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPEntryList.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPEntryList.cpp,v 1.2.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPEntryList.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPEntryList.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPEntryList.h 2004-02-03 11:11:17.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPEntryList.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPEntryList.h,v 1.6.6.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPException.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPException.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPException.cpp 2007-10-01 22:24:57.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPException.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,26 +1,29 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPException.cpp,v 1.8.2.5 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ - - #include #include "config.h" #include "LDAPException.h" -#include "LDAPReferralException.h" #include "LDAPAsynConnection.h" +#include "LDAPResult.h" using namespace std; -LDAPException::LDAPException(int res_code, const string& err_string){ +LDAPException::LDAPException(int res_code, const string& err_string) throw() + : std::runtime_error(err_string) +{ m_res_code=res_code; m_res_string=string(ldap_err2string(res_code)); m_err_string=err_string; } -LDAPException::LDAPException(const LDAPAsynConnection *lc){ +LDAPException::LDAPException(const LDAPAsynConnection *lc) throw() + : std::runtime_error("") +{ LDAP *l = lc->getSessionHandle(); ldap_get_option(l,LDAP_OPT_RESULT_CODE,&m_res_code); const char *res_cstring = ldap_err2string(m_res_code); @@ -43,22 +46,32 @@ } } -LDAPException::~LDAPException(){ +LDAPException::~LDAPException() throw() +{ } -int LDAPException::getResultCode() const{ +int LDAPException::getResultCode() const throw() +{ return m_res_code; } -const string& LDAPException::getResultMsg() const{ +const string& LDAPException::getResultMsg() const throw() +{ return m_res_string; } -const string& LDAPException::getServerMsg() const{ +const string& LDAPException::getServerMsg() const throw() +{ return m_err_string; } -ostream& operator << (ostream& s, LDAPException e){ +const char* LDAPException::what() const throw() +{ + return this->m_res_string.c_str(); +} + +ostream& operator << (ostream& s, LDAPException e) throw() +{ s << "Error " << e.m_res_code << ": " << e.m_res_string; if (!e.m_err_string.empty()) { s << endl << "additional info: " << e.m_err_string ; @@ -66,3 +79,18 @@ return s; } + +LDAPReferralException::LDAPReferralException(const LDAPUrlList& urls) throw() + : LDAPException(LDAPResult::REFERRAL) , m_urlList(urls) +{ +} + +LDAPReferralException::~LDAPReferralException() throw() +{ +} + +const LDAPUrlList& LDAPReferralException::getUrls() throw() +{ + return m_urlList; +} + diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPException.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPException.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPException.h 2006-08-17 19:50:22.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPException.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPException.h,v 1.5.8.3 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -9,6 +10,9 @@ #include #include +#include + +#include class LDAPAsynConnection; @@ -16,7 +20,8 @@ * This class is only thrown as an Exception and used to signalize error * conditions during LDAP-operations */ -class LDAPException{ +class LDAPException : public std::runtime_error +{ public : /** @@ -26,7 +31,7 @@ * that happend (optional) */ LDAPException(int res_code, - const std::string& err_string=std::string()); + const std::string& err_string=std::string()) throw(); /** * Constructs a LDAPException-object from the error state of a @@ -34,38 +39,69 @@ * @param lc A LDAP-Connection for that an error has happend. The * Constructor tries to read its error state. */ - LDAPException(const LDAPAsynConnection *lc); + LDAPException(const LDAPAsynConnection *lc) throw(); /** * Destructor */ - virtual ~LDAPException(); + virtual ~LDAPException() throw(); /** * @return The Result code of the object */ - int getResultCode() const; + int getResultCode() const throw(); /** * @return The error message that is corresponding to the result * code . */ - const std::string& getResultMsg() const; + const std::string& getResultMsg() const throw(); /** * @return The addional error message of the error (if it was set) */ - const std::string& getServerMsg() const; + const std::string& getServerMsg() const throw(); + + + virtual const char* what() const throw(); /** * This method can be used to dump the data of a LDAPResult-Object. * It is only useful for debugging purposes at the moment */ - friend std::ostream& operator << (std::ostream &s, LDAPException e); + friend std::ostream& operator << (std::ostream &s, LDAPException e) throw(); private : int m_res_code; std::string m_res_string; std::string m_err_string; }; + +/** + * This class extends LDAPException and is used to signalize Referrals + * there were received during synchronous LDAP-operations + */ +class LDAPReferralException : public LDAPException +{ + + public : + /** + * Creates an object that is initialized with a list of URLs + */ + LDAPReferralException(const LDAPUrlList& urls) throw(); + + /** + * Destructor + */ + ~LDAPReferralException() throw(); + + /** + * @return The List of URLs of the Referral/Search Reference + */ + const LDAPUrlList& getUrls() throw(); + + private : + LDAPUrlList m_urlList; +}; + #endif //LDAP_EXCEPTION_H diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPExtRequest.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPExtRequest.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPExtRequest.cpp 2007-11-20 13:08:43.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPExtRequest.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,5 +1,5 @@ /* - * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. + * Copyright 2000-2007, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPExtRequest.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPExtRequest.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPExtRequest.h 2001-09-28 10:39:58.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPExtRequest.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPExtRequest.h,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPExtResult.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPExtResult.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPExtResult.cpp 2001-09-28 10:39:58.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPExtResult.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPExtResult.cpp,v 1.2.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPExtResult.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPExtResult.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPExtResult.h 2001-09-28 10:39:59.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPExtResult.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPExtResult.h,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPMessage.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPMessage.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPMessage.cpp 2001-09-28 10:39:59.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPMessage.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPMessage.cpp,v 1.4.10.2 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -8,6 +9,7 @@ #include "LDAPResult.h" #include "LDAPExtResult.h" +#include "LDAPSaslBindResult.h" #include "LDAPRequest.h" #include "LDAPSearchResult.h" #include "LDAPSearchReference.h" @@ -22,6 +24,13 @@ m_hasControls=false; } +LDAPMsg::LDAPMsg(int type, int id=0){ + DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPMsg::LDAPMsg()" << endl); + msgType = type; + msgID = id; + m_hasControls=false; +} + LDAPMsg* LDAPMsg::create(const LDAPRequest *req, LDAPMessage *msg){ DEBUG(LDAP_DEBUG_TRACE,"LDAPMsg::create()" << endl); switch(ldap_msgtype(msg)){ @@ -34,6 +43,8 @@ case EXTENDED_RESPONSE : return new LDAPExtResult(req,msg); break; + case BIND_RESPONSE : + return new LDAPSaslBindResult(req,msg); default : return new LDAPResult(req, msg); } diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPMessage.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPMessage.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPMessage.h 2001-03-15 05:07:59.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPMessage.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPMessage.h,v 1.4.10.3 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -21,7 +22,7 @@ */ class LDAPMsg{ public: - //public Constants defining the Message types + //public Constants defining the response message types static const int BIND_RESPONSE=LDAP_RES_BIND; static const int SEARCH_ENTRY=LDAP_RES_SEARCH_ENTRY; static const int SEARCH_DONE=LDAP_RES_SEARCH_RESULT; @@ -32,6 +33,17 @@ static const int MODDN_RESPONSE=LDAP_RES_MODDN; static const int COMPARE_RESPONSE=LDAP_RES_COMPARE; static const int EXTENDED_RESPONSE=LDAP_RES_EXTENDED; + //public Constants defining the request message types + static const int BIND_REQUEST=LDAP_REQ_BIND; + static const int UNBIND_REQUEST=LDAP_REQ_UNBIND; + static const int SEARCH_REQUEST=LDAP_REQ_SEARCH; + static const int MODIFY_REQUEST=LDAP_REQ_MODIFY; + static const int ADD_REQUEST=LDAP_REQ_ADD; + static const int DELETE_REQUEST=LDAP_REQ_DELETE; + static const int MODRDN_REQUEST=LDAP_REQ_MODRDN; + static const int COMPARE_REQUEST=LDAP_REQ_COMPARE; + static const int ABANDON_REQUEST=LDAP_REQ_ABANDON; + static const int EXTENDED_REQUEST=LDAP_REQ_EXTENDED; /** * The destructor has no implemenation, because this is an abstract @@ -98,6 +110,7 @@ * Only for internal use. */ LDAPMsg(LDAPMessage *msg); + LDAPMsg(int msgType, int msgID); /** * This attribute stores Server-Control that were returned with the diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPMessageQueue.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPMessageQueue.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPMessageQueue.cpp 2007-10-18 13:16:33.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPMessageQueue.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPMessageQueue.cpp,v 1.6.10.6 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -6,10 +7,8 @@ #include "config.h" #include "debug.h" -#include #include "LDAPMessageQueue.h" #include "LDAPRequest.h" -#include "LDAPAsynConnection.h" #include "LDAPResult.h" #include "LDAPSearchReference.h" #include "LDAPSearchRequest.h" @@ -40,110 +39,102 @@ LDAPMsg *LDAPMessageQueue::getNext(){ DEBUG(LDAP_DEBUG_TRACE,"LDAPMessageQueue::getNext()" << endl); - LDAPMessage *msg; + + if ( m_activeReq.empty() ) { + return 0; + } + LDAPRequest *req=m_activeReq.top(); - int msg_id = req->getMsgID(); - int res; - const LDAPAsynConnection *con=req->getConnection(); - res=ldap_result(con->getSessionHandle(),msg_id,0,0,&msg); - if (res <= 0){ - if(msg != 0){ - ldap_msgfree(msg); - } - throw LDAPException(con); - }else{ - const LDAPConstraints *constr=req->getConstraints(); - LDAPMsg *ret=0; - //this can throw an exception (Decoding Error) - try{ - ret = LDAPMsg::create(req,msg); - ldap_msgfree(msg); - }catch(LDAPException e){ - //do some clean up - delete req; - m_activeReq.top(); - throw; - } - switch (ret->getMessageType()) { - case LDAPMsg::SEARCH_REFERENCE : - if (constr->getReferralChase() ){ - //throws Exception (limit Exceeded) - LDAPRequest *refReq=chaseReferral(ret); - if(refReq != 0){ - m_activeReq.push(refReq); - m_issuedReq.push_back(refReq); - delete ret; - return getNext(); - } - } - return ret; - break; - case LDAPMsg::SEARCH_ENTRY : - return ret; - break; - case LDAPMsg::SEARCH_DONE : - if(req->isReferral()){ - req->unbind(); + LDAPMsg *ret=0; + + try{ + ret = req->getNextMessage(); + }catch(LDAPException e){ + //do some clean up + m_activeReq.pop(); + throw; + } + + const LDAPConstraints *constr=req->getConstraints(); + switch (ret->getMessageType()) { + case LDAPMsg::SEARCH_REFERENCE : + if (constr->getReferralChase() ){ + //throws Exception (limit Exceeded) + LDAPRequest *refReq=chaseReferral(ret); + if(refReq != 0){ + m_activeReq.push(refReq); + m_issuedReq.push_back(refReq); + delete ret; + return getNext(); } - switch ( ((LDAPResult*)ret)->getResultCode()) { - case LDAPResult::REFERRAL : - if(constr->getReferralChase()){ - //throws Exception (limit Exceeded) - LDAPRequest *refReq=chaseReferral(ret); - if(refReq != 0){ - m_activeReq.pop(); - m_activeReq.push(refReq); - m_issuedReq.push_back(refReq); - delete ret; - return getNext(); - } - } - return ret; - break; - case LDAPResult::SUCCESS : - if(req->isReferral()){ - delete ret; + } + return ret; + break; + case LDAPMsg::SEARCH_ENTRY : + return ret; + break; + case LDAPMsg::SEARCH_DONE : + if(req->isReferral()){ + req->unbind(); + } + switch ( ((LDAPResult*)ret)->getResultCode()) { + case LDAPResult::REFERRAL : + if(constr->getReferralChase()){ + //throws Exception (limit Exceeded) + LDAPRequest *refReq=chaseReferral(ret); + if(refReq != 0){ m_activeReq.pop(); + m_activeReq.push(refReq); + m_issuedReq.push_back(refReq); + delete ret; return getNext(); - }else{ - m_activeReq.pop(); - return ret; } - break; - default: + } + return ret; + break; + case LDAPResult::SUCCESS : + if(req->isReferral()){ + delete ret; m_activeReq.pop(); - return ret; - break; - } - break; - //must be some kind of LDAPResultMessage - default: - if(req->isReferral()){ - req->unbind(); - } - LDAPResult* res_p=(LDAPResult*)ret; - switch (res_p->getResultCode()) { - case LDAPResult::REFERRAL : - if(constr->getReferralChase()){ - //throws Exception (limit Exceeded) - LDAPRequest *refReq=chaseReferral(ret); - if(refReq != 0){ - m_activeReq.pop(); - m_activeReq.push(refReq); - m_issuedReq.push_back(refReq); - delete ret; - return getNext(); - } - } - return ret; - break; - default: + return getNext(); + }else{ m_activeReq.pop(); return ret; - } - break; - } - } + } + break; + default: + m_activeReq.pop(); + return ret; + break; + } + break; + //must be some kind of LDAPResultMessage + default: + if(req->isReferral()){ + req->unbind(); + } + LDAPResult* res_p=(LDAPResult*)ret; + switch (res_p->getResultCode()) { + case LDAPResult::REFERRAL : + if(constr->getReferralChase()){ + //throws Exception (limit Exceeded) + LDAPRequest *refReq=chaseReferral(ret); + if(refReq != 0){ + m_activeReq.pop(); + m_activeReq.push(refReq); + m_issuedReq.push_back(refReq); + delete ret; + return getNext(); + } + } + return ret; + break; + default: + m_activeReq.pop(); + return ret; + } + break; + } } // TODO Maybe moved to LDAPRequest::followReferral seems more reasonable diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPMessageQueue.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPMessageQueue.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPMessageQueue.h 2006-10-19 16:06:35.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPMessageQueue.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPMessageQueue.h,v 1.5.10.2 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPModDNRequest.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPModDNRequest.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPModDNRequest.cpp 2003-06-05 11:35:12.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPModDNRequest.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPModDNRequest.cpp,v 1.6.6.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPModDNRequest.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPModDNRequest.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPModDNRequest.h 2001-09-28 10:39:59.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPModDNRequest.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPModDNRequest.h,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPModification.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPModification.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPModification.cpp 2001-11-14 11:33:54.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPModification.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPModification.cpp,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPModification.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPModification.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPModification.h 2001-03-15 05:07:59.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPModification.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPModification.h,v 1.3.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPModifyRequest.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPModifyRequest.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPModifyRequest.cpp 2003-06-05 11:35:12.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPModifyRequest.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPModifyRequest.cpp,v 1.8.6.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPModifyRequest.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPModifyRequest.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPModifyRequest.h 2001-09-28 10:39:59.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPModifyRequest.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPModifyRequest.h,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPModList.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPModList.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPModList.cpp 2007-11-20 13:08:43.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPModList.cpp 2008-04-14 19:29:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPModList.cpp,v 1.5.6.3 2008/04/14 23:29:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -37,3 +38,11 @@ } return ret; } + +bool LDAPModList::empty() const { + return m_modList.empty(); +} + +unsigned int LDAPModList::size() const { + return m_modList.size(); +} diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPModList.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPModList.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPModList.h 2004-02-03 11:11:17.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPModList.h 2008-04-14 19:29:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPModList.h,v 1.7.6.2 2008/04/14 23:29:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -15,9 +16,9 @@ * This container class is used to store multiple LDAPModification-objects. */ class LDAPModList{ - typedef std::list ListType; + typedef std::list ListType; - public : + public : /** * Constructs an empty list. */ @@ -40,7 +41,17 @@ */ LDAPMod** toLDAPModArray(); - private : + /** + * @returns true, if the ModList contains no Operations + */ + bool empty() const; + + /** + * @returns number of Modifications in the ModList + */ + unsigned int size() const; + + private : ListType m_modList; }; #endif //LDAP_MOD_LIST_H diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPObjClass.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPObjClass.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPObjClass.cpp 2004-01-22 10:26:38.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPObjClass.cpp 2008-05-01 17:28:42.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPObjClass.cpp,v 1.3.6.2 2008/05/01 21:28:42 quanah Exp $ /* * Copyright 2003, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -90,31 +91,31 @@ oid = oc_oid; } -string LDAPObjClass::getOid () { +string LDAPObjClass::getOid() const { return oid; } -string LDAPObjClass::getDesc () { +string LDAPObjClass::getDesc() const { return desc; } -StringList LDAPObjClass::getNames () { +StringList LDAPObjClass::getNames() const { return names; } -StringList LDAPObjClass::getMust () { +StringList LDAPObjClass::getMust() const { return must; } -StringList LDAPObjClass::getMay () { +StringList LDAPObjClass::getMay() const { return may; } -StringList LDAPObjClass::getSup () { +StringList LDAPObjClass::getSup() const { return sup; } -string LDAPObjClass::getName () { +string LDAPObjClass::getName() const { if (names.empty()) return ""; @@ -122,7 +123,7 @@ return *(names.begin()); } -int LDAPObjClass::getKind () { +int LDAPObjClass::getKind() const { return kind; } diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPObjClass.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPObjClass.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPObjClass.h 2004-01-22 10:26:38.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPObjClass.h 2008-05-01 17:28:42.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPObjClass.h,v 1.3.6.2 2008/05/01 21:28:42 quanah Exp $ /* * Copyright 2003, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -55,42 +56,42 @@ /** * Returns object class description */ - string getDesc (); + string getDesc() const; /** * Returns object class oid */ - string getOid (); + string getOid() const; /** * Returns object class name (first one if there are more of them) */ - string getName (); + string getName() const; /** * Returns object class kind: 0=ABSTRACT, 1=STRUCTURAL, 2=AUXILIARY */ - int getKind (); + int getKind() const; /** * Returns all object class names */ - StringList getNames(); + StringList getNames() const; /** * Returns list of required attributes */ - StringList getMust(); + StringList getMust() const; /** * Returns list of allowed (and not required) attributes */ - StringList getMay(); + StringList getMay() const; /** * Returns list of the OIDs of the superior ObjectClasses */ - StringList getSup(); + StringList getSup() const; void setNames (char **oc_names); void setMay (char **oc_may); diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPRebindAuth.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPRebindAuth.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPRebindAuth.cpp 2001-09-28 10:39:59.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPRebindAuth.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPRebindAuth.cpp,v 1.2.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPRebindAuth.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPRebindAuth.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPRebindAuth.h 2001-09-28 10:39:59.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPRebindAuth.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPRebindAuth.h,v 1.3.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPRebind.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPRebind.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPRebind.cpp 2000-10-03 12:50:44.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPRebind.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPRebind.cpp,v 1.1.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPRebind.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPRebind.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPRebind.h 2001-09-28 10:39:59.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPRebind.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPRebind.h,v 1.3.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPReferenceList.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPReferenceList.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPReferenceList.cpp 2001-09-07 11:43:55.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPReferenceList.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPReferenceList.cpp,v 1.2.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPReferenceList.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPReferenceList.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPReferenceList.h 2004-02-03 11:11:17.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPReferenceList.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPReferenceList.h,v 1.7.6.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPReferralException.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPReferralException.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPReferralException.cpp 2000-10-03 12:50:44.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPReferralException.cpp 1969-12-31 19:00:00.000000000 -0500 @@ -1,24 +0,0 @@ -/* - * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. - * COPYING RESTRICTIONS APPLY, see COPYRIGHT file - */ - - -#include -#include "LDAPException.h" -#include "LDAPReferralException.h" -#include "LDAPResult.h" -#include "LDAPRequest.h" -#include "LDAPUrl.h" - -LDAPReferralException::LDAPReferralException(const LDAPUrlList& urls) : - LDAPException(LDAPResult::REFERRAL) , m_urlList(urls){ -} - -LDAPReferralException::~LDAPReferralException(){ -} - -const LDAPUrlList& LDAPReferralException::getUrls(){ - return m_urlList; -} - diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPReferralException.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPReferralException.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPReferralException.h 2002-04-23 09:28:11.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPReferralException.h 1969-12-31 19:00:00.000000000 -0500 @@ -1,42 +0,0 @@ -/* - * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. - * COPYING RESTRICTIONS APPLY, see COPYRIGHT file - */ - - -#ifndef LDAP_REFERRAL_EXCEPTION_H -#define LDAP_REFERRAL_EXCEPTION_H - -#include -#include -#include - -class LDAPUrlList; - -/** - * This class extends LDAPException and is used to signalize Referrals - * there were received during synchronous LDAP-operations - */ -class LDAPReferralException : public LDAPException{ - - public : - /** - * Creates an object that is initialized with a list of URLs - */ - LDAPReferralException(const LDAPUrlList& urls); - - /** - * Destructor - */ - ~LDAPReferralException(); - - /** - * @return The List of URLs of the Referral/Search Reference - */ - const LDAPUrlList& getUrls(); - - private : - LDAPUrlList m_urlList; -}; - -#endif //LDAP_REFERRAL_EXCEPTION_H diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPRequest.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPRequest.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPRequest.cpp 2001-09-28 10:39:59.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPRequest.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPRequest.cpp,v 1.3.10.3 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -47,6 +48,36 @@ delete m_cons; } +LDAPMsg* LDAPRequest::getNextMessage() const +{ + DEBUG(LDAP_DEBUG_DESTROY,"LDAPRequest::getNextMessage()" << endl); + int res; + LDAPMessage *msg; + + res=ldap_result(this->m_connection->getSessionHandle(), + this->m_msgID,0,0,&msg); + + if (res <= 0){ + if(msg != 0){ + ldap_msgfree(msg); + } + throw LDAPException(this->m_connection); + }else{ + LDAPMsg *ret=0; + //this can throw an exception (Decoding Error) + ret = LDAPMsg::create(this,msg); + ldap_msgfree(msg); + return ret; + } +} + +LDAPRequest* LDAPRequest::followReferral(LDAPMsg* /*urls*/){ + DEBUG(LDAP_DEBUG_TRACE,"LDAPBindRequest::followReferral()" << endl); + DEBUG(LDAP_DEBUG_TRACE, + "ReferralChasing not implemented for this operation" << endl); + return 0; +} + const LDAPConstraints* LDAPRequest::getConstraints() const{ DEBUG(LDAP_DEBUG_TRACE,"LDAPRequest::getConstraints()" << endl); return m_cons; diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPRequest.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPRequest.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPRequest.h 2001-03-15 05:07:59.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPRequest.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPRequest.h,v 1.4.10.3 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -40,6 +41,7 @@ const LDAPConstraints* getConstraints() const; const LDAPAsynConnection* getConnection() const; + virtual LDAPMsg *getNextMessage() const; int getType()const; int getMsgID() const; int getHopCount() const; @@ -63,7 +65,7 @@ * functions of the C-API to send the Request to a LDAP-Server */ virtual LDAPMessageQueue* sendRequest()=0; - virtual LDAPRequest* followReferral(LDAPMsg* ref)=0; + virtual LDAPRequest* followReferral(LDAPMsg* ref); /** * Compare this request with another on. And returns true if they diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPResult.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPResult.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPResult.cpp 2007-11-20 13:08:43.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPResult.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,5 +1,6 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPResult.cpp,v 1.5.2.3 2008/04/14 23:09:26 quanah Exp $ /* - * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. + * Copyright 2000-2007, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ @@ -53,6 +54,11 @@ } } +LDAPResult::LDAPResult(int type, int resultCode, const std::string &msg) : + LDAPMsg(type,0), m_resCode(resultCode), m_errMsg(msg) +{} + + LDAPResult::~LDAPResult(){ DEBUG(LDAP_DEBUG_DESTROY,"LDAPResult::~LDAPResult()" << endl); } diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPResult.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPResult.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPResult.h 2001-09-28 10:39:59.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPResult.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPResult.h,v 1.5.10.2 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -103,6 +104,7 @@ * Message. */ LDAPResult(const LDAPRequest *req, LDAPMessage *msg); + LDAPResult(int type, int resultCode, const std::string &msg); /** * The destructor. diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSaslBindResult.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSaslBindResult.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSaslBindResult.cpp 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSaslBindResult.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -0,0 +1,45 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPSaslBindResult.cpp,v 1.1.2.2 2008/04/14 23:09:26 quanah Exp $ +/* + * Copyright 2007, OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + +#include "debug.h" +#include +#include "LDAPRequest.h" +#include "LDAPException.h" + +#include "LDAPResult.h" +#include "LDAPSaslBindResult.h" + +using namespace std; + +LDAPSaslBindResult::LDAPSaslBindResult(const LDAPRequest* req, LDAPMessage* msg) : + LDAPResult(req, msg){ + DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPSaslBindResult::LDAPSaslBindResult()" + << std::endl); + BerValue* data = 0; + LDAP* lc = req->getConnection()->getSessionHandle(); + int err = ldap_parse_sasl_bind_result(lc, msg, &data, 0); + if( err != LDAP_SUCCESS && err != LDAP_SASL_BIND_IN_PROGRESS ){ + ber_bvfree(data); + throw LDAPException(err); + }else{ + if(data){ + DEBUG(LDAP_DEBUG_TRACE, " creds present" << std::endl); + m_creds=string(data->bv_val, data->bv_len); + ber_bvfree(data); + } else { + DEBUG(LDAP_DEBUG_TRACE, " no creds present" << std::endl); + } + } +} + +LDAPSaslBindResult::~LDAPSaslBindResult(){ + DEBUG(LDAP_DEBUG_DESTROY,"LDAPSaslBindResult::~LDAPSaslBindResult()" << endl); +} + +const string& LDAPSaslBindResult::getServerCreds() const{ + return m_creds; +} + diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSaslBindResult.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSaslBindResult.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSaslBindResult.h 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSaslBindResult.h 2008-04-14 19:09:26.000000000 -0400 @@ -0,0 +1,43 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPSaslBindResult.h,v 1.1.2.2 2008/04/14 23:09:26 quanah Exp $ +/* + * Copyright 2007, OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + +#ifndef LDAP_SASL_BIND_RESULT_H +#define LDAP_SASL_BIND_RESULT_H + +#include + +#include + +class LDAPRequest; + +/** + * Object of this class are created by the LDAPMsg::create method if + * results for an Extended Operation were returned by a LDAP server. + */ +class LDAPSaslBindResult : public LDAPResult { + public : + /** + * Constructor that creates an LDAPExtResult-object from the C-API + * structures + */ + LDAPSaslBindResult(const LDAPRequest* req, LDAPMessage* msg); + + /** + * The Destructor + */ + virtual ~LDAPSaslBindResult(); + + /** + * @returns If the result contained data this method will return + * the data to the caller as a std::string. + */ + const std::string& getServerCreds() const; + + private: + std::string m_creds; +}; + +#endif // LDAP_SASL_BIND_RESULT_H diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSchema.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSchema.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSchema.cpp 2004-08-13 05:37:21.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSchema.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,13 +1,17 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPSchema.cpp,v 1.2.6.2 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2003, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ -#include "debug.h" -#include "StringList.h" #include "LDAPSchema.h" #include +#include + +#include "debug.h" +#include "StringList.h" + using namespace std; diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSchema.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSchema.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSchema.h 2003-06-24 12:05:03.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSchema.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPSchema.h,v 1.1.8.2 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2003, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -6,7 +7,6 @@ #ifndef LDAP_SCHEMA_H #define LDAP_SCHEMA_H -#include #include #include @@ -44,8 +44,8 @@ * Fill the object_classes map * @param oc description of one objectclass (string returned by search * command), in form: - * "( SuSE.YaST.OC:5 NAME 'userTemplate' SUP objectTemplate STRUCTURAL - * DESC 'User object template' MUST ( cn ) MAY ( secondaryGroup ))" + * "( 1.2.3.4.5 NAME '' SUP STRUCTURAL + * DESC '' MUST ( ) MAY ( ))" */ void setObjectClasses (const StringList &oc); @@ -53,7 +53,7 @@ * Fill the attr_types map * @param at description of one attribute type * (string returned by search command), in form: - * "( SuSE.YaST.Attr:19 NAME ( 'skelDir' ) DESC '' + * "( 1.2.3.4.6 NAME ( '' ) DESC '' * EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )" */ void setAttributeTypes (const StringList &at); diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSearchReference.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSearchReference.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSearchReference.cpp 2005-10-05 11:26:27.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSearchReference.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPSearchReference.cpp,v 1.4.2.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSearchReference.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSearchReference.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSearchReference.h 2001-03-15 05:07:59.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSearchReference.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPSearchReference.h,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSearchRequest.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSearchRequest.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSearchRequest.cpp 2005-10-05 11:26:27.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSearchRequest.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPSearchRequest.cpp,v 1.7.2.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSearchRequest.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSearchRequest.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSearchRequest.h 2001-09-28 10:39:59.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSearchRequest.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPSearchRequest.h,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSearchResult.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSearchResult.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSearchResult.cpp 2001-09-28 10:39:59.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSearchResult.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPSearchResult.cpp,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSearchResult.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSearchResult.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSearchResult.h 2001-03-15 05:07:59.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSearchResult.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPSearchResult.h,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSearchResults.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSearchResults.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSearchResults.cpp 2000-10-03 12:50:44.000000000 -0400 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSearchResults.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPSearchResults.cpp,v 1.1.10.2 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -7,7 +8,6 @@ #include "LDAPException.h" #include "LDAPSearchResult.h" #include "LDAPResult.h" -#include "LDAPReferralException.h" #include "LDAPSearchResults.h" diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSearchResults.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSearchResults.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPSearchResults.h 2001-03-15 05:07:59.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPSearchResults.h 2008-04-14 19:30:47.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPSearchResults.h,v 1.3.10.2 2008/04/14 23:30:47 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -28,14 +29,14 @@ /** * For internal use only. * - * This method read Search result entries from a + * This method reads Search result entries from a * LDAPMessageQueue-object. * @param msg The message queue to read */ LDAPResult* readMessageQueue(LDAPMessageQueue* msg); /** - * The methode is used by the client-application to read the + * The method is used by the client-application to read the * result entries of the SEARCH-Operation. Every call of this * method returns one entry. If all entries were read it return 0. * @throws LDAPReferralException If a Search Reference was diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPUrl.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPUrl.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPUrl.cpp 2007-11-27 14:04:22.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPUrl.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPUrl.cpp,v 1.3.10.5 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000-2006, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -6,6 +7,7 @@ #include "LDAPUrl.h" #include +#include #include "debug.h" using namespace std; @@ -163,7 +165,7 @@ DEBUG(LDAP_DEBUG_TRACE, "LDAPUrl::parseUrl()" << std::endl); // reading Scheme std::string::size_type pos = m_urlString.find(':'); - std::string::size_type startpos = m_urlString.find(':'); + std::string::size_type startpos = pos; if (pos == std::string::npos) { throw LDAPUrlException(LDAPUrlException::INVALID_URL, "No colon found in URL"); @@ -190,28 +192,42 @@ startpos = pos + 3; } if ( m_urlString[startpos] == '/' ) { + // no hostname and port startpos++; } else { + std::string::size_type hostend; + std::string::size_type portstart; pos = m_urlString.find('/', startpos); - std::string hostport = m_urlString.substr(startpos, - pos - startpos); - DEBUG(LDAP_DEBUG_TRACE, " hostport: <" << hostport << ">" - << std::endl); - std::string::size_type portstart = m_urlString.find(':', startpos); - if (portstart == std::string::npos || portstart > pos ) { - percentDecode(hostport, m_Host); + + // IPv6 Address? + if ( m_urlString[startpos] == '[' ) { + // skip + startpos++; + hostend = m_urlString.find(']', startpos); + if ( hostend == std::string::npos ){ + throw LDAPUrlException(LDAPUrlException::INVALID_URL); + } + portstart = hostend + 1; + } else { + hostend = m_urlString.find(':', startpos); + if ( hostend == std::string::npos || portstart > pos ) { + hostend = pos; + } + portstart = hostend; + } + std::string host = m_urlString.substr(startpos, hostend - startpos); + DEBUG(LDAP_DEBUG_TRACE, " host: <" << host << ">" << std::endl); + percentDecode(host, m_Host); + + if (portstart >= m_urlString.length() || portstart >= pos ) { if ( m_Scheme == "ldap" || m_Scheme == "cldap" ) { m_Port = LDAP_DEFAULT_PORT; } else if ( m_Scheme == "ldaps" ) { m_Port = LDAPS_DEFAULT_PORT; } } else { - std::string tmp = m_urlString.substr(startpos, - portstart - startpos); - percentDecode(tmp, m_Host); - DEBUG(LDAP_DEBUG_TRACE, "Host: <" << m_Host << ">" << std::endl); std::string port = m_urlString.substr(portstart+1, - pos-portstart-1); + (pos == std::string::npos ? pos : pos-portstart-1) ); if ( port.length() > 0 ) { std::istringstream i(port); i >> m_Port; @@ -222,8 +238,8 @@ DEBUG(LDAP_DEBUG_TRACE, " Port: <" << m_Port << ">" << std::endl); } + startpos = pos + 1; } - startpos = pos + 1; int parserMode = base; while ( pos != std::string::npos ) { pos = m_urlString.find('?', startpos); @@ -327,8 +343,15 @@ { std::ostringstream url; std::string encoded = ""; - this->percentEncode(m_Host, encoded, PCT_ENCFLAG_SLASH); - url << m_Scheme << "://" << encoded; + + url << m_Scheme << "://"; + // IPv6 ? + if ( m_Host.find( ':', 0 ) != std::string::npos ) { + url << "[" << this->percentEncode(m_Host, encoded) << "]"; + } else { + url << this->percentEncode(m_Host, encoded, PCT_ENCFLAG_SLASH); + } + if ( m_Port != 0 ) { url << ":" << m_Port; } @@ -393,7 +416,7 @@ } -void LDAPUrl::percentEncode( const std::string &src, +std::string& LDAPUrl::percentEncode( const std::string &src, std::string &dest, int flags) const { @@ -453,12 +476,13 @@ break; } if ( escape ) { - o << "%" << (int)(unsigned char)*i ; + o << "%" << std::setw(2) << std::setfill('0') << (int)(unsigned char)*i ; } else { o.put(*i); } } dest = o.str(); + return dest; } const code2string_s LDAPUrlException::code2string[] = { diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPUrl.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPUrl.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPUrl.h 2007-11-27 14:04:22.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPUrl.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPUrl.h,v 1.6.8.4 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000-2006, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -138,7 +139,7 @@ * @param dest The encoded result string * @param flags */ - void percentEncode( const std::string& src, + std::string& percentEncode( const std::string& src, std::string& dest, int flags=0 ) const; diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPUrlList.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LDAPUrlList.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPUrlList.cpp 2004-02-03 11:11:17.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPUrlList.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPUrlList.cpp,v 1.6.6.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000-2002 OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LDAPUrlList.h openldap2.3-2.4.9/contrib/ldapc++/src/LDAPUrlList.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LDAPUrlList.h 2004-02-03 11:11:17.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LDAPUrlList.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPUrlList.h,v 1.8.6.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LdifReader.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LdifReader.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LdifReader.cpp 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LdifReader.cpp 2008-04-14 18:50:28.000000000 -0400 @@ -0,0 +1,348 @@ +/* + * Copyright 2008, OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + +#include "LdifReader.h" +#include "LDAPMessage.h" +#include "LDAPEntry.h" +#include "LDAPAttributeList.h" +#include "LDAPAttribute.h" +#include "LDAPUrl.h" +#include "debug.h" + +#include +#include +#include + +#include // For base64 routines + +typedef std::pair stringpair; + +LdifReader::LdifReader( std::istream &input ) + : m_ldifstream(input), m_lineNumber(0) +{ + DEBUG(LDAP_DEBUG_TRACE, "<> LdifReader::LdifReader()" << std::endl); + this->m_version = 0; + // read the first record to find out version and type of the LDIF + this->readNextRecord(true); + this->m_currentIsFirst = true; +} + +int LdifReader::readNextRecord( bool first ) +{ + DEBUG(LDAP_DEBUG_TRACE, "-> LdifReader::readRecord()" << std::endl); + std::string line; + std::string type; + std::string value; + int numLine = 0; + int recordType = 0; + + if ( (! first) && this->m_currentIsFirst == true ) + { + this->m_currentIsFirst = false; + return m_curRecType; + } + + m_currentRecord.clear(); + + while ( !this->getLdifLine(line) ) + { + DEBUG(LDAP_DEBUG_TRACE, " Line: " << line << std::endl ); + + // skip comments and empty lines between entries + if ( line[0] == '#' || ( numLine == 0 && line.size() == 0 ) ) + { + DEBUG(LDAP_DEBUG_TRACE, "skipping empty line or comment" << std::endl ); + continue; + } + if ( line.size() == 0 ) + { + // End of Entry + break; + } + + this->splitLine(line, type, value); + + if ( numLine == 0 ) + { + if ( type == "version" ) + { + std::istringstream valuestream(value); + valuestream >> this->m_version; + if ( this->m_version != 1 ) // there is no other Version than LDIFv1 + { + std::ostringstream err; + err << "Line " << this->m_lineNumber + << ": Unsuported LDIF Version"; + throw( std::runtime_error(err.str()) ); + } + continue; + } + if ( type == "dn" ) // Record should start with the DN ... + { + DEBUG(LDAP_DEBUG_TRACE, " Record DN:" << value << std::endl); + } + else if ( type == "include" ) // ... or it might be an "include" line + { + DEBUG(LDAP_DEBUG_TRACE, " Include directive: " << value << std::endl); + if ( this->m_version == 1 ) + { + std::ostringstream err; + err << "Line " << this->m_lineNumber + << ": \"include\" not allowed in LDIF version 1."; + throw( std::runtime_error(err.str()) ); + } + else + { + std::ostringstream err; + err << "Line " << this->m_lineNumber + << ": \"include\" not yet suppported."; + throw( std::runtime_error(err.str()) ); + } + } + else + { + DEBUG(LDAP_DEBUG_TRACE, " Record doesn't start with a DN" + << std::endl); + std::ostringstream err; + err << "Line " << this->m_lineNumber + << ": LDIF record does not start with a DN."; + throw( std::runtime_error(err.str()) ); + } + } + if ( numLine == 1 ) // might contain "changtype" to indicate a change request + { + if ( type == "changetype" ) + { + if ( first ) + { + this->m_ldifTypeRequest = true; + } + else if (! this->m_ldifTypeRequest ) + { + // Change Request in Entry record LDIF, should we accept it? + std::ostringstream err; + err << "Line " << this->m_lineNumber + << ": Change Request in an entry-only LDIF."; + throw( std::runtime_error(err.str()) ); + } + if ( value == "modify" ) + { + recordType = LDAPMsg::MODIFY_REQUEST; + } + else if ( value == "add" ) + { + recordType = LDAPMsg::ADD_REQUEST; + } + else if ( value == "delete" ) + { + recordType = LDAPMsg::DELETE_REQUEST; + } + else if ( value == "modrdn" ) + { + recordType = LDAPMsg::MODRDN_REQUEST; + } + else + { + DEBUG(LDAP_DEBUG_TRACE, " Unknown change request <" + << value << ">" << std::endl); + std::ostringstream err; + err << "Line " << this->m_lineNumber + << ": Unknown changetype: \"" << value << "\"."; + throw( std::runtime_error(err.str()) ); + } + } + else + { + if ( first ) + { + this->m_ldifTypeRequest = false; + } + else if (this->m_ldifTypeRequest ) + { + // Entry record in Change record LDIF, should we accept + // it (e.g. as AddRequest)? + } + recordType = LDAPMsg::SEARCH_ENTRY; + } + } + m_currentRecord.push_back( stringpair(type, value) ); + numLine++; + } + DEBUG(LDAP_DEBUG_TRACE, "<- LdifReader::readRecord() return: " + << recordType << std::endl); + m_curRecType = recordType; + return recordType; +} + +LDAPEntry LdifReader::getEntryRecord() +{ + if ( m_curRecType != LDAPMsg::SEARCH_ENTRY ) + { + // Error + } + std::list::const_iterator i = m_currentRecord.begin(); + LDAPEntry resEntry(i->second); + i++; + LDAPAttribute curAttr(i->first); + LDAPAttributeList *curAl = new LDAPAttributeList(); + for ( ; i != m_currentRecord.end(); i++ ) + { + if ( i->first == curAttr.getName() ) + { + curAttr.addValue(i->second); + } + else + { + if ( curAl->getAttributeByName( i->first ) ) + { + // Attribute exists already -> Syntax Error + std::ostringstream err; + err << "Line " << this->m_lineNumber + << ": Attribute \"" << i->first + << "\" specified multiple times."; + throw( std::runtime_error(err.str()) ); + } + else + { + curAl->addAttribute( curAttr ); + curAttr = LDAPAttribute( i->first, i->second ); + } + } + } + curAl->addAttribute( curAttr ); + resEntry.setAttributes( curAl ); + return resEntry; +} + +int LdifReader::getLdifLine(std::string &ldifline) +{ + DEBUG(LDAP_DEBUG_TRACE, "-> LdifReader::getLdifLine()" << std::endl); + + this->m_lineNumber++; + if ( ! getline(m_ldifstream, ldifline) ) + { + return -1; + } + while ( m_ldifstream && + (m_ldifstream.peek() == ' ' || m_ldifstream.peek() == '\t')) + { + std::string cat; + m_ldifstream.ignore(); + getline(m_ldifstream, cat); + ldifline += cat; + this->m_lineNumber++; + } + + DEBUG(LDAP_DEBUG_TRACE, "<- LdifReader::getLdifLine()" << std::endl); + return 0; +} + +void LdifReader::splitLine( + const std::string& line, + std::string &type, + std::string &value) const +{ + std::string::size_type pos = line.find(':'); + if ( pos == std::string::npos ) + { + DEBUG(LDAP_DEBUG_ANY, "Invalid LDIF line. No `:` separator" + << std::endl ); + std::ostringstream err; + err << "Line " << this->m_lineNumber << ": Invalid LDIF line. No `:` separator"; + throw( std::runtime_error( err.str() )); + } + + type = line.substr(0, pos); + if ( pos == line.size() ) + { + // empty value + value = ""; + return; + } + + pos++; + char delim = line[pos]; + if ( delim == ':' || delim == '<' ) + { + pos++; + } + + for( ; pos < line.size() && isspace(line[pos]); pos++ ) + { /* empty */ } + + value = line.substr(pos); + + if ( delim == ':' ) + { + // Base64 encoded value + DEBUG(LDAP_DEBUG_TRACE, " base64 encoded value" << std::endl ); + char outbuf[value.size()]; + int rc = sasl_decode64(value.c_str(), value.size(), + outbuf, value.size(), NULL); + if( rc == SASL_OK ) + { + value = std::string(outbuf); + } + else if ( rc == SASL_BADPROT ) + { + value = ""; + DEBUG( LDAP_DEBUG_TRACE, " invalid base64 content" << std::endl ); + std::ostringstream err; + err << "Line " << this->m_lineNumber << ": Can't decode Base64 data"; + throw( std::runtime_error( err.str() )); + } + else if ( rc == SASL_BUFOVER ) + { + value = ""; + DEBUG( LDAP_DEBUG_TRACE, " not enough space in output buffer" + << std::endl ); + std::ostringstream err; + err << "Line " << this->m_lineNumber + << ": Can't decode Base64 data. Buffer too small"; + throw( std::runtime_error( err.str() )); + } + } + else if ( delim == '<' ) + { + // URL value + DEBUG(LDAP_DEBUG_TRACE, " url value" << std::endl ); + std::ostringstream err; + err << "Line " << this->m_lineNumber + << ": URLs are currently not supported"; + throw( std::runtime_error( err.str() )); + } + else + { + // "normal" value + DEBUG(LDAP_DEBUG_TRACE, " string value" << std::endl ); + } + DEBUG(LDAP_DEBUG_TRACE, " Type: <" << type << ">" << std::endl ); + DEBUG(LDAP_DEBUG_TRACE, " Value: <" << value << ">" << std::endl ); + return; +} + +std::string LdifReader::readIncludeLine( const std::string& line ) const +{ + std::string::size_type pos = sizeof("file:") - 1; + std::string scheme = line.substr( 0, pos ); + std::string file; + + // only file:// URLs supported currently + if ( scheme != "file:" ) + { + DEBUG( LDAP_DEBUG_TRACE, "unsupported scheme: " << scheme + << std::endl); + } + else if ( line[pos] == '/' ) + { + if ( line[pos+1] == '/' ) + { + pos += 2; + } + file = line.substr(pos, std::string::npos); + DEBUG( LDAP_DEBUG_TRACE, "target file: " << file << std::endl); + } + return file; +} diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LdifReader.h openldap2.3-2.4.9/contrib/ldapc++/src/LdifReader.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LdifReader.h 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LdifReader.h 2008-04-14 18:50:28.000000000 -0400 @@ -0,0 +1,56 @@ +/* + * Copyright 2008, OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + +#ifndef LDIF_READER_H +#define LDIF_READER_H + +#include +#include +#include + +typedef std::list< std::pair > LdifRecord; +class LdifReader +{ + public: + LdifReader( std::istream &input ); + + inline bool isEntryRecords() const + { + return !m_ldifTypeRequest; + } + + inline bool isChangeRecords() const + { + return m_ldifTypeRequest; + } + + inline int getVersion() const + { + return m_version; + } + + LDAPEntry getEntryRecord(); + int readNextRecord( bool first=false ); + //LDAPRequest getChangeRecord(); + + private: + int getLdifLine(std::string &line); + + void splitLine(const std::string& line, + std::string &type, + std::string &value ) const; + + std::string readIncludeLine( const std::string &line) const; + + std::istream &m_ldifstream; + LdifRecord m_currentRecord; + int m_version; + int m_curRecType; + int m_lineNumber; + bool m_ldifTypeRequest; + bool m_currentIsFirst; +}; + +#endif /* LDIF_READER_H */ diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LdifWriter.cpp openldap2.3-2.4.9/contrib/ldapc++/src/LdifWriter.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/LdifWriter.cpp 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LdifWriter.cpp 2008-04-14 18:58:58.000000000 -0400 @@ -0,0 +1,116 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LdifWriter.cpp,v 1.2.2.1 2008/04/14 22:58:58 quanah Exp $ +/* + * Copyright 2008, OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + +#include "LdifWriter.h" +#include "StringList.h" +#include "LDAPAttribute.h" +#include "debug.h" +#include +#include + +LdifWriter::LdifWriter( std::ostream& output, int version ) : + m_ldifstream(output), m_version(version), m_addSeparator(false) +{ + if ( version ) + { + if ( version == 1 ) + { + m_ldifstream << "version: " << version << std::endl; + m_addSeparator = true; + } else { + std::ostringstream err; + err << "Unsuported LDIF Version"; + throw( std::runtime_error(err.str()) ); + } + } + +} + +void LdifWriter::writeRecord(const LDAPEntry& le) +{ + std::ostringstream line; + + if ( m_addSeparator ) + { + m_ldifstream << std::endl; + } else { + m_addSeparator = true; + } + + line << "dn: " << le.getDN(); + this->breakline( line.str(), m_ldifstream ); + + const LDAPAttributeList *al = le.getAttributes(); + LDAPAttributeList::const_iterator i = al->begin(); + for ( ; i != al->end(); i++ ) + { + StringList values = i->getValues(); + StringList::const_iterator j = values.begin(); + for( ; j != values.end(); j++) + { + // clear output stream + line.str(""); + line << i->getName() << ": " << *j; + this->breakline( line.str(), m_ldifstream ); + } + } +} + +void LdifWriter::writeIncludeRecord( const std::string& target ) +{ + DEBUG(LDAP_DEBUG_TRACE, "writeIncludeRecord: " << target << std::endl); + std::string scheme = target.substr( 0, sizeof("file:")-1 ); + + if ( m_version == 1 ) + { + std::ostringstream err; + err << "\"include\" not allowed in LDIF version 1."; + throw( std::runtime_error(err.str()) ); + } + + if ( m_addSeparator ) + { + m_ldifstream << std::endl; + } else { + m_addSeparator = true; + } + + m_ldifstream << "include: "; + if ( scheme != "file:" ) + { + m_ldifstream << "file://"; + } + + m_ldifstream << target << std::endl; +} + +void LdifWriter::breakline( const std::string &line, std::ostream &out ) +{ + std::string::size_type pos = 0; + std::string::size_type linelength = 76; + bool first = true; + + if ( line.length() >= linelength ) + { + while ( pos < line.length() ) + { + if (! first ) + { + out << " "; + } + out << line.substr(pos, linelength) << std::endl; + pos += linelength; + if ( first ) + { + first = false; + linelength--; //account for the leading space + } + } + } else { + out << line << std::endl; + } +} + diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/LdifWriter.h openldap2.3-2.4.9/contrib/ldapc++/src/LdifWriter.h --- openldap2.3-2.4.7/contrib/ldapc++/src/LdifWriter.h 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/LdifWriter.h 2008-04-14 18:58:58.000000000 -0400 @@ -0,0 +1,31 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LdifWriter.h,v 1.2.2.1 2008/04/14 22:58:58 quanah Exp $ +/* + * Copyright 2008, OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + +#ifndef LDIF_WRITER_H +#define LDIF_WRITER_H + +#include +#include +#include + +class LdifWriter +{ + public: + LdifWriter( std::ostream& output, int version = 0 ); + void writeRecord(const LDAPEntry& le); + void writeIncludeRecord(const std::string& target); + + private: + void breakline( const std::string &line, std::ostream &out ); + + std::ostream& m_ldifstream; + int m_version; + bool m_addSeparator; + +}; + +#endif /* LDIF_WRITER_H */ + diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/Makefile.am openldap2.3-2.4.9/contrib/ldapc++/src/Makefile.am --- openldap2.3-2.4.7/contrib/ldapc++/src/Makefile.am 2007-11-20 13:08:43.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/Makefile.am 2008-04-14 19:02:35.000000000 -0400 @@ -1,4 +1,6 @@ -## +# $OpenLDAP: pkg/ldap/contrib/ldapc++/src/Makefile.am,v 1.10.2.5 2008/04/14 23:02:35 quanah Exp $ + +### # Copyright 2000, OpenLDAP Foundation, All Rights Reserved. # COPYING RESTRICTIONS APPLY, see COPYRIGHT file ## @@ -6,73 +8,81 @@ lib_LTLIBRARIES = libldapcpp.la libldapcpp_la_SOURCES = LDAPAddRequest.cpp \ - LDAPAsynConnection.cpp \ - LDAPAttribute.cpp \ - LDAPAttributeList.cpp \ - LDAPAttrType.cpp \ - LDAPBindRequest.cpp \ - LDAPCompareRequest.cpp \ - LDAPConnection.cpp \ - LDAPConstraints.cpp \ - LDAPControl.cpp \ - LDAPControlSet.cpp \ - LDAPDeleteRequest.cpp \ - LDAPEntry.cpp \ - LDAPEntryList.cpp \ - LDAPException.cpp \ - LDAPExtRequest.cpp \ - LDAPExtResult.cpp \ - LDAPMessage.cpp \ - LDAPMessageQueue.cpp \ - LDAPModDNRequest.cpp \ - LDAPModification.cpp \ - LDAPModifyRequest.cpp \ - LDAPModList.cpp \ - LDAPObjClass.cpp \ - LDAPRebind.cpp \ - LDAPRebindAuth.cpp \ - LDAPReferralException.cpp \ - LDAPReferenceList.cpp \ - LDAPRequest.cpp \ - LDAPResult.cpp \ - LDAPSchema.cpp \ - LDAPSearchReference.cpp \ - LDAPSearchRequest.cpp \ - LDAPSearchResult.cpp \ - LDAPSearchResults.cpp \ - LDAPUrl.cpp \ - LDAPUrlList.cpp \ - StringList.cpp + LDAPAsynConnection.cpp \ + LDAPAttribute.cpp \ + LDAPAttributeList.cpp \ + LDAPAttrType.cpp \ + LDAPBindRequest.cpp \ + LDAPCompareRequest.cpp \ + LDAPConnection.cpp \ + LDAPConstraints.cpp \ + LDAPControl.cpp \ + LDAPControlSet.cpp \ + LDAPDeleteRequest.cpp \ + LDAPEntry.cpp \ + LDAPEntryList.cpp \ + LDAPException.cpp \ + LDAPExtRequest.cpp \ + LDAPExtResult.cpp \ + LDAPMessage.cpp \ + LDAPMessageQueue.cpp \ + LDAPModDNRequest.cpp \ + LDAPModification.cpp \ + LDAPModifyRequest.cpp \ + LDAPModList.cpp \ + LDAPObjClass.cpp \ + LDAPRebind.cpp \ + LDAPRebindAuth.cpp \ + LDAPReferenceList.cpp \ + LDAPRequest.cpp \ + LDAPResult.cpp \ + LDAPSaslBindResult.cpp \ + LDAPSchema.cpp \ + LDAPSearchReference.cpp \ + LDAPSearchRequest.cpp \ + LDAPSearchResult.cpp \ + LDAPSearchResults.cpp \ + LDAPUrl.cpp \ + LDAPUrlList.cpp \ + LdifReader.cpp \ + LdifWriter.cpp \ + SaslInteraction.cpp \ + SaslInteractionHandler.cpp \ + StringList.cpp include_HEADERS = LDAPAsynConnection.h \ - LDAPAttribute.h \ - LDAPAttributeList.h \ - LDAPAttrType.h \ - LDAPConnection.h \ - LDAPConstraints.h \ - LDAPControl.h \ - LDAPControlSet.h \ - LDAPEntry.h \ - LDAPEntryList.h \ - LDAPException.h \ - LDAPExtResult.h \ - LDAPMessage.h \ - LDAPMessageQueue.h \ - LDAPModification.h \ - LDAPModList.h \ - LDAPObjClass.h \ - LDAPRebind.h \ - LDAPRebindAuth.h \ - LDAPReferralException.h \ - LDAPReferenceList.h \ - LDAPResult.h \ - LDAPSchema.h \ - LDAPSearchReference.h \ - LDAPSearchResult.h \ - LDAPSearchResults.h \ - LDAPUrl.h \ - LDAPUrlList.h \ - StringList.h + LDAPAttribute.h \ + LDAPAttributeList.h \ + LDAPAttrType.h \ + LDAPConnection.h \ + LDAPConstraints.h \ + LDAPControl.h \ + LDAPControlSet.h \ + LDAPEntry.h \ + LDAPEntryList.h \ + LDAPException.h \ + LDAPExtResult.h \ + LDAPMessage.h \ + LDAPMessageQueue.h \ + LDAPModification.h \ + LDAPModList.h \ + LDAPObjClass.h \ + LDAPRebind.h \ + LDAPRebindAuth.h \ + LDAPReferenceList.h \ + LDAPResult.h \ + LDAPSaslBindResult.h \ + LDAPSchema.h \ + LDAPSearchReference.h \ + LDAPSearchResult.h \ + LDAPSearchResults.h \ + LDAPUrl.h \ + LDAPUrlList.h \ + LdifReader.h \ + LdifWriter.h \ + SaslInteraction.h \ + SaslInteractionHandler.h \ + StringList.h noinst_HEADERS = LDAPAddRequest.h \ LDAPBindRequest.h \ diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/Makefile.in openldap2.3-2.4.9/contrib/ldapc++/src/Makefile.in --- openldap2.3-2.4.7/contrib/ldapc++/src/Makefile.in 2007-11-20 13:08:43.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/Makefile.in 2008-04-14 19:02:35.000000000 -0400 @@ -14,6 +14,9 @@ @SET_MAKE@ +# $OpenLDAP: pkg/ldap/contrib/ldapc++/src/Makefile.in,v 1.9.2.7 2008/04/14 23:02:35 quanah Exp $ + +### # Copyright 2000, OpenLDAP Foundation, All Rights Reserved. # COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -66,10 +69,11 @@ LDAPMessage.lo LDAPMessageQueue.lo LDAPModDNRequest.lo \ LDAPModification.lo LDAPModifyRequest.lo LDAPModList.lo \ LDAPObjClass.lo LDAPRebind.lo LDAPRebindAuth.lo \ - LDAPReferralException.lo LDAPReferenceList.lo LDAPRequest.lo \ - LDAPResult.lo LDAPSchema.lo LDAPSearchReference.lo \ + LDAPReferenceList.lo LDAPRequest.lo LDAPResult.lo \ + LDAPSaslBindResult.lo LDAPSchema.lo LDAPSearchReference.lo \ LDAPSearchRequest.lo LDAPSearchResult.lo LDAPSearchResults.lo \ - LDAPUrl.lo LDAPUrlList.lo StringList.lo + LDAPUrl.lo LDAPUrlList.lo LdifReader.lo LdifWriter.lo \ + SaslInteraction.lo SaslInteractionHandler.lo StringList.lo libldapcpp_la_OBJECTS = $(am_libldapcpp_la_OBJECTS) libldapcpp_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ @@ -201,73 +205,81 @@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libldapcpp.la libldapcpp_la_SOURCES = LDAPAddRequest.cpp \ - LDAPAsynConnection.cpp \ - LDAPAttribute.cpp \ - LDAPAttributeList.cpp \ - LDAPAttrType.cpp \ - LDAPBindRequest.cpp \ - LDAPCompareRequest.cpp \ - LDAPConnection.cpp \ - LDAPConstraints.cpp \ - LDAPControl.cpp \ - LDAPControlSet.cpp \ - LDAPDeleteRequest.cpp \ - LDAPEntry.cpp \ - LDAPEntryList.cpp \ - LDAPException.cpp \ - LDAPExtRequest.cpp \ - LDAPExtResult.cpp \ - LDAPMessage.cpp \ - LDAPMessageQueue.cpp \ - LDAPModDNRequest.cpp \ - LDAPModification.cpp \ - LDAPModifyRequest.cpp \ - LDAPModList.cpp \ - LDAPObjClass.cpp \ - LDAPRebind.cpp \ - LDAPRebindAuth.cpp \ - LDAPReferralException.cpp \ - LDAPReferenceList.cpp \ - LDAPRequest.cpp \ - LDAPResult.cpp \ - LDAPSchema.cpp \ - LDAPSearchReference.cpp \ - LDAPSearchRequest.cpp \ - LDAPSearchResult.cpp \ - LDAPSearchResults.cpp \ - LDAPUrl.cpp \ - LDAPUrlList.cpp \ - StringList.cpp + LDAPAsynConnection.cpp \ + LDAPAttribute.cpp \ + LDAPAttributeList.cpp \ + LDAPAttrType.cpp \ + LDAPBindRequest.cpp \ + LDAPCompareRequest.cpp \ + LDAPConnection.cpp \ + LDAPConstraints.cpp \ + LDAPControl.cpp \ + LDAPControlSet.cpp \ + LDAPDeleteRequest.cpp \ + LDAPEntry.cpp \ + LDAPEntryList.cpp \ + LDAPException.cpp \ + LDAPExtRequest.cpp \ + LDAPExtResult.cpp \ + LDAPMessage.cpp \ + LDAPMessageQueue.cpp \ + LDAPModDNRequest.cpp \ + LDAPModification.cpp \ + LDAPModifyRequest.cpp \ + LDAPModList.cpp \ + LDAPObjClass.cpp \ + LDAPRebind.cpp \ + LDAPRebindAuth.cpp \ + LDAPReferenceList.cpp \ + LDAPRequest.cpp \ + LDAPResult.cpp \ + LDAPSaslBindResult.cpp \ + LDAPSchema.cpp \ + LDAPSearchReference.cpp \ + LDAPSearchRequest.cpp \ + LDAPSearchResult.cpp \ + LDAPSearchResults.cpp \ + LDAPUrl.cpp \ + LDAPUrlList.cpp \ + LdifReader.cpp \ + LdifWriter.cpp \ + SaslInteraction.cpp \ + SaslInteractionHandler.cpp \ + StringList.cpp include_HEADERS = LDAPAsynConnection.h \ - LDAPAttribute.h \ - LDAPAttributeList.h \ - LDAPAttrType.h \ - LDAPConnection.h \ - LDAPConstraints.h \ - LDAPControl.h \ - LDAPControlSet.h \ - LDAPEntry.h \ - LDAPEntryList.h \ - LDAPException.h \ - LDAPExtResult.h \ - LDAPMessage.h \ - LDAPMessageQueue.h \ - LDAPModification.h \ - LDAPModList.h \ - LDAPObjClass.h \ - LDAPRebind.h \ - LDAPRebindAuth.h \ - LDAPReferralException.h \ - LDAPReferenceList.h \ - LDAPResult.h \ - LDAPSchema.h \ - LDAPSearchReference.h \ - LDAPSearchResult.h \ - LDAPSearchResults.h \ - LDAPUrl.h \ - LDAPUrlList.h \ - StringList.h + LDAPAttribute.h \ + LDAPAttributeList.h \ + LDAPAttrType.h \ + LDAPConnection.h \ + LDAPConstraints.h \ + LDAPControl.h \ + LDAPControlSet.h \ + LDAPEntry.h \ + LDAPEntryList.h \ + LDAPException.h \ + LDAPExtResult.h \ + LDAPMessage.h \ + LDAPMessageQueue.h \ + LDAPModification.h \ + LDAPModList.h \ + LDAPObjClass.h \ + LDAPRebind.h \ + LDAPRebindAuth.h \ + LDAPReferenceList.h \ + LDAPResult.h \ + LDAPSaslBindResult.h \ + LDAPSchema.h \ + LDAPSearchReference.h \ + LDAPSearchResult.h \ + LDAPSearchResults.h \ + LDAPUrl.h \ + LDAPUrlList.h \ + LdifReader.h \ + LdifWriter.h \ + SaslInteraction.h \ + SaslInteractionHandler.h \ + StringList.h noinst_HEADERS = LDAPAddRequest.h \ LDAPBindRequest.h \ @@ -395,9 +407,9 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPRebind.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPRebindAuth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPReferenceList.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPReferralException.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPRequest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPResult.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPSaslBindResult.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPSchema.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPSearchReference.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPSearchRequest.Plo@am__quote@ @@ -405,6 +417,10 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPSearchResults.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPUrl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPUrlList.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LdifReader.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LdifWriter.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SaslInteraction.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SaslInteractionHandler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StringList.Plo@am__quote@ .cpp.o: diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/SaslInteraction.cpp openldap2.3-2.4.9/contrib/ldapc++/src/SaslInteraction.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/SaslInteraction.cpp 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/SaslInteraction.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -0,0 +1,44 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/SaslInteraction.cpp,v 1.1.2.2 2008/04/14 23:09:26 quanah Exp $ +/* + * Copyright 2007, OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + +#include +#include +#include "debug.h" + +SaslInteraction::SaslInteraction( sasl_interact_t *interact ) : + m_interact(interact) {} + +SaslInteraction::~SaslInteraction() +{ + DEBUG(LDAP_DEBUG_TRACE, "SaslInteraction::~SaslInteraction()" << std::endl); +} + +unsigned long SaslInteraction::getId() const +{ + return m_interact->id; +} + +const std::string SaslInteraction::getPrompt() const +{ + return std::string(m_interact->prompt); +} + +const std::string SaslInteraction::getChallenge() const +{ + return std::string(m_interact->challenge); +} + +const std::string SaslInteraction::getDefaultResult() const +{ + return std::string(m_interact->defresult); +} + +void SaslInteraction::setResult(const std::string &res) +{ + m_result = res; + m_interact->result = m_result.data(); + m_interact->len = m_result.size(); +} diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/SaslInteraction.h openldap2.3-2.4.9/contrib/ldapc++/src/SaslInteraction.h --- openldap2.3-2.4.7/contrib/ldapc++/src/SaslInteraction.h 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/SaslInteraction.h 2008-04-14 19:09:26.000000000 -0400 @@ -0,0 +1,29 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/SaslInteraction.h,v 1.1.2.2 2008/04/14 23:09:26 quanah Exp $ +/* + * Copyright 2007, OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + +#ifndef SASL_INTERACTION_H +#define SASL_INTERACTION_H + +#include +#include + +class SaslInteraction { + public: + SaslInteraction( sasl_interact_t *interact ); + ~SaslInteraction(); + unsigned long getId() const; + const std::string getPrompt() const; + const std::string getChallenge() const; + const std::string getDefaultResult() const; + + void setResult(const std::string &res); + + private: + sasl_interact_t *m_interact; + std::string m_result; + +}; +#endif /* SASL_INTERACTION_H */ diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/SaslInteractionHandler.cpp openldap2.3-2.4.9/contrib/ldapc++/src/SaslInteractionHandler.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/SaslInteractionHandler.cpp 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/SaslInteractionHandler.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -0,0 +1,99 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/SaslInteractionHandler.cpp,v 1.3.2.2 2008/04/14 23:09:26 quanah Exp $ +/* + * Copyright 2007, OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + +#include +#include +#include +#include "config.h" + +#ifdef HAVE_TERMIOS_H +#include +#endif + +#include +#include "SaslInteractionHandler.h" +#include "SaslInteraction.h" +#include "debug.h" + +void DefaultSaslInteractionHandler::handleInteractions( + const std::list &cb ) +{ + DEBUG(LDAP_DEBUG_TRACE, "DefaultSaslInteractionHandler::handleCallbacks()" + << std::endl ); + std::list::const_iterator i; + + for (i = cb.begin(); i != cb.end(); i++ ) { + bool noecho; + + cleanupList.push_back(*i); + + std::cout << (*i)->getPrompt(); + if (! (*i)->getDefaultResult().empty() ) { + std::cout << "(" << (*i)->getDefaultResult() << ")" ; + } + std:: cout << ": "; + + switch ( (*i)->getId() ) { + case SASL_CB_PASS: + case SASL_CB_ECHOPROMPT: + noecho = true; + noecho = true; + break; + default: + noecho = false; + break; + } +#ifdef HAVE_TERMIOS_H + /* turn off terminal echo if needed */ + struct termios old_attr; + if ( noecho ) { + struct termios attr; + if (tcgetattr(STDIN_FILENO, &attr) < 0) { + perror("tcgetattr"); + } + + /* save terminal attributes */ + memcpy(&old_attr, &attr, sizeof(attr)); + + /* disable echo */ + attr.c_lflag &= ~(ECHO); + + /* write attributes to terminal */ + if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &attr) < 0) { + perror("tcsetattr"); + } + } +#endif /* HAVE_TERMIOS_H */ + std::string input; + std::cin >> std::noskipws >> input; + std::cin >> std::skipws; + (*i)->setResult(input); + if( std::cin.fail() ) { + std::cin.clear(); + } + /* ignore the rest of the input line */ + std::cin.ignore(std::numeric_limits::max(), '\n'); + +#ifdef HAVE_TERMIOS_H + /* restore terminal settings */ + if ( noecho ) { + tcsetattr(STDIN_FILENO, TCSANOW, &old_attr); + std::cout << std::endl; + } +#endif /* HAVE_TERMIOS_H */ + } +} + +DefaultSaslInteractionHandler::~DefaultSaslInteractionHandler() +{ + DEBUG(LDAP_DEBUG_TRACE, "DefaultSaslInteractionHandler::~DefaultSaslInteractionHandler()" + << std::endl ); + + std::list::const_iterator i; + for (i = cleanupList.begin(); i != cleanupList.end(); i++ ) { + delete(*i); + } +} diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/SaslInteractionHandler.h openldap2.3-2.4.9/contrib/ldapc++/src/SaslInteractionHandler.h --- openldap2.3-2.4.7/contrib/ldapc++/src/SaslInteractionHandler.h 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/SaslInteractionHandler.h 2008-04-14 19:09:26.000000000 -0400 @@ -0,0 +1,27 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/SaslInteractionHandler.h,v 1.1.2.2 2008/04/14 23:09:26 quanah Exp $ +/* + * Copyright 2007, OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + +#ifndef SASL_INTERACTION_HANDLER_H +#define SASL_INTERACTION_HANDLER_H +#include + +class SaslInteraction; + +class SaslInteractionHandler { + public: + virtual void handleInteractions( const std::list &cb )=0; + virtual ~SaslInteractionHandler() {} +}; + +class DefaultSaslInteractionHandler { + public: + virtual void handleInteractions( const std::list &cb ); + virtual ~DefaultSaslInteractionHandler(); + + private: + std::list cleanupList; +}; +#endif /* SASL_INTERACTION_HANDLER_H */ diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/StringList.cpp openldap2.3-2.4.9/contrib/ldapc++/src/StringList.cpp --- openldap2.3-2.4.7/contrib/ldapc++/src/StringList.cpp 2007-11-20 13:08:43.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/StringList.cpp 2008-04-14 19:09:26.000000000 -0400 @@ -1,5 +1,6 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/StringList.cpp,v 1.6.6.2 2008/04/14 23:09:26 quanah Exp $ /* - * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. + * Copyright 2000-2007, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ diff -Nru openldap2.3-2.4.7/contrib/ldapc++/src/StringList.h openldap2.3-2.4.9/contrib/ldapc++/src/StringList.h --- openldap2.3-2.4.7/contrib/ldapc++/src/StringList.h 2004-02-03 11:11:17.000000000 -0500 +++ openldap2.3-2.4.9/contrib/ldapc++/src/StringList.h 2008-04-14 19:09:26.000000000 -0400 @@ -1,3 +1,4 @@ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/StringList.h,v 1.7.6.1 2008/04/14 23:09:26 quanah Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/acl/posixgroup.c openldap2.3-2.4.9/contrib/slapd-modules/acl/posixgroup.c --- openldap2.3-2.4.7/contrib/slapd-modules/acl/posixgroup.c 2007-08-31 19:13:51.000000000 -0400 +++ openldap2.3-2.4.9/contrib/slapd-modules/acl/posixgroup.c 2008-02-11 18:26:38.000000000 -0500 @@ -1,6 +1,6 @@ -/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/acl/posixgroup.c,v 1.3.2.3 2007/08/31 23:13:51 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/acl/posixgroup.c,v 1.3.2.4 2008/02/11 23:26:38 kurt Exp $ */ /* - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/acl/README openldap2.3-2.4.9/contrib/slapd-modules/acl/README --- openldap2.3-2.4.7/contrib/slapd-modules/acl/README 2007-02-13 15:22:03.000000000 -0500 +++ openldap2.3-2.4.9/contrib/slapd-modules/acl/README 2008-02-11 18:26:38.000000000 -0500 @@ -1,4 +1,4 @@ -Copyright 2005-2007 The OpenLDAP Foundation. All rights reserved. +Copyright 2005-2008 The OpenLDAP Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted only as authorized by the OpenLDAP diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/allop/allop.c openldap2.3-2.4.9/contrib/slapd-modules/allop/allop.c --- openldap2.3-2.4.7/contrib/slapd-modules/allop/allop.c 2007-08-31 19:13:51.000000000 -0400 +++ openldap2.3-2.4.9/contrib/slapd-modules/allop/allop.c 2008-02-11 18:26:38.000000000 -0500 @@ -1,8 +1,8 @@ /* allop.c - returns all operational attributes when appropriate */ -/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/allop/allop.c,v 1.3.2.2 2007/08/31 23:13:51 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/allop/allop.c,v 1.3.2.3 2008/02/11 23:26:38 kurt Exp $ */ /* This work is part of OpenLDAP Software . * - * Copyright 2005-2007 The OpenLDAP Foundation. + * Copyright 2005-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/allop/README openldap2.3-2.4.9/contrib/slapd-modules/allop/README --- openldap2.3-2.4.7/contrib/slapd-modules/allop/README 2007-02-13 15:22:03.000000000 -0500 +++ openldap2.3-2.4.9/contrib/slapd-modules/allop/README 2008-02-11 18:26:38.000000000 -0500 @@ -1,4 +1,4 @@ -Copyright 2004-2007 The OpenLDAP Foundation. All rights reserved. +Copyright 2004-2008 The OpenLDAP Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted only as authorized by the OpenLDAP diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/allop/slapo-allop.5 openldap2.3-2.4.9/contrib/slapd-modules/allop/slapo-allop.5 --- openldap2.3-2.4.7/contrib/slapd-modules/allop/slapo-allop.5 2007-08-31 19:13:51.000000000 -0400 +++ openldap2.3-2.4.9/contrib/slapd-modules/allop/slapo-allop.5 2008-02-11 18:26:38.000000000 -0500 @@ -1,7 +1,7 @@ .TH SLAPO-ALLOP 5 "RELEASEDATE" "OpenLDAP LDVERSION" -.\" Copyright 2005-2007 The OpenLDAP Foundation All Rights Reserved. +.\" Copyright 2005-2008 The OpenLDAP Foundation All Rights Reserved. .\" Copying restrictions apply. See COPYRIGHT/LICENSE. -.\" $OpenLDAP: pkg/ldap/contrib/slapd-modules/allop/slapo-allop.5,v 1.2.2.2 2007/08/31 23:13:51 quanah Exp $ +.\" $OpenLDAP: pkg/ldap/contrib/slapd-modules/allop/slapo-allop.5,v 1.2.2.3 2008/02/11 23:26:38 kurt Exp $ .SH NAME slapo-allop \- All Operational Attributes overlay .SH SYNOPSIS diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/autogroup/autogroup.c openldap2.3-2.4.9/contrib/slapd-modules/autogroup/autogroup.c --- openldap2.3-2.4.7/contrib/slapd-modules/autogroup/autogroup.c 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/contrib/slapd-modules/autogroup/autogroup.c 2008-02-08 18:00:43.000000000 -0500 @@ -0,0 +1,1615 @@ +/* autogroup.c - automatic group overlay */ +/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/autogroup/autogroup.c,v 1.2.2.1 2008/02/08 23:00:43 quanah Exp $ */ +/* + * Copyright 2007 Michał Szulczyński. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted only as authorized by the OpenLDAP + * Public License. + * + * A copy of this license is available in the file LICENSE in the + * top-level directory of the distribution or, alternatively, at + * . + */ + +#include "portable.h" + +#include + +#include + +#include "slap.h" +#include "config.h" +#include "lutil.h" + +/* Filter represents the memberURL of a group. */ +typedef struct autogroup_filter_t { + struct berval agf_dn; /* The base DN in memberURL */ + struct berval agf_ndn; + struct berval agf_filterstr; + Filter *agf_filter; + int agf_scope; + struct autogroup_filter_t *agf_next; +} autogroup_filter_t; + +/* Description of group attributes. */ +typedef struct autogroup_def_t { + ObjectClass *agd_oc; + AttributeDescription *agd_member_url_ad; + AttributeDescription *agd_member_ad; + struct autogroup_def_t *agd_next; +} autogroup_def_t; + +/* Represents the group entry. */ +typedef struct autogroup_entry_t { + BerValue age_dn; + BerValue age_ndn; + autogroup_filter_t *age_filter; /* List of filters made from memberURLs */ + autogroup_def_t *age_def; /* Attribute definition */ + ldap_pvt_thread_mutex_t age_mutex; + struct autogroup_entry_t *age_next; +} autogroup_entry_t; + +/* Holds pointers to attribute definitions and groups. */ +typedef struct autogroup_info_t { + autogroup_def_t *agi_def; /* Group attributes definitions. */ + autogroup_entry_t *agi_entry; /* Group entries. */ + ldap_pvt_thread_mutex_t agi_mutex; +} autogroup_info_t; + +/* Search callback for adding groups initially. */ +typedef struct autogroup_sc_t { + autogroup_info_t *ags_info; /* Group definitions and entries. */ + autogroup_def_t *ags_def; /* Attributes definition of the group being added. */ +} autogroup_sc_t; + +/* Used for adding members, found when searching, to a group. */ +typedef struct autogroup_ga_t { + autogroup_entry_t *agg_group; /* The group to which the members will be added. */ + Entry *agg_entry; /* Used in autogroup_member_search_cb to modify + this entry with the search results. */ + + Modifications *agg_mod; /* Used in autogroup_member_search_modify_cb to hold the + search results which will be added to the group. */ + + Modifications *agg_mod_last; /* Used in autogroup_member_search_modify_cb so we don't + have to search for the last mod added. */ +} autogroup_ga_t; + + +/* +** dn, ndn - the DN of the member to add +** age - the group to which the member DN will be added +*/ +static int +autogroup_add_member_to_group( Operation *op, BerValue *dn, BerValue *ndn, autogroup_entry_t *age ) +{ + slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; + Modifications modlist; + SlapReply sreply = {REP_RESULT}; + BerValue vals[ 2 ], nvals[ 2 ]; + slap_callback cb = { NULL, slap_null_cb, NULL, NULL }; + Operation o = *op; + + Debug(LDAP_DEBUG_TRACE, "==> autogroup_add_member_to_group adding <%s> to <%s>\n", + dn->bv_val, age->age_dn.bv_val, 0); + + assert( dn != NULL ); + assert( ndn != NULL ); + + vals[ 0 ] = *dn; + BER_BVZERO( &vals[ 1 ] ); + nvals[ 0 ] = *ndn; + BER_BVZERO( &nvals[ 1 ] ); + + modlist.sml_op = LDAP_MOD_ADD; + modlist.sml_desc = age->age_def->agd_member_ad; + modlist.sml_type = age->age_def->agd_member_ad->ad_cname; + modlist.sml_values = vals; + modlist.sml_nvalues = nvals; + modlist.sml_numvals = 1; + modlist.sml_flags = SLAP_MOD_INTERNAL; + modlist.sml_next = NULL; + + o.o_tag = LDAP_REQ_MODIFY; + o.o_callback = &cb; + o.orm_modlist = &modlist; + o.o_req_dn = age->age_dn; + o.o_req_ndn = age->age_ndn; + o.o_permissive_modify = 1; + o.o_managedsait = SLAP_CONTROL_CRITICAL; + o.o_relax = SLAP_CONTROL_CRITICAL; + + o.o_bd->bd_info = (BackendInfo *)on->on_info; + (void)op->o_bd->be_modify( &o, &sreply ); + o.o_bd->bd_info = (BackendInfo *)on; + + return sreply.sr_err; +} + +/* +** dn,ndn - the DN to be deleted +** age - the group from which the DN will be deleted +** If we pass a NULL dn and ndn, all members are deleted from the group. +*/ +static int +autogroup_delete_member_from_group( Operation *op, BerValue *dn, BerValue *ndn, autogroup_entry_t *age ) +{ + slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; + Modifications modlist; + SlapReply sreply = {REP_RESULT}; + BerValue vals[ 2 ], nvals[ 2 ]; + slap_callback cb = { NULL, slap_null_cb, NULL, NULL }; + Operation o = *op; + + if ( dn == NULL || ndn == NULL ) { + Debug(LDAP_DEBUG_TRACE, "==> autogroup_delete_member_from_group removing all members from <%s>\n", + age->age_dn.bv_val, 0 ,0); + + modlist.sml_values = NULL; + modlist.sml_nvalues = NULL; + modlist.sml_numvals = 0; + } else { + Debug(LDAP_DEBUG_TRACE, "==> autogroup_delete_member_from_group removing <%s> from <%s>\n", + dn->bv_val, age->age_dn.bv_val, 0); + + vals[ 0 ] = *dn; + BER_BVZERO( &vals[ 1 ] ); + nvals[ 0 ] = *ndn; + BER_BVZERO( &nvals[ 1 ] ); + + modlist.sml_values = vals; + modlist.sml_nvalues = nvals; + modlist.sml_numvals = 1; + } + + + modlist.sml_op = LDAP_MOD_DELETE; + modlist.sml_desc = age->age_def->agd_member_ad; + modlist.sml_type = age->age_def->agd_member_ad->ad_cname; + modlist.sml_flags = SLAP_MOD_INTERNAL; + modlist.sml_next = NULL; + + o.o_callback = &cb; + o.o_tag = LDAP_REQ_MODIFY; + o.orm_modlist = &modlist; + o.o_req_dn = age->age_dn; + o.o_req_ndn = age->age_ndn; + o.o_relax = SLAP_CONTROL_CRITICAL; + o.o_managedsait = SLAP_CONTROL_CRITICAL; + o.o_permissive_modify = 1; + + o.o_bd->bd_info = (BackendInfo *)on->on_info; + (void)op->o_bd->be_modify( &o, &sreply ); + o.o_bd->bd_info = (BackendInfo *)on; + + return sreply.sr_err; +} + +/* +** Callback used to add entries to a group, +** which are going to be written in the database +** (used in bi_op_add) +** The group is passed in autogroup_ga_t->agg_group +*/ +static int +autogroup_member_search_cb( Operation *op, SlapReply *rs ) +{ + slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; + + assert( op->o_tag == LDAP_REQ_SEARCH ); + + if ( rs->sr_type == REP_SEARCH ) { + autogroup_ga_t *agg = (autogroup_ga_t *)op->o_callback->sc_private; + autogroup_entry_t *age = agg->agg_group; + Modification mod; + const char *text = NULL; + char textbuf[1024]; + struct berval vals[ 2 ], nvals[ 2 ]; + + Debug(LDAP_DEBUG_TRACE, "==> autogroup_member_search_cb <%s>\n", + rs->sr_entry ? rs->sr_entry->e_name.bv_val : "UNKNOWN_DN", 0, 0); + + vals[ 0 ] = rs->sr_entry->e_name; + BER_BVZERO( &vals[ 1 ] ); + nvals[ 0 ] = rs->sr_entry->e_nname; + BER_BVZERO( &nvals[ 1 ] ); + + mod.sm_op = LDAP_MOD_ADD; + mod.sm_desc = age->age_def->agd_member_ad; + mod.sm_type = age->age_def->agd_member_ad->ad_cname; + mod.sm_values = vals; + mod.sm_nvalues = nvals; + mod.sm_numvals = 1; + + modify_add_values( agg->agg_entry, &mod, /* permissive */ 1, &text, textbuf, sizeof( textbuf ) ); + } + + return 0; +} + +/* +** Callback used to add entries to a group, which is already in the database. +** (used in on_response) +** The group is passed in autogroup_ga_t->agg_group +** NOTE: Very slow. +*/ +static int +autogroup_member_search_modify_cb( Operation *op, SlapReply *rs ) +{ + slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; + + assert( op->o_tag == LDAP_REQ_SEARCH ); + + if ( rs->sr_type == REP_SEARCH ) { + autogroup_ga_t *agg = (autogroup_ga_t *)op->o_callback->sc_private; + autogroup_entry_t *age = agg->agg_group; + Operation o = *op; + Modifications *modlist; + SlapReply sreply = {REP_RESULT}; + const char *text = NULL; + char textbuf[1024]; + struct berval vals[ 2 ], nvals[ 2 ]; + slap_callback cb = { NULL, slap_null_cb, NULL, NULL }; + + Debug(LDAP_DEBUG_TRACE, "==> autogroup_member_search_modify_cb <%s>\n", + rs->sr_entry ? rs->sr_entry->e_name.bv_val : "UNKNOWN_DN", 0, 0); + + vals[ 0 ] = rs->sr_entry->e_name; + BER_BVZERO( &vals[ 1 ] ); + nvals[ 0 ] = rs->sr_entry->e_nname; + BER_BVZERO( &nvals[ 1 ] ); + + modlist = (Modifications *)ch_calloc( 1, sizeof( Modifications ) ); + + modlist->sml_op = LDAP_MOD_ADD; + modlist->sml_desc = age->age_def->agd_member_ad; + modlist->sml_type = age->age_def->agd_member_ad->ad_cname; + + ber_bvarray_dup_x( &modlist->sml_values, vals, NULL ); + ber_bvarray_dup_x( &modlist->sml_nvalues, nvals, NULL ); + modlist->sml_numvals = 1; + + modlist->sml_flags = SLAP_MOD_INTERNAL; + modlist->sml_next = NULL; + + if ( agg->agg_mod == NULL ) { + agg->agg_mod = modlist; + agg->agg_mod_last = modlist; + } else { + agg->agg_mod_last->sml_next = modlist; + agg->agg_mod_last = modlist; + } + + } + + return 0; +} + + +/* +** Adds all entries matching the passed filter to the specified group. +** If modify == 1, then we modify the group's entry in the database using be_modify. +** If modify == 0, then, we must supply a rw entry for the group, +** because we only modify the entry, without calling be_modify. +** e - the group entry, to which the members will be added +** age - the group +** agf - the filter +*/ +static int +autogroup_add_members_from_filter( Operation *op, Entry *e, autogroup_entry_t *age, autogroup_filter_t *agf, int modify) +{ + slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; + Operation o = *op; + SlapReply rs = { REP_SEARCH }; + slap_callback cb = { 0 }; + slap_callback null_cb = { NULL, slap_null_cb, NULL, NULL }; + autogroup_ga_t agg; + + Debug(LDAP_DEBUG_TRACE, "==> autogroup_add_members_from_filter <%s>\n", + age->age_dn.bv_val, 0, 0); + + o.ors_attrsonly = 0; + o.o_tag = LDAP_REQ_SEARCH; + + o.o_req_dn = agf->agf_dn; + o.o_req_ndn = agf->agf_ndn; + + o.ors_filterstr = agf->agf_filterstr; + o.ors_filter = agf->agf_filter; + + o.ors_scope = agf->agf_scope; + o.ors_deref = LDAP_DEREF_NEVER; + o.ors_limit = NULL; + o.ors_tlimit = SLAP_NO_LIMIT; + o.ors_slimit = SLAP_NO_LIMIT; + o.ors_attrs = slap_anlist_no_attrs; + + agg.agg_group = age; + agg.agg_mod = NULL; + agg.agg_mod_last = NULL; + agg.agg_entry = e; + cb.sc_private = &agg; + + if ( modify == 1 ) { + cb.sc_response = autogroup_member_search_modify_cb; + } else { + cb.sc_response = autogroup_member_search_cb; + } + + cb.sc_cleanup = NULL; + cb.sc_next = NULL; + + o.o_callback = &cb; + + o.o_bd->bd_info = (BackendInfo *)on->on_info; + op->o_bd->be_search( &o, &rs ); + o.o_bd->bd_info = (BackendInfo *)on; + + if ( modify == 1 ) { + o = *op; + o.o_callback = &null_cb; + o.o_tag = LDAP_REQ_MODIFY; + o.orm_modlist = agg.agg_mod; + o.o_req_dn = age->age_dn; + o.o_req_ndn = age->age_ndn; + o.o_relax = SLAP_CONTROL_CRITICAL; + o.o_managedsait = SLAP_CONTROL_NONCRITICAL; + o.o_permissive_modify = 1; + + o.o_bd->bd_info = (BackendInfo *)on->on_info; + (void)op->o_bd->be_modify( &o, &rs ); + o.o_bd->bd_info = (BackendInfo *)on; + + slap_mods_free(agg.agg_mod, 1); + } + + return 0; +} + +/* +** Adds a group to the internal list from the passed entry. +** scan specifies whether to add all maching members to the group. +** modify specifies whether to modify the given group entry (when modify == 0), +** or to modify the group entry in the database (when modify == 1 and e = NULL and ndn != NULL). +** agi - pointer to the groups and the attribute definitions +** agd - the attribute definition of the added group +** e - the entry representing the group, can be NULL if the ndn is specified, and modify == 1 +** ndn - the DN of the group, can be NULL if we give a non-NULL e +*/ +static int +autogroup_add_group( Operation *op, autogroup_info_t *agi, autogroup_def_t *agd, Entry *e, BerValue *ndn, int scan, int modify) +{ + autogroup_entry_t **agep = &agi->agi_entry; + autogroup_filter_t *agf, *agf_prev = NULL; + slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; + LDAPURLDesc *lud = NULL; + Attribute *a; + BerValue *bv, dn; + int rc = 0, match = 1, null_entry = 0; + + if ( e == NULL ) { + if ( overlay_entry_get_ov( op, ndn, NULL, NULL, 0, &e, on ) != + LDAP_SUCCESS || e == NULL ) { + Debug( LDAP_DEBUG_TRACE, "autogroup_add_group: cannot get entry for <%s>\n", ndn->bv_val, 0, 0); + return 1; + } + + null_entry = 1; + } + + Debug(LDAP_DEBUG_TRACE, "==> autogroup_add_group <%s>\n", + e->e_name.bv_val, 0, 0); + + if ( agi->agi_entry != NULL ) { + for ( ; *agep ; agep = &(*agep)->age_next ) { + dnMatch( &match, 0, NULL, NULL, &e->e_nname, &(*agep)->age_ndn ); + if ( match == 0 ) { + Debug( LDAP_DEBUG_TRACE, "autogroup_add_group: group already exists: <%s>\n", e->e_name.bv_val,0,0); + return 1; + } + /* goto last */; + } + } + + + *agep = (autogroup_entry_t *)ch_calloc( 1, sizeof( autogroup_entry_t ) ); + ldap_pvt_thread_mutex_init( &(*agep)->age_mutex ); + (*agep)->age_def = agd; + (*agep)->age_filter = NULL; + + ber_dupbv( &(*agep)->age_dn, &e->e_name ); + ber_dupbv( &(*agep)->age_ndn, &e->e_nname ); + + a = attrs_find( e->e_attrs, agd->agd_member_url_ad ); + + if ( null_entry == 1 ) { + a = attrs_dup( a ); + overlay_entry_release_ov( op, e, 0, on ); + } + + if( a == NULL ) { + Debug( LDAP_DEBUG_TRACE, "autogroup_add_group: group has no memberURL\n", 0,0,0); + } else { + for ( bv = a->a_nvals; !BER_BVISNULL( bv ); bv++ ) { + + agf = (autogroup_filter_t*)ch_calloc( 1, sizeof( autogroup_filter_t ) ); + + if ( ldap_url_parse( bv->bv_val, &lud ) != LDAP_URL_SUCCESS ) { + Debug( LDAP_DEBUG_TRACE, "autogroup_add_group: cannot parse url <%s>\n", bv->bv_val,0,0); + /* FIXME: error? */ + ch_free( agf ); + continue; + } + + agf->agf_scope = lud->lud_scope; + + if ( lud->lud_dn == NULL ) { + BER_BVSTR( &dn, "" ); + } else { + ber_str2bv( lud->lud_dn, 0, 0, &dn ); + } + + rc = dnPrettyNormal( NULL, &dn, &agf->agf_dn, &agf->agf_ndn, NULL ); + if ( rc != LDAP_SUCCESS ) { + Debug( LDAP_DEBUG_TRACE, "autogroup_add_group: cannot normalize DN <%s>\n", dn.bv_val,0,0); + /* FIXME: error? */ + goto cleanup; + } + + if ( lud->lud_filter != NULL ) { + ber_str2bv( lud->lud_filter, 0, 1, &agf->agf_filterstr); + agf->agf_filter = str2filter( lud->lud_filter ); + } + + agf->agf_next = NULL; + + + if( (*agep)->age_filter == NULL ) { + (*agep)->age_filter = agf; + } + + if( agf_prev != NULL ) { + agf_prev->agf_next = agf; + } + + agf_prev = agf; + + if ( scan == 1 ){ + autogroup_add_members_from_filter( op, e, (*agep), agf, modify ); + } + + Debug( LDAP_DEBUG_TRACE, "autogroup_add_group: added memberURL DN <%s> with filter <%s>\n", + agf->agf_ndn.bv_val, agf->agf_filterstr.bv_val, 0); + + ldap_free_urldesc( lud ); + + continue; + + +cleanup:; + + ldap_free_urldesc( lud ); + ch_free( agf ); + } + } + + if ( null_entry == 1 ) { + attrs_free( a ); + } + return rc; +} + +/* +** Used when opening the database to add all existing +** groups from the database to our internal list. +*/ +static int +autogroup_group_add_cb( Operation *op, SlapReply *rs ) +{ + slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; + + assert( op->o_tag == LDAP_REQ_SEARCH ); + + + if ( rs->sr_type == REP_SEARCH ) { + autogroup_sc_t *ags = (autogroup_sc_t *)op->o_callback->sc_private; + + Debug(LDAP_DEBUG_TRACE, "==> autogroup_group_add_cb <%s>\n", + rs->sr_entry ? rs->sr_entry->e_name.bv_val : "UNKNOWN_DN", 0, 0); + + autogroup_add_group( op, ags->ags_info, ags->ags_def, rs->sr_entry, NULL, 0, 0); + } + + return 0; +} + + +/* +** When adding a group, we first strip any existing members, +** and add all which match the filters ourselfs. +*/ +static int +autogroup_add_entry( Operation *op, SlapReply *rs) +{ + slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; + autogroup_info_t *agi = (autogroup_info_t *)on->on_bi.bi_private; + autogroup_def_t *agd = agi->agi_def; + autogroup_entry_t *age = agi->agi_entry; + autogroup_filter_t *agf; + Attribute *a; + int rc = 0; + + Debug( LDAP_DEBUG_TRACE, "==> autogroup_add_entry <%s>\n", + op->ora_e->e_name.bv_val, 0, 0); + + ldap_pvt_thread_mutex_lock( &agi->agi_mutex ); + + /* Check if it's a group. */ + for ( ; agd ; agd = agd->agd_next ) { + if ( is_entry_objectclass_or_sub( op->ora_e, agd->agd_oc ) ) { + Modification mod; + const char *text = NULL; + char textbuf[1024]; + + mod.sm_op = LDAP_MOD_DELETE; + mod.sm_desc = agd->agd_member_ad; + mod.sm_type = agd->agd_member_ad->ad_cname; + mod.sm_values = NULL; + mod.sm_nvalues = NULL; + + /* We don't want any member attributes added by the user. */ + modify_delete_values( op->ora_e, &mod, /* permissive */ 1, &text, textbuf, sizeof( textbuf ) ); + + autogroup_add_group( op, agi, agd, op->ora_e, NULL, 1 , 0); + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + return SLAP_CB_CONTINUE; + } + } + + for ( ; age ; age = age->age_next ) { + ldap_pvt_thread_mutex_lock( &age->age_mutex ); + + /* Check if any of the filters are the suffix to the entry DN. + If yes, we can test that filter against the entry. */ + + for ( agf = age->age_filter; agf ; agf = agf->agf_next ) { + if ( dnIsSuffix( &op->o_req_ndn, &agf->agf_ndn ) ) { + rc = test_filter( op, op->ora_e, agf->agf_filter ); + if ( rc == LDAP_COMPARE_TRUE ) { + autogroup_add_member_to_group( op, &op->ora_e->e_name, &op->ora_e->e_nname, age ); + break; + } + } + } + ldap_pvt_thread_mutex_unlock( &age->age_mutex ); + } + + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + + return SLAP_CB_CONTINUE; +} + +/* +** agi - internal group and attribute definitions list +** e - the group to remove from the internal list +*/ +static int +autogroup_delete_group( autogroup_info_t *agi, autogroup_entry_t *e ) +{ + autogroup_entry_t *age = agi->agi_entry, + *age_prev = NULL, + *age_next; + int rc = 1; + + Debug( LDAP_DEBUG_TRACE, "==> autogroup_delete_group <%s>\n", + age->age_dn.bv_val, 0, 0); + + for ( age_next = age ; age_next ; age_prev = age, age = age_next ) { + age_next = age->age_next; + + if ( age == e ) { + autogroup_filter_t *agf = age->age_filter, + *agf_next; + + if ( age_prev != NULL ) { + age_prev->age_next = age_next; + } else { + agi->agi_entry = NULL; + } + + ch_free( age->age_dn.bv_val ); + ch_free( age->age_ndn.bv_val ); + + for( agf_next = agf ; agf_next ; agf = agf_next ){ + agf_next = agf->agf_next; + + filter_free( agf->agf_filter ); + ch_free( agf->agf_filterstr.bv_val ); + ch_free( agf->agf_dn.bv_val ); + ch_free( agf->agf_ndn.bv_val ); + } + + ldap_pvt_thread_mutex_unlock( &age->age_mutex ); + ldap_pvt_thread_mutex_destroy( &age->age_mutex ); + ch_free( age ); + + rc = 0; + return rc; + + } + } + + Debug( LDAP_DEBUG_TRACE, "autogroup_delete_group: group <%s> not found, should not happen\n", age->age_dn.bv_val, 0, 0); + + return rc; + +} + +static int +autogroup_delete_entry( Operation *op, SlapReply *rs) +{ + slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; + autogroup_info_t *agi = (autogroup_info_t *)on->on_bi.bi_private; + autogroup_def_t *agd = agi->agi_def; + autogroup_entry_t *age = agi->agi_entry, + *age_prev, *age_next; + autogroup_filter_t *agf; + Entry *e; + int matched_group = 0, rc = 0; + + Debug( LDAP_DEBUG_TRACE, "==> autogroup_delete_entry <%s>\n", op->o_req_dn.bv_val, 0, 0); + + ldap_pvt_thread_mutex_lock( &agi->agi_mutex ); + + if ( overlay_entry_get_ov( op, &op->o_req_ndn, NULL, NULL, 0, &e, on ) != + LDAP_SUCCESS || e == NULL ) { + Debug( LDAP_DEBUG_TRACE, "autogroup_delete_entry: cannot get entry for <%s>\n", op->o_req_dn.bv_val, 0, 0); + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + return SLAP_CB_CONTINUE; + } + + /* Check if the entry to be deleted is one of our groups. */ + for ( age_next = age ; age_next ; age_prev = age, age = age_next ) { + ldap_pvt_thread_mutex_lock( &age->age_mutex ); + age_next = age->age_next; + + if ( is_entry_objectclass_or_sub( e, age->age_def->agd_oc ) ) { + int match = 1; + + matched_group = 1; + + dnMatch( &match, 0, NULL, NULL, &e->e_nname, &age->age_ndn ); + + if ( match == 0 ) { + autogroup_filter_t *agf = age->age_filter, + *agf_next; + + autogroup_delete_group( agi, age ); + break; + } + } + + ldap_pvt_thread_mutex_unlock( &age->age_mutex ); + } + + if ( matched_group == 1 ) { + overlay_entry_release_ov( op, e, 0, on ); + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + return SLAP_CB_CONTINUE; + } + + /* Check if the entry matches any of the groups. + If yes, we can delete the entry from that group. */ + + for ( age = agi->agi_entry ; age ; age = age->age_next ) { + ldap_pvt_thread_mutex_lock( &age->age_mutex ); + + for ( agf = age->age_filter; agf ; agf = agf->agf_next ) { + if ( dnIsSuffix( &op->o_req_ndn, &agf->agf_ndn ) ) { + rc = test_filter( op, e, agf->agf_filter ); + if ( rc == LDAP_COMPARE_TRUE ) { + autogroup_delete_member_from_group( op, &e->e_name, &e->e_nname, age ); + break; + } + } + } + ldap_pvt_thread_mutex_unlock( &age->age_mutex ); + } + + overlay_entry_release_ov( op, e, 0, on ); + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + + return SLAP_CB_CONTINUE; +} + +static int +autogroup_response( Operation *op, SlapReply *rs ) +{ + slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; + autogroup_info_t *agi = (autogroup_info_t *)on->on_bi.bi_private; + autogroup_def_t *agd = agi->agi_def; + autogroup_entry_t *age = agi->agi_entry; + autogroup_filter_t *agf; + BerValue new_dn, new_ndn, pdn; + Entry *e, *group; + Attribute *a; + int is_olddn, is_newdn, dn_equal; + + if ( op->o_tag == LDAP_REQ_MODRDN ) { + if ( rs->sr_type == REP_RESULT && rs->sr_err == LDAP_SUCCESS && !get_manageDSAit( op )) { + + Debug( LDAP_DEBUG_TRACE, "==> autogroup_response MODRDN from <%s>\n", op->o_req_dn.bv_val, 0, 0); + + ldap_pvt_thread_mutex_lock( &agi->agi_mutex ); + + if ( op->oq_modrdn.rs_newSup ) { + pdn = *op->oq_modrdn.rs_newSup; + } else { + dnParent( &op->o_req_dn, &pdn ); + } + build_new_dn( &new_dn, &pdn, &op->orr_newrdn, op->o_tmpmemctx ); + + if ( op->oq_modrdn.rs_nnewSup ) { + pdn = *op->oq_modrdn.rs_nnewSup; + } else { + dnParent( &op->o_req_ndn, &pdn ); + } + build_new_dn( &new_ndn, &pdn, &op->orr_nnewrdn, op->o_tmpmemctx ); + + Debug( LDAP_DEBUG_TRACE, "autogroup_response MODRDN to <%s>\n", new_dn.bv_val, 0, 0); + + dnMatch( &dn_equal, 0, NULL, NULL, &op->o_req_ndn, &new_ndn ); + + if ( overlay_entry_get_ov( op, &new_ndn, NULL, NULL, 0, &e, on ) != + LDAP_SUCCESS || e == NULL ) { + Debug( LDAP_DEBUG_TRACE, "autogroup_response MODRDN cannot get entry for <%s>\n", new_dn.bv_val, 0, 0); + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + return SLAP_CB_CONTINUE; + } + + a = attrs_find( e->e_attrs, slap_schema.si_ad_objectClass ); + + + if ( a == NULL ) { + Debug( LDAP_DEBUG_TRACE, "autogroup_response MODRDN entry <%s> has no objectClass\n", new_dn.bv_val, 0, 0); + overlay_entry_release_ov( op, e, 0, on ); + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + return SLAP_CB_CONTINUE; + } + + + /* If a groups DN is modified, just update age_dn/ndn of that group with the new DN. */ + for ( ; agd; agd = agd->agd_next ) { + + if ( value_find_ex( slap_schema.si_ad_objectClass, + SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH | + SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH, + a->a_nvals, &agd->agd_oc->soc_cname, + op->o_tmpmemctx ) == 0 ) + { + for ( age = agi->agi_entry ; age ; age = age->age_next ) { + int match = 1; + + dnMatch( &match, 0, NULL, NULL, &age->age_ndn, &op->o_req_ndn ); + if ( match == 0 ) { + Debug( LDAP_DEBUG_TRACE, "autogroup_response MODRDN updating group's DN to <%s>\n", new_dn.bv_val, 0, 0); + ber_dupbv( &age->age_dn, &new_dn ); + ber_dupbv( &age->age_ndn, &new_ndn ); + + op->o_tmpfree( new_dn.bv_val, op->o_tmpmemctx ); + op->o_tmpfree( new_ndn.bv_val, op->o_tmpmemctx ); + overlay_entry_release_ov( op, e, 0, on ); + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + return SLAP_CB_CONTINUE; + } + } + + } + } + + overlay_entry_release_ov( op, e, 0, on ); + + /* For each group: + 1. check if the orginal entry's DN is in the group. + 2. chceck if the any of the group filter's base DN is a suffix of the new DN + + If 1 and 2 are both false, we do nothing. + If 1 and 2 is true, we remove the old DN from the group, and add the new DN. + If 1 is false, and 2 is true, we check the entry against the group's filters, + and add it's DN to the group. + If 1 is true, and 2 is false, we delete the entry's DN from the group. + */ + for ( age = agi->agi_entry ; age ; age = age->age_next ) { + is_olddn = 0; + is_newdn = 0; + + + ldap_pvt_thread_mutex_lock( &age->age_mutex ); + + if ( overlay_entry_get_ov( op, &age->age_ndn, NULL, NULL, 0, &group, on ) != + LDAP_SUCCESS || group == NULL ) { + Debug( LDAP_DEBUG_TRACE, "autogroup_response MODRDN cannot get group entry <%s>\n", age->age_dn.bv_val, 0, 0); + + op->o_tmpfree( new_dn.bv_val, op->o_tmpmemctx ); + op->o_tmpfree( new_ndn.bv_val, op->o_tmpmemctx ); + + ldap_pvt_thread_mutex_unlock( &age->age_mutex ); + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + return SLAP_CB_CONTINUE; + } + + a = attrs_find( group->e_attrs, age->age_def->agd_member_ad ); + + if ( a != NULL ) { + if ( value_find_ex( age->age_def->agd_member_ad, + SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH | + SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH, + a->a_nvals, &op->o_req_ndn, op->o_tmpmemctx ) == 0 ) + { + is_olddn = 1; + } + + } + + overlay_entry_release_ov( op, group, 0, on ); + + for ( agf = age->age_filter ; agf ; agf = agf->agf_next ) { + if ( dnIsSuffix( &new_ndn, &agf->agf_ndn ) ) { + is_newdn = 1; + break; + } + } + + + if ( is_olddn == 1 && is_newdn == 0 ) { + autogroup_delete_member_from_group( op, &op->o_req_dn, &op->o_req_ndn, age ); + } else + if ( is_olddn == 0 && is_newdn == 1 ) { + for ( agf = age->age_filter; agf; agf = agf->agf_next ) { + if ( test_filter( op, e, agf->agf_filter ) == LDAP_COMPARE_TRUE ) { + autogroup_add_member_to_group( op, &new_dn, &new_ndn, age ); + break; + } + } + } else + if ( is_olddn == 1 && is_newdn == 1 && dn_equal != 0 ) { + autogroup_delete_member_from_group( op, &op->o_req_dn, &op->o_req_ndn, age ); + autogroup_add_member_to_group( op, &new_dn, &new_ndn, age ); + } + + ldap_pvt_thread_mutex_unlock( &age->age_mutex ); + } + + op->o_tmpfree( new_dn.bv_val, op->o_tmpmemctx ); + op->o_tmpfree( new_ndn.bv_val, op->o_tmpmemctx ); + + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + } + } + + if ( op->o_tag == LDAP_REQ_MODIFY ) { + if ( rs->sr_type == REP_RESULT && rs->sr_err == LDAP_SUCCESS && !get_manageDSAit( op ) ) { + Debug( LDAP_DEBUG_TRACE, "==> autogroup_response MODIFY <%s>\n", op->o_req_dn.bv_val, 0, 0); + + ldap_pvt_thread_mutex_lock( &agi->agi_mutex ); + + if ( overlay_entry_get_ov( op, &op->o_req_ndn, NULL, NULL, 0, &e, on ) != + LDAP_SUCCESS || e == NULL ) { + Debug( LDAP_DEBUG_TRACE, "autogroup_response MODIFY cannot get entry for <%s>\n", op->o_req_dn.bv_val, 0, 0); + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + return SLAP_CB_CONTINUE; + } + + a = attrs_find( e->e_attrs, slap_schema.si_ad_objectClass ); + + + if ( a == NULL ) { + Debug( LDAP_DEBUG_TRACE, "autogroup_response MODIFY entry <%s> has no objectClass\n", op->o_req_dn.bv_val, 0, 0); + overlay_entry_release_ov( op, e, 0, on ); + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + return SLAP_CB_CONTINUE; + } + + + /* If we modify a group's memberURL, we have to delete all of it's members, + and add them anew, because we cannot tell from which memberURL a member was added. */ + for ( ; agd; agd = agd->agd_next ) { + + if ( value_find_ex( slap_schema.si_ad_objectClass, + SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH | + SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH, + a->a_nvals, &agd->agd_oc->soc_cname, + op->o_tmpmemctx ) == 0 ) + { + Modifications *m; + int match = 1; + + m = op->orm_modlist; + + for ( ; age ; age = age->age_next ) { + ldap_pvt_thread_mutex_lock( &age->age_mutex ); + + dnMatch( &match, 0, NULL, NULL, &op->o_req_ndn, &age->age_ndn ); + + if ( match == 0 ) { + for ( ; m ; m = m->sml_next ) { + if ( m->sml_desc == age->age_def->agd_member_url_ad ) { + autogroup_def_t *group_agd = age->age_def; + Debug( LDAP_DEBUG_TRACE, "autogroup_response MODIFY changing memberURL for group <%s>\n", + op->o_req_dn.bv_val, 0, 0); + + overlay_entry_release_ov( op, e, 0, on ); + + autogroup_delete_member_from_group( op, NULL, NULL, age ); + autogroup_delete_group( agi, age ); + + autogroup_add_group( op, agi, group_agd, NULL, &op->o_req_ndn, 1, 1); + + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + return SLAP_CB_CONTINUE; + } + } + + ldap_pvt_thread_mutex_unlock( &age->age_mutex ); + break; + } + + ldap_pvt_thread_mutex_unlock( &age->age_mutex ); + } + + overlay_entry_release_ov( op, e, 0, on ); + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + return SLAP_CB_CONTINUE; + } + } + + overlay_entry_release_ov( op, e, 0, on ); + + /* When modifing any of the attributes of an entry, we must + check if the entry is in any of our groups, and if + the modified entry maches any of the filters of that group. + + If the entry exists in a group, but the modified attributes do + not match any of the group's filters, we delete the entry from that group. + If the entry doesn't exist in a group, but matches a filter, + we add it to that group. + */ + for ( age = agi->agi_entry ; age ; age = age->age_next ) { + is_olddn = 0; + is_newdn = 0; + + + ldap_pvt_thread_mutex_lock( &age->age_mutex ); + + if ( overlay_entry_get_ov( op, &age->age_ndn, NULL, NULL, 0, &group, on ) != + LDAP_SUCCESS || group == NULL ) { + Debug( LDAP_DEBUG_TRACE, "autogroup_response MODIFY cannot get entry for <%s>\n", + age->age_dn.bv_val, 0, 0); + + ldap_pvt_thread_mutex_unlock( &age->age_mutex ); + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + return SLAP_CB_CONTINUE; + } + + a = attrs_find( group->e_attrs, age->age_def->agd_member_ad ); + + if ( a != NULL ) { + if ( value_find_ex( age->age_def->agd_member_ad, + SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH | + SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH, + a->a_nvals, &op->o_req_ndn, op->o_tmpmemctx ) == 0 ) + { + is_olddn = 1; + } + + } + + overlay_entry_release_ov( op, group, 0, on ); + + for ( agf = age->age_filter ; agf ; agf = agf->agf_next ) { + if ( dnIsSuffix( &op->o_req_ndn, &agf->agf_ndn ) ) { + if ( test_filter( op, e, agf->agf_filter ) == LDAP_COMPARE_TRUE ) { + is_newdn = 1; + break; + } + } + } + + if ( is_olddn == 1 && is_newdn == 0 ) { + autogroup_delete_member_from_group( op, &op->o_req_dn, &op->o_req_ndn, age ); + } else + if ( is_olddn == 0 && is_newdn == 1 ) { + autogroup_add_member_to_group( op, &op->o_req_dn, &op->o_req_ndn, age ); + } + + ldap_pvt_thread_mutex_unlock( &age->age_mutex ); + } + + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + } + } + + return SLAP_CB_CONTINUE; +} + +/* +** When modifing a group, we must deny any modifications to the member attribute, +** because the group would be inconsistent. +*/ +static int +autogroup_modify_entry( Operation *op, SlapReply *rs) +{ + slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; + autogroup_info_t *agi = (autogroup_info_t *)on->on_bi.bi_private; + autogroup_def_t *agd = agi->agi_def; + autogroup_entry_t *age = agi->agi_entry; + Entry *e; + Attribute *a; + + if ( get_manageDSAit( op ) ) { + return SLAP_CB_CONTINUE; + } + + Debug( LDAP_DEBUG_TRACE, "==> autogroup_modify_entry <%s>\n", op->o_req_dn.bv_val, 0, 0); + ldap_pvt_thread_mutex_lock( &agi->agi_mutex ); + + if ( overlay_entry_get_ov( op, &op->o_req_ndn, NULL, NULL, 0, &e, on ) != + LDAP_SUCCESS || e == NULL ) { + Debug( LDAP_DEBUG_TRACE, "autogroup_modify_entry cannot get entry for <%s>\n", op->o_req_dn.bv_val, 0, 0); + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + return SLAP_CB_CONTINUE; + } + + a = attrs_find( e->e_attrs, slap_schema.si_ad_objectClass ); + + if ( a == NULL ) { + Debug( LDAP_DEBUG_TRACE, "autogroup_modify_entry entry <%s> has no objectClass\n", op->o_req_dn.bv_val, 0, 0); + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + return SLAP_CB_CONTINUE; + } + + + for ( ; agd; agd = agd->agd_next ) { + + if ( value_find_ex( slap_schema.si_ad_objectClass, + SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH | + SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH, + a->a_nvals, &agd->agd_oc->soc_cname, + op->o_tmpmemctx ) == 0 ) + { + Modifications *m; + int match = 1; + + m = op->orm_modlist; + + for ( ; age ; age = age->age_next ) { + dnMatch( &match, 0, NULL, NULL, &op->o_req_ndn, &age->age_ndn ); + + if ( match == 0 ) { + for ( ; m ; m = m->sml_next ) { + if ( m->sml_desc == age->age_def->agd_member_ad ) { + overlay_entry_release_ov( op, e, 0, on ); + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + Debug( LDAP_DEBUG_TRACE, "autogroup_modify_entry attempted to modify group's <%s> member attribute\n", op->o_req_dn.bv_val, 0, 0); + send_ldap_error(op, rs, LDAP_CONSTRAINT_VIOLATION, "attempt to modify dynamic group member attribute"); + return LDAP_CONSTRAINT_VIOLATION; + } + } + break; + } + } + + overlay_entry_release_ov( op, e, 0, on ); + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + return SLAP_CB_CONTINUE; + } + } + + overlay_entry_release_ov( op, e, 0, on ); + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + return SLAP_CB_CONTINUE; +} + +/* +** Builds a filter for searching for the +** group entries, according to the objectClass. +*/ +static int +autogroup_build_def_filter( autogroup_def_t *agd, Operation *op ) +{ + char *ptr; + + Debug( LDAP_DEBUG_TRACE, "==> autogroup_build_def_filter\n", 0, 0, 0); + + op->ors_filterstr.bv_len = STRLENOF( "(=)" ) + + slap_schema.si_ad_objectClass->ad_cname.bv_len + + agd->agd_oc->soc_cname.bv_len; + ptr = op->ors_filterstr.bv_val = op->o_tmpalloc( op->ors_filterstr.bv_len + 1, op->o_tmpmemctx ); + *ptr++ = '('; + ptr = lutil_strcopy( ptr, slap_schema.si_ad_objectClass->ad_cname.bv_val ); + *ptr++ = '='; + ptr = lutil_strcopy( ptr, agd->agd_oc->soc_cname.bv_val ); + *ptr++ = ')'; + *ptr = '\0'; + + op->ors_filter = str2filter_x( op, op->ors_filterstr.bv_val ); + + assert( op->ors_filterstr.bv_len == ptr - op->ors_filterstr.bv_val ); + + return 0; +} + +enum { + AG_ATTRSET = 1, + AG_LAST +}; + +static ConfigDriver ag_cfgen; + +static ConfigTable agcfg[] = { + { "autogroup-attrset", "group-oc> , , ' " + "EQUALITY caseIgnoreMatch " + "SYNTAX OMsDirectoryString " + "X-ORDERED 'VALUES' )", + NULL, NULL }, + { NULL, NULL, 0, 0, 0, ARG_IGNORED } +}; + +static ConfigOCs agocs[] = { + { "( OLcfgCtOc:2.1 " + "NAME 'olcAutomaticGroups' " + "DESC 'Automatic groups configuration' " + "SUP olcOverlayConfig " + "MAY olcAGattrSet )", + Cft_Overlay, agcfg, NULL, NULL }, + { NULL, 0, NULL } +}; + + +static int +ag_cfgen( ConfigArgs *c ) +{ + slap_overinst *on = (slap_overinst *)c->bi; + autogroup_info_t *agi = (autogroup_info_t *)on->on_bi.bi_private; + autogroup_def_t *agd; + autogroup_entry_t *age; + + int rc = 0, i; + + Debug( LDAP_DEBUG_TRACE, "==> autogroup_cfgen\n", 0, 0, 0); + + if( agi == NULL ) { + agi = (autogroup_info_t*)ch_calloc( 1, sizeof(autogroup_info_t) ); + ldap_pvt_thread_mutex_init( &agi->agi_mutex ); + agi->agi_def = NULL; + agi->agi_entry = NULL; + on->on_bi.bi_private = (void *)agi; + } + + agd = agi->agi_def; + age = agi->agi_entry; + + if ( c->op == SLAP_CONFIG_EMIT ) { + + ldap_pvt_thread_mutex_lock( &agi->agi_mutex ); + + for ( i = 0 ; agd ; i++, agd = agd->agd_next ) { + struct berval bv; + char *ptr = c->cr_msg; + + assert(agd->agd_oc != NULL); + assert(agd->agd_member_url_ad != NULL); + assert(agd->agd_member_ad != NULL); + + ptr += snprintf( c->cr_msg, sizeof( c->cr_msg ), + SLAP_X_ORDERED_FMT "%s %s %s", i, + agd->agd_oc->soc_cname.bv_val, + agd->agd_member_url_ad->ad_cname.bv_val, + agd->agd_member_ad->ad_cname.bv_val ); + + bv.bv_val = c->cr_msg; + bv.bv_len = ptr - bv.bv_val; + value_add_one ( &c->rvalue_vals, &bv ); + + } + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + + return rc; + + }else if ( c->op == LDAP_MOD_DELETE ) { + if ( c->valx < 0) { + autogroup_def_t *agd_next; + autogroup_entry_t *age_next; + autogroup_filter_t *agf = age->age_filter, + *agf_next; + + ldap_pvt_thread_mutex_lock( &agi->agi_mutex ); + + for ( agd_next = agd; agd_next; agd = agd_next ) { + agd_next = agd->agd_next; + + ch_free( agd ); + } + + for ( age_next = age ; age_next ; age = age_next ) { + age_next = age->age_next; + + ch_free( age->age_dn.bv_val ); + ch_free( age->age_ndn.bv_val ); + + for( agf_next = agf ; agf_next ; agf = agf_next ){ + agf_next = agf->agf_next; + + filter_free( agf->agf_filter ); + ch_free( agf->agf_filterstr.bv_val ); + ch_free( agf->agf_dn.bv_val ); + ch_free( agf->agf_ndn.bv_val ); + } + + ldap_pvt_thread_mutex_init( &age->age_mutex ); + ch_free( age ); + } + + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + + ldap_pvt_thread_mutex_destroy( &agi->agi_mutex ); + ch_free( agi ); + on->on_bi.bi_private = NULL; + + } else { + autogroup_def_t **agdp; + autogroup_entry_t *age_next, *age_prev; + autogroup_filter_t *agf, + *agf_next; + struct berval *bv; + + ldap_pvt_thread_mutex_lock( &agi->agi_mutex ); + + for ( i = 0, agdp = &agi->agi_def; + i < c->valx; i++ ) + { + if ( *agdp == NULL) { + return 1; + } + agdp = &(*agdp)->agd_next; + } + + agd = *agdp; + *agdp = agd->agd_next; + + for ( age_next = age , age_prev = NULL ; age_next ; age_prev = age, age = age_next ) { + age_next = age->age_next; + + if( age->age_def == agd ) { + agf = age->age_filter; + + ch_free( age->age_dn.bv_val ); + ch_free( age->age_ndn.bv_val ); + + for ( agf_next = agf; agf_next ; agf = agf_next ) { + agf_next = agf->agf_next; + filter_free( agf->agf_filter ); + ch_free( agf->agf_filterstr.bv_val ); + ch_free( agf->agf_dn.bv_val ); + ch_free( agf->agf_ndn.bv_val ); + } + + ldap_pvt_thread_mutex_destroy( &age->age_mutex ); + ch_free( age ); + + age = age_prev; + + if( age_prev != NULL ) { + age_prev->age_next = age_next; + } + } + } + + ch_free( agd ); + agd = agi->agi_def; + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + + } + + return rc; + } + + switch(c->type){ + case AG_ATTRSET: { + autogroup_def_t **agdp, + *agd_next = NULL; + ObjectClass *oc = NULL; + AttributeDescription *member_url_ad = NULL, + *member_ad = NULL; + const char *text; + + + oc = oc_find( c->argv[ 1 ] ); + if( oc == NULL ){ + snprintf( c->cr_msg, sizeof( c->cr_msg ), + "\"autogroup-attrset \": " + "unable to find ObjectClass \"%s\"", + c->argv[ 1 ] ); + Debug( LDAP_DEBUG_ANY, "%s: %s.\n", + c->log, c->cr_msg, 0 ); + return 1; + } + + + rc = slap_str2ad( c->argv[ 2 ], &member_url_ad, &text ); + if( rc != LDAP_SUCCESS ) { + snprintf( c->cr_msg, sizeof( c->cr_msg ), + "\"autogroup-attrset \": " + "unable to find AttributeDescription \"%s\"", + c->argv[ 2 ] ); + Debug( LDAP_DEBUG_ANY, "%s: %s.\n", + c->log, c->cr_msg, 0 ); + return 1; + } + + if( !is_at_subtype( member_url_ad->ad_type, slap_schema.si_ad_labeledURI->ad_type ) ) { + snprintf( c->cr_msg, sizeof( c->cr_msg ), + "\"autogroup-attrset \": " + "AttributeDescription \"%s\" ", + "must be of a subtype \"labeledURI\"", + c->argv[ 2 ] ); + Debug( LDAP_DEBUG_ANY, "%s: %s.\n", + c->log, c->cr_msg, 0 ); + return 1; + } + + rc = slap_str2ad( c->argv[3], &member_ad, &text ); + if( rc != LDAP_SUCCESS ) { + snprintf( c->cr_msg, sizeof( c->cr_msg ), + "\"autogroup-attrset \": " + "unable to find AttributeDescription \"%s\"", + c->argv[ 3 ] ); + Debug( LDAP_DEBUG_ANY, "%s: %s.\n", + c->log, c->cr_msg, 0 ); + return 1; + } + + ldap_pvt_thread_mutex_lock( &agi->agi_mutex ); + + for ( agdp = &agi->agi_def ; *agdp ; agdp = &(*agdp)->agd_next ) { + /* The same URL attribute / member attribute pair + * cannot be repeated */ + + if ( (*agdp)->agd_member_url_ad == member_url_ad && (*agdp)->agd_member_ad == member_ad ) { + snprintf( c->cr_msg, sizeof( c->cr_msg ), + "\"autogroup-attrset \": " + "URL attributeDescription \"%s\" already mapped", + member_ad->ad_cname.bv_val ); + Debug( LDAP_DEBUG_ANY, "%s: %s.\n", + c->log, c->cr_msg, 0 ); +/* return 1; //warning*/ + } + } + + if ( c->valx > 0 ) { + int i; + + for ( i = 0, agdp = &agi->agi_def ; + i < c->valx; i++ ) + { + if ( *agdp == NULL ) { + snprintf( c->cr_msg, sizeof( c->cr_msg ), + "\"autogroup-attrset \": " + "invalid index {%d}", + c->valx ); + Debug( LDAP_DEBUG_ANY, "%s: %s.\n", + c->log, c->cr_msg, 0 ); + + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + return 1; + } + agdp = &(*agdp)->agd_next; + } + agd_next = *agdp; + + } else { + for ( agdp = &agi->agi_def; *agdp; + agdp = &(*agdp)->agd_next ) + /* goto last */; + } + + *agdp = (autogroup_def_t *)ch_calloc( 1, sizeof(autogroup_info_t)); + + (*agdp)->agd_oc = oc; + (*agdp)->agd_member_url_ad = member_url_ad; + (*agdp)->agd_member_ad = member_ad; + (*agdp)->agd_next = agd_next; + + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + + } break; + + default: + rc = 1; + break; + } + + return rc; +} + +/* +** Do a search for all the groups in the +** database, and add them to out internal list. +*/ +static int +autogroup_db_open( + BackendDB *be, + ConfigReply *cr ) +{ + slap_overinst *on = (slap_overinst *) be->bd_info, + *on_bd; + autogroup_info_t *agi = on->on_bi.bi_private; + autogroup_def_t *agd; + autogroup_sc_t ags; + Operation *op; + SlapReply rs = { REP_RESULT }; + slap_callback cb = { 0 }; + + void *thrctx = ldap_pvt_thread_pool_context(); + Connection conn = { 0 }; + OperationBuffer opbuf; + BerValue bv; + char *ptr; + int rc = 0; + + Debug( LDAP_DEBUG_TRACE, "==> autogroup_db_open\n", 0, 0, 0); + + connection_fake_init( &conn, &opbuf, thrctx ); + op = &opbuf.ob_op; + + op->ors_attrsonly = 0; + op->o_tag = LDAP_REQ_SEARCH; + op->o_dn = be->be_rootdn; + op->o_ndn = be->be_rootndn; + + op->o_req_dn = be->be_suffix[0]; + op->o_req_ndn = be->be_nsuffix[0]; + + op->ors_scope = LDAP_SCOPE_SUBTREE; + op->ors_deref = LDAP_DEREF_NEVER; + op->ors_limit = NULL; + op->ors_tlimit = SLAP_NO_LIMIT; + op->ors_slimit = SLAP_NO_LIMIT; + op->ors_attrs = slap_anlist_no_attrs; + + op->o_bd = select_backend(&op->o_req_ndn, 0); + + ldap_pvt_thread_mutex_lock( &agi->agi_mutex ); + for (agd = agi->agi_def ; agd ; agd = agd->agd_next) { + + autogroup_build_def_filter(agd, op); + + + ags.ags_info = agi; + ags.ags_def = agd; + cb.sc_private = &ags; + cb.sc_response = autogroup_group_add_cb; + cb.sc_cleanup = NULL; + cb.sc_next = NULL; + + op->o_callback = &cb; + + op->o_bd->bd_info = (BackendInfo *)on->on_info; + op->o_bd->be_search( op, &rs ); + op->o_bd->bd_info = (BackendInfo *)on; + + filter_free_x( op, op->ors_filter ); + op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx ); + } + ldap_pvt_thread_mutex_unlock( &agi->agi_mutex ); + + return 0; +} + +static int +autogroup_db_close( + BackendDB *be, + ConfigReply *cr ) +{ + slap_overinst *on = (slap_overinst *) be->bd_info; + + Debug( LDAP_DEBUG_TRACE, "==> autogroup_db_close\n", 0, 0, 0); + + if ( on->on_bi.bi_private ) { + autogroup_info_t *agi = on->on_bi.bi_private; + autogroup_entry_t *age = agi->agi_entry, + *age_next; + autogroup_filter_t *agf, *agf_next; + + for ( age_next = age; age_next; age = age_next ) { + age_next = age->age_next; + + ch_free( age->age_dn.bv_val ); + ch_free( age->age_ndn.bv_val ); + + agf = age->age_filter; + + for ( agf_next = agf; agf_next; agf = agf_next ) { + agf_next = agf->agf_next; + + filter_free( agf->agf_filter ); + ch_free( agf->agf_filterstr.bv_val ); + ch_free( agf->agf_dn.bv_val ); + ch_free( agf->agf_ndn.bv_val ); + ch_free( agf ); + } + + ldap_pvt_thread_mutex_destroy( &age->age_mutex ); + ch_free( age ); + } + } + + return 0; +} + +static int +autogroup_db_destroy( + BackendDB *be, + ConfigReply *cr ) +{ + slap_overinst *on = (slap_overinst *) be->bd_info; + + Debug( LDAP_DEBUG_TRACE, "==> autogroup_db_destroy\n", 0, 0, 0); + + if ( on->on_bi.bi_private ) { + autogroup_info_t *agi = on->on_bi.bi_private; + autogroup_def_t *agd = agi->agi_def, + *agd_next; + + for ( agd_next = agd; agd_next; agd = agd_next ) { + agd_next = agd->agd_next; + + ch_free( agd ); + } + + ldap_pvt_thread_mutex_destroy( &agi->agi_mutex ); + ch_free( agi ); + } + + return 0; +} + +static slap_overinst autogroup = { { NULL } }; + +static +int +autogroup_initialize(void) +{ + int rc = 0; + autogroup.on_bi.bi_type = "autogroup"; + + autogroup.on_bi.bi_db_open = autogroup_db_open; + autogroup.on_bi.bi_db_close = autogroup_db_close; + autogroup.on_bi.bi_db_destroy = autogroup_db_destroy; + + autogroup.on_bi.bi_op_add = autogroup_add_entry; + autogroup.on_bi.bi_op_delete = autogroup_delete_entry; + autogroup.on_bi.bi_op_modify = autogroup_modify_entry; + + autogroup.on_response = autogroup_response; + + autogroup.on_bi.bi_cf_ocs = agocs; + + rc = config_register_schema( agcfg, agocs ); + if ( rc ) { + return rc; + } + + return overlay_register( &autogroup ); +} + +int +init_module( int argc, char *argv[] ) +{ + return autogroup_initialize(); +} diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/autogroup/COPYRIGHT openldap2.3-2.4.9/contrib/slapd-modules/autogroup/COPYRIGHT --- openldap2.3-2.4.7/contrib/slapd-modules/autogroup/COPYRIGHT 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/contrib/slapd-modules/autogroup/COPYRIGHT 2008-02-08 18:00:43.000000000 -0500 @@ -0,0 +1,10 @@ +Copyright (C) 2007 Michał Szulczyński. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted only as authorized by the OpenLDAP +Public License. + +A copy of this license is available in file LICENSE in the +top-level directory of the distribution or, alternatively, at +http://www.OpenLDAP.org/license.html. diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/autogroup/Makefile openldap2.3-2.4.9/contrib/slapd-modules/autogroup/Makefile --- openldap2.3-2.4.7/contrib/slapd-modules/autogroup/Makefile 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/contrib/slapd-modules/autogroup/Makefile 2008-02-08 18:00:43.000000000 -0500 @@ -0,0 +1,12 @@ +CPPFLAGS=-I../../../include -I../../../servers/slapd +#LDFLAGS=-L/usr/local/openldap/lib +#LDFLAGS=-L/home/mszulczynski/autogroup/openldap/lib/ +CC=gcc + +all: autogroup.so + +autogroup.so: autogroup.c + $(CC) -shared -fPIC $(CPPFLAGS) $(LDFLAGS) -Wall -o $@ $? + +clean: + rm autogroup.so diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/autogroup/README openldap2.3-2.4.9/contrib/slapd-modules/autogroup/README --- openldap2.3-2.4.7/contrib/slapd-modules/autogroup/README 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/contrib/slapd-modules/autogroup/README 2008-04-14 15:11:17.000000000 -0400 @@ -0,0 +1,72 @@ +autogroup overlay Readme + +DESCRIPTION + The autogroup overlay allows automated updates of group memberships which + meet the requirements of any filter contained in the group definition. + The filters are built from LDAP URI-valued attributes. Any time an object + is added/deleted/updated, it is tested for compliance with the filters, + and its membership is accordingly updated. For searches and compares + it behaves like a static group. + +BUILDING + A Makefile is included. + +CONFIGURATION + # dyngroup.schema: + The dyngroup schema must be modified, adding the 'member' attribute + to the MAY clause of the groupOfURLs object class, i.e.: + + objectClass ( NetscapeLDAPobjectClass:33 + NAME 'groupOfURLs' + SUP top STRUCTURAL + MUST cn + MAY ( memberURL $ businessCategory $ description $ o $ ou $ + owner $ seeAlso $ member) ) + + + # slapd.conf: + + moduleload /path/to/autogroup.so + Loads the overlay (OpenLDAP must be built with --enable-modules). + + overlay autogroup + This directive adds the autogroup overlay to the current database. + + autogroup-attrset + This configuration option is defined for the autogroup overlay. + It may have multiple occurrences, and it must appear after the + overlay directive. + + The value is the name of the objectClass that represents + the group. + + The value is the name of the attributeDescription that + contains the URI that is converted to the filters. If no URI is + present, there will be no members in that group. It must be a subtype + of labeledURI. + + The value is the name of the attributeDescription that + specifies the member attribute. User modification of this attribute + is disabled for consistency. + + +EXAMPLE + ### slapd.conf + include /path/to/dyngroup.schema + # ... + moduleload /path/to/autogroup.so + # ... + + database + # ... + + overlay autogroup + autogroup-attrset groupOfURLs memberURL member + ### end slapd.conf + +CAVEATS + As with static groups, update operations on groups with a large number + of members may be slow. + +ACKNOWLEDGEMENTS + This module was written in 2007 by Michał Szulczyński. diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/comp_match/Makefile openldap2.3-2.4.9/contrib/slapd-modules/comp_match/Makefile --- openldap2.3-2.4.7/contrib/slapd-modules/comp_match/Makefile 2007-08-31 19:13:51.000000000 -0400 +++ openldap2.3-2.4.9/contrib/slapd-modules/comp_match/Makefile 2008-02-11 18:26:38.000000000 -0500 @@ -1,7 +1,7 @@ -# $OpenLDAP: pkg/ldap/contrib/slapd-modules/comp_match/Makefile,v 1.11.2.2 2007/08/31 23:13:51 quanah Exp $ +# $OpenLDAP: pkg/ldap/contrib/slapd-modules/comp_match/Makefile,v 1.11.2.3 2008/02/11 23:26:38 kurt Exp $ # This work is part of OpenLDAP Software . # -# Copyright 2003-2007 The OpenLDAP Foundation. +# Copyright 2003-2008 The OpenLDAP Foundation. # Portions Copyright 2004 by IBM Corporation. # All rights reserved. diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/denyop/denyop.c openldap2.3-2.4.9/contrib/slapd-modules/denyop/denyop.c --- openldap2.3-2.4.7/contrib/slapd-modules/denyop/denyop.c 2007-08-31 19:13:51.000000000 -0400 +++ openldap2.3-2.4.9/contrib/slapd-modules/denyop/denyop.c 2008-02-11 18:26:38.000000000 -0500 @@ -1,8 +1,8 @@ /* denyop.c - Denies operations */ -/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/denyop/denyop.c,v 1.2.2.2 2007/08/31 23:13:51 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/denyop/denyop.c,v 1.2.2.3 2008/02/11 23:26:38 kurt Exp $ */ /* This work is part of OpenLDAP Software . * - * Copyright 2004-2007 The OpenLDAP Foundation. + * Copyright 2004-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/dsaschema/dsaschema.c openldap2.3-2.4.9/contrib/slapd-modules/dsaschema/dsaschema.c --- openldap2.3-2.4.7/contrib/slapd-modules/dsaschema/dsaschema.c 2007-08-31 19:13:51.000000000 -0400 +++ openldap2.3-2.4.9/contrib/slapd-modules/dsaschema/dsaschema.c 2008-02-11 18:26:38.000000000 -0500 @@ -1,6 +1,6 @@ -/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/dsaschema/dsaschema.c,v 1.5.2.2 2007/08/31 23:13:51 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/dsaschema/dsaschema.c,v 1.5.2.3 2008/02/11 23:26:38 kurt Exp $ */ /* - * Copyright 2004-2007 The OpenLDAP Foundation. + * Copyright 2004-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/dsaschema/README openldap2.3-2.4.9/contrib/slapd-modules/dsaschema/README --- openldap2.3-2.4.7/contrib/slapd-modules/dsaschema/README 2007-02-13 15:22:03.000000000 -0500 +++ openldap2.3-2.4.9/contrib/slapd-modules/dsaschema/README 2008-02-11 18:26:38.000000000 -0500 @@ -1,4 +1,4 @@ -Copyright 2004-2007 The OpenLDAP Foundation. All rights reserved. +Copyright 2004-2008 The OpenLDAP Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted only as authorized by the OpenLDAP diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/lastmod/lastmod.c openldap2.3-2.4.9/contrib/slapd-modules/lastmod/lastmod.c --- openldap2.3-2.4.7/contrib/slapd-modules/lastmod/lastmod.c 2007-08-31 19:13:51.000000000 -0400 +++ openldap2.3-2.4.9/contrib/slapd-modules/lastmod/lastmod.c 2008-02-11 18:26:38.000000000 -0500 @@ -1,8 +1,8 @@ /* lastmod.c - returns last modification info */ -/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/lastmod/lastmod.c,v 1.2.2.2 2007/08/31 23:13:51 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/lastmod/lastmod.c,v 1.2.2.3 2008/02/11 23:26:38 kurt Exp $ */ /* This work is part of OpenLDAP Software . * - * Copyright 2004-2007 The OpenLDAP Foundation. + * Copyright 2004-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/lastmod/slapo-lastmod.5 openldap2.3-2.4.9/contrib/slapd-modules/lastmod/slapo-lastmod.5 --- openldap2.3-2.4.7/contrib/slapd-modules/lastmod/slapo-lastmod.5 2007-02-13 15:22:03.000000000 -0500 +++ openldap2.3-2.4.9/contrib/slapd-modules/lastmod/slapo-lastmod.5 2008-02-11 18:26:38.000000000 -0500 @@ -1,4 +1,4 @@ -.\" Copyright 2004-2007 The OpenLDAP Foundation All Rights Reserved. +.\" Copyright 2004-2008 The OpenLDAP Foundation All Rights Reserved. .\" Copying restrictions apply. See COPYRIGHT/LICENSE. .TH SLAPO_LASTMOD 5 "RELEASEDATE" "OpenLDAP LDVERSION" .SH NAME diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/passwd/kerberos.c openldap2.3-2.4.9/contrib/slapd-modules/passwd/kerberos.c --- openldap2.3-2.4.7/contrib/slapd-modules/passwd/kerberos.c 2007-08-31 19:13:52.000000000 -0400 +++ openldap2.3-2.4.9/contrib/slapd-modules/passwd/kerberos.c 2008-02-11 18:26:38.000000000 -0500 @@ -1,6 +1,6 @@ -/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/passwd/kerberos.c,v 1.5.2.2 2007/08/31 23:13:52 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/passwd/kerberos.c,v 1.5.2.3 2008/02/11 23:26:38 kurt Exp $ */ /* - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/passwd/netscape.c openldap2.3-2.4.9/contrib/slapd-modules/passwd/netscape.c --- openldap2.3-2.4.7/contrib/slapd-modules/passwd/netscape.c 2007-08-31 19:13:52.000000000 -0400 +++ openldap2.3-2.4.9/contrib/slapd-modules/passwd/netscape.c 2008-02-11 18:26:38.000000000 -0500 @@ -1,6 +1,6 @@ -/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/passwd/netscape.c,v 1.5.2.2 2007/08/31 23:13:52 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/passwd/netscape.c,v 1.5.2.3 2008/02/11 23:26:38 kurt Exp $ */ /* - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/passwd/radius.c openldap2.3-2.4.9/contrib/slapd-modules/passwd/radius.c --- openldap2.3-2.4.7/contrib/slapd-modules/passwd/radius.c 2007-08-31 19:13:52.000000000 -0400 +++ openldap2.3-2.4.9/contrib/slapd-modules/passwd/radius.c 2008-02-11 18:26:38.000000000 -0500 @@ -1,6 +1,6 @@ -/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/passwd/radius.c,v 1.2.2.3 2007/08/31 23:13:52 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/passwd/radius.c,v 1.2.2.4 2008/02/11 23:26:38 kurt Exp $ */ /* - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/passwd/README openldap2.3-2.4.9/contrib/slapd-modules/passwd/README --- openldap2.3-2.4.7/contrib/slapd-modules/passwd/README 2007-02-13 15:22:03.000000000 -0500 +++ openldap2.3-2.4.9/contrib/slapd-modules/passwd/README 2008-02-11 18:26:38.000000000 -0500 @@ -1,4 +1,4 @@ -Copyright 2004-2007 The OpenLDAP Foundation. All rights reserved. +Copyright 2004-2008 The OpenLDAP Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted only as authorized by the OpenLDAP diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/smbk5pwd/smbk5pwd.c openldap2.3-2.4.9/contrib/slapd-modules/smbk5pwd/smbk5pwd.c --- openldap2.3-2.4.7/contrib/slapd-modules/smbk5pwd/smbk5pwd.c 2007-10-08 20:18:47.000000000 -0400 +++ openldap2.3-2.4.9/contrib/slapd-modules/smbk5pwd/smbk5pwd.c 2008-04-14 17:58:37.000000000 -0400 @@ -1,5 +1,5 @@ /* smbk5pwd.c - Overlay for managing Samba and Heimdal passwords */ -/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/smbk5pwd/smbk5pwd.c,v 1.17.2.5 2007/10/09 00:18:47 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/smbk5pwd/smbk5pwd.c,v 1.17.2.10 2008/04/14 21:58:37 quanah Exp $ */ /* * Copyright 2004-2005 by Howard Chu, Symas Corp. * All rights reserved. @@ -91,8 +91,8 @@ #ifdef DO_SAMBA /* How many seconds before forcing a password change? */ time_t smb_must_change; - /* How many seconds after allowing a password change? */ - time_t smb_can_change; + /* How many seconds after allowing a password change? */ + time_t smb_can_change; #endif } smbk5pwd_t; @@ -215,7 +215,7 @@ /* clear out the current key */ ldap_pvt_thread_pool_setkey( op->o_threadctx, smbk5pwd_op_cleanup, - NULL, NULL ); + NULL, 0, NULL, NULL ); /* free the callback */ cb = op->o_callback; @@ -234,8 +234,8 @@ */ if ( op->oq_bind.rb_method == LDAP_AUTH_SIMPLE ) { slap_callback *cb; - ldap_pvt_thread_pool_setkey( op->o_threadctx, smbk5pwd_op_cleanup, op, - NULL ); + ldap_pvt_thread_pool_setkey( op->o_threadctx, + smbk5pwd_op_cleanup, op, 0, NULL, NULL ); cb = op->o_tmpcalloc( 1, sizeof(slap_callback), op->o_tmpmemctx ); cb->sc_cleanup = smbk5pwd_op_cleanup; cb->sc_next = op->o_callback; @@ -268,7 +268,7 @@ const struct berval *cred, const char **text ) { - void *ctx; + void *ctx, *op_tmp; Operation *op; int rc; Entry *e; @@ -281,9 +281,10 @@ /* Find our thread context, find our Operation */ ctx = ldap_pvt_thread_pool_context(); - if ( ldap_pvt_thread_pool_getkey( ctx, smbk5pwd_op_cleanup, (void **)&op, NULL ) || - !op ) + if ( ldap_pvt_thread_pool_getkey( ctx, smbk5pwd_op_cleanup, &op_tmp, NULL ) + || !op_tmp ) return LUTIL_PASSWD_ERR; + op = op_tmp; rc = be_entry_get_rw( op, &op->o_req_ndn, NULL, NULL, 0, &e ); if ( rc != LDAP_SUCCESS ) return LUTIL_PASSWD_ERR; @@ -532,9 +533,9 @@ qpw->rs_mods = ml; keys = ch_malloc( 2 * sizeof(struct berval) ); - keys[0].bv_val = ch_malloc( STRLENOF( "9223372036854775807L" ) + 1 ); + keys[0].bv_val = ch_malloc( LDAP_PVT_INTTYPE_CHARS(long) ); keys[0].bv_len = snprintf(keys[0].bv_val, - STRLENOF( "9223372036854775807L" ) + 1, + LDAP_PVT_INTTYPE_CHARS(long), "%ld", slap_get_time()); BER_BVZERO( &keys[1] ); @@ -554,9 +555,9 @@ qpw->rs_mods = ml; keys = ch_malloc( 2 * sizeof(struct berval) ); - keys[0].bv_val = ch_malloc( STRLENOF( "9223372036854775807L" ) + 1 ); + keys[0].bv_val = ch_malloc( LDAP_PVT_INTTYPE_CHARS(long) ); keys[0].bv_len = snprintf(keys[0].bv_val, - STRLENOF( "9223372036854775807L" ) + 1, + LDAP_PVT_INTTYPE_CHARS(long), "%ld", slap_get_time() + pi->smb_must_change); BER_BVZERO( &keys[1] ); @@ -570,28 +571,28 @@ ml->sml_nvalues = NULL; } - if (pi->smb_can_change) - { - ml = ch_malloc(sizeof(Modifications)); - ml->sml_next = qpw->rs_mods; - qpw->rs_mods = ml; - - keys = ch_malloc( 2 * sizeof(struct berval) ); - keys[0].bv_val = ch_malloc( STRLENOF( "9223372036854775807L" ) + 1 ); - keys[0].bv_len = snprintf(keys[0].bv_val, - STRLENOF( "9223372036854775807L" ) + 1, - "%ld", slap_get_time() + pi->smb_can_change); - BER_BVZERO( &keys[1] ); + if (pi->smb_can_change) + { + ml = ch_malloc(sizeof(Modifications)); + ml->sml_next = qpw->rs_mods; + qpw->rs_mods = ml; + + keys = ch_malloc( 2 * sizeof(struct berval) ); + keys[0].bv_val = ch_malloc( LDAP_PVT_INTTYPE_CHARS(long) ); + keys[0].bv_len = snprintf(keys[0].bv_val, + LDAP_PVT_INTTYPE_CHARS(long), + "%ld", slap_get_time() + pi->smb_can_change); + BER_BVZERO( &keys[1] ); - ml->sml_desc = ad_sambaPwdCanChange; - ml->sml_op = LDAP_MOD_REPLACE; + ml->sml_desc = ad_sambaPwdCanChange; + ml->sml_op = LDAP_MOD_REPLACE; #ifdef SLAP_MOD_INTERNAL - ml->sml_flags = SLAP_MOD_INTERNAL; + ml->sml_flags = SLAP_MOD_INTERNAL; #endif - ml->sml_numvals = 1; - ml->sml_values = keys; - ml->sml_nvalues = NULL; - } + ml->sml_numvals = 1; + ml->sml_values = keys; + ml->sml_nvalues = NULL; + } } #endif /* DO_SAMBA */ be_entry_release_r( op, e ); @@ -625,11 +626,11 @@ "( OLcfgCtAt:1.2 NAME 'olcSmbK5PwdMustChange' " "DESC 'Credentials validity interval' " "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL }, - { "smbk5pwd-can-change", "time", - 2, 2, 0, ARG_MAGIC|ARG_INT|PC_SMB_CAN_CHANGE, smbk5pwd_cf_func, - "( OLcfgCtAt:1.3 NAME 'olcSmbK5PwdCanChange' " - "DESC 'Credentials minimum validity interval' " - "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL }, + { "smbk5pwd-can-change", "time", + 2, 2, 0, ARG_MAGIC|ARG_INT|PC_SMB_CAN_CHANGE, smbk5pwd_cf_func, + "( OLcfgCtAt:1.3 NAME 'olcSmbK5PwdCanChange' " + "DESC 'Credentials minimum validity interval' " + "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL }, { NULL, NULL, 0, 0, 0, ARG_IGNORED } }; @@ -676,13 +677,13 @@ #endif /* ! DO_SAMBA */ break; - case PC_SMB_CAN_CHANGE: + case PC_SMB_CAN_CHANGE: #ifdef DO_SAMBA - c->value_int = pi->smb_can_change; + c->value_int = pi->smb_can_change; #else /* ! DO_SAMBA */ - c->value_int = 0; + c->value_int = 0; #endif /* ! DO_SAMBA */ - break; + break; case PC_SMB_ENABLE: c->rvalue_vals = NULL; @@ -843,7 +844,7 @@ { "sambaNTPassword", &ad_sambaNTPassword }, { "sambaPwdLastSet", &ad_sambaPwdLastSet }, { "sambaPwdMustChange", &ad_sambaPwdMustChange }, - { "sambaPwdCanChange", &ad_sambaPwdCanChange }, + { "sambaPwdCanChange", &ad_sambaPwdCanChange }, { NULL } }, #endif /* DO_SAMBA */ diff -Nru openldap2.3-2.4.7/contrib/slapd-modules/trace/trace.c openldap2.3-2.4.9/contrib/slapd-modules/trace/trace.c --- openldap2.3-2.4.7/contrib/slapd-modules/trace/trace.c 2007-08-31 19:13:52.000000000 -0400 +++ openldap2.3-2.4.9/contrib/slapd-modules/trace/trace.c 2008-02-11 18:26:38.000000000 -0500 @@ -1,8 +1,8 @@ /* trace.c - traces overlay invocation */ -/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/trace/trace.c,v 1.2.2.2 2007/08/31 23:13:52 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/trace/trace.c,v 1.2.2.3 2008/02/11 23:26:38 kurt Exp $ */ /* This work is part of OpenLDAP Software . * - * Copyright 2006-2007 The OpenLDAP Foundation. + * Copyright 2006-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/contrib/slapd-tools/README openldap2.3-2.4.9/contrib/slapd-tools/README --- openldap2.3-2.4.7/contrib/slapd-tools/README 2007-02-13 15:22:04.000000000 -0500 +++ openldap2.3-2.4.9/contrib/slapd-tools/README 2008-02-11 18:26:38.000000000 -0500 @@ -1,4 +1,4 @@ -Copyright 2004-2007 The OpenLDAP Foundation. All rights reserved. +Copyright 2004-2008 The OpenLDAP Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted only as authorized by the OpenLDAP diff -Nru openldap2.3-2.4.7/contrib/slapi-plugins/addrdnvalues/README openldap2.3-2.4.9/contrib/slapi-plugins/addrdnvalues/README --- openldap2.3-2.4.7/contrib/slapi-plugins/addrdnvalues/README 2007-02-13 15:22:04.000000000 -0500 +++ openldap2.3-2.4.9/contrib/slapi-plugins/addrdnvalues/README 2008-02-11 18:26:38.000000000 -0500 @@ -1,4 +1,4 @@ -Copyright 2003-2007 The OpenLDAP Foundation. All rights reserved. +Copyright 2003-2008 The OpenLDAP Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted only as authorized by the OpenLDAP diff -Nru openldap2.3-2.4.7/COPYRIGHT openldap2.3-2.4.9/COPYRIGHT --- openldap2.3-2.4.7/COPYRIGHT 2007-08-31 19:13:44.000000000 -0400 +++ openldap2.3-2.4.9/COPYRIGHT 2008-04-14 14:51:02.000000000 -0400 @@ -1,4 +1,4 @@ -Copyright 1998-2007 The OpenLDAP Foundation +Copyright 1998-2008 The OpenLDAP Foundation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ --- -Portions Copyright 1998-2006 Kurt D. Zeilenga. +Portions Copyright 1998-2008 Kurt D. Zeilenga. Portions Copyright 1998-2006 Net Boolean Incorporated. Portions Copyright 2001-2006 IBM Corporation. All rights reserved. @@ -39,8 +39,8 @@ Portions Copyright 1999-2007 Howard Y.H. Chu. Portions Copyright 1999-2007 Symas Corporation. Portions Copyright 1998-2003 Hallvard B. Furuseth. -Portions Copyright 2007 Gavin Henry -Portions Copyright 2007 Suretec Systems +Portions Copyright 2008 Gavin Henry +Portions Copyright 2008 Suretec Systems All rights reserved. Redistribution and use in source and binary forms, with or without diff -Nru openldap2.3-2.4.7/debian/changelog openldap2.3-2.4.9/debian/changelog --- openldap2.3-2.4.7/debian/changelog 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/changelog 2008-06-05 12:53:46.000000000 -0400 @@ -1,18 +1,107 @@ -openldap2.3 (2.4.7-6ubuntu4.2) hardy-proposed; urgency=low +openldap2.3 (2.4.9-1ubuntu1) hardy-proposed; urgency=low - * debian/patches/fix-assertion-io.patch - - Fix ber_flush2 assertion error. (LP: #215904) - * debian/patches/fix-dnpretty-assertion.patch - - Fix dnPrettyNormal assertion error. (LP: #234196) + * 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/rules, debian/slapd.links: use hard links to slapd instead of + symlinks for slap* so these applications aren't confined by apparmor + (LP: #203898) + - debian/patches/fix-assertion-io.patch: Fixes ber_flush2 assertion. + (LP: #215904) + - debian/patches/fix-dnpretty-assertion.patch: Fix dnPrettyNormal assertion + error. (LP: #234196) + - dropped debian/patches/fix-notify-crasher.patch: Fix modify timestamp crashes. + (LP: #220724) + - dropped debian/patches/SECURITY_CVE-2008-0658.patch. Already applied + upstream. + * Added debian/patches/fix-ucred-libc due to changes how newer glibc handle + the ucred struct now. + * Added debian/patches/fix-syncrepl-oops, fixes oops in syncrepl. (LP: #227178) + + -- Chuck Short Fri, 30 May 2008 17:09:53 +0100 + +openldap2.3 (2.4.9-1) unstable; urgency=low + + [ Updated debconf translations ] + * French, thanks to Christian Perrier . + Closes: #471792. + * Finnish, thanks to Esko Arajärvi . Closes: #475238. + * Czech, thanks to Miroslav Kure . + Closes: #480138. + * Basque, thanks to Piarres Beobide . + Closes: #480177. + * Vietnamese, thanks to Clytie Siddall . + Closes: #480181. + * Galician, thanks to Jacobo Tarrio . Closes: #480218. + * Japanese, thanks to Kenshi Muto . Closes: #480247. + * Italian, thanks to Luca Monducci . (Closes: #477718) + * Brazilian Portuguese, thanks to Eder L. Marques + (Closes: #480172) + * Portuguese, thanks to Tiago Fernandes + (Closes: #481126) + * Russian, thanks to Yuri Kozlov (Closes: #481214) + * Dutch, thanks to "cobaco (aka Bart Cornelis)" . + Closes: #483014. + + [ Matthijs Mohlmann ] + * New upstream release. + - Bad entryUUID no longer crashes slapd. (Closes: #471867) + - Fix assertion failure in some modify operations. (Closes: #474161) + - Mention index in slapd.conf's man page. (Closes: #414650) + - Fixes to slapd include handling. (Closes: #457261) + - Fix syncrepl cookie truncation. (Closes: #464024) + - Fix memory allocation in ldap_parse_page_control. (Closes: #464877) + - Fix slapd crash when accessed by multiple threads. (Closes: #479237) + * Acknowledge NMU. + (Closes: #474976, #471225, #475856, #474652, #465875) + * Bump Standards-Version to 3.7.3 + * Add versioned build dependency on libgnutls-dev (Closes: #466558) + + [ Russ Allbery ] + * Use MAXPATHLEN rather than PATH_MAX, since OpenLDAP defines the + former and the latter isn't defined on GNU Hurd. Thanks, Samuel + Thibault. (Closes: #475744) + + -- Matthijs Mohlmann Mon, 26 May 2008 22:34:16 +0200 + +openldap2.3 (2.4.7-6.3) unstable; urgency=low + + * Non-maintainer upload. + * Install all slapd relevant manpages into slapd package. + (closes: #474976) + * Make libldap-2.4-2 conflict against libldap2. (closes: #475856) + + -- Bastian Blank Tue, 29 Apr 2008 18:00:23 +0200 + +openldap2.3 (2.4.7-6.2) unstable; urgency=low + + * Non-maintainer upload to solve release goal issues. + * Add LSB dependency header to init.d scripts (Closes: #474652) - -- Chuck Short Tue, 27 May 2008 08:16:44 -0400 + -- Petter Reinholdtsen Wed, 16 Apr 2008 08:04:49 +0200 -openldap2.3 (2.4.7-6ubuntu4.1) hardy-proposed; urgency=low +openldap2.3 (2.4.7-6.1) unstable; urgency=high - * debian/patches/fix-notify-crasher.patch - - Fix modify timestamp crashes. (LP: #220724) + * Non-maintainer upload by security team. + * Fix possible remote denial of service vulnerability in the BDB backend + via a modrdn operation with a NOOP control + (CVE-2008-0658; Closes: #465875). - -- Chuck Short Thu, 24 Apr 2008 10:38:10 -0400 + -- Nico Golde Tue, 04 Mar 2008 14:34:44 +0100 openldap2.3 (2.4.7-6ubuntu3) hardy; urgency=low diff -Nru openldap2.3-2.4.7/debian/compat openldap2.3-2.4.9/debian/compat --- openldap2.3-2.4.7/debian/compat 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/compat 2008-06-05 12:53:46.000000000 -0400 @@ -1 +1 @@ -5 +6 diff -Nru openldap2.3-2.4.7/debian/control openldap2.3-2.4.9/debian/control --- openldap2.3-2.4.7/debian/control 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/control 2008-06-05 12:53:46.000000000 -0400 @@ -5,12 +5,12 @@ XSBC-Original-Maintainer: Debian OpenLDAP Maintainers Uploaders: Roland Bauerschmidt , Stephen Frost , Steve Langasek , Torsten Landschoff , Matthijs Mohlmann , Russ Allbery Build-Depends: debhelper (>= 5), libdb4.2-dev, libgcrypt-dev, - libgnutls-dev, unixodbc-dev, libncurses5-dev, libperl-dev (>= 5.8.0), + libgnutls-dev (>= 1.7), unixodbc-dev, libncurses5-dev, libperl-dev (>= 5.8.0), libsasl2-dev, libslp-dev, libltdl3-dev (>= 1.4.3), libwrap0-dev, perl, debconf-utils, po-debconf, quilt (>= 0.40), autotools-dev, libtool, automake, autoconf, groff-base Build-Conflicts: libbind-dev, bind-dev, libicu-dev -Standards-Version: 3.7.2.0 +Standards-Version: 3.7.3 Homepage: http://www.openldap.org/ Vcs-Svn: svn://svn.debian.org/pkg-openldap/openldap/trunk Vcs-Browser: http://svn.debian.org/wsvn/pkg-openldap/openldap/trunk @@ -50,7 +50,7 @@ Section: libs Priority: optional Architecture: any -Conflicts: ldap-utils (<= 2.1.23-1) +Conflicts: ldap-utils (<= 2.1.23-1), libldap2 Depends: ${shlibs:Depends} Replaces: libldap2, libldap-2.3-0 Description: OpenLDAP libraries @@ -93,3 +93,14 @@ primarily to permit better backtraces and crash dump analysis after problems with the libraries. GDB will find this debug information automatically. + +#Package: slapd-smbk5pwd +#Section: net +#Priority: extra +#Architecture: any +#Depends: slapd (= ${binary:Version}), libkadm5srv8-heimdal (>= 1.0.1-5), libkrb5-22-heimdal (>= 1.0.1-5), libroken18-heimdal (>= 1.0.1-5), libasn1-8-heimdal (>= 1.0.1-5), libhx509-1-heimdal (>= 1.0.1-5), libhdb9-heimdal (>= 1.0.1-5) +#Description: Keeps Samba and Kerberos passwords in sync within slapd. +# Extends the PasswordModify Extended Operationto update Kerberos keys +# and Samba password hashes for an LDAP user. The Kerberos support is +# written for Heimdal using its hdb-ldap backend. The Samba support is +# written using the Samba 3.0 LDAP schema. diff -Nru openldap2.3-2.4.7/debian/make_smbk5pwd openldap2.3-2.4.9/debian/make_smbk5pwd --- openldap2.3-2.4.7/debian/make_smbk5pwd 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/debian/make_smbk5pwd 2008-06-05 12:53:46.000000000 -0400 @@ -0,0 +1,57 @@ +#! /bin/sh + +set -e + +echo -n "Checking for Heimdal/Samba libs: " +if [ ! -e /usr/lib/libroken.la ]; then + echo '' + echo " Failed, no Heimdal dev files." + exit 30 +else + echo "Found." +fi + +cd contrib/slapd-modules/smbk5pwd + +perl -pi -e " +s/LIBTOOL=..\/..\/..\/libtool/LIBTOOL=..\/..\/..\/debian\/build\/libtool/ ; +s/HEIMDAL_INC=-I\/usr\/heimdal\/include/HEIMDAL_INC=-I\/usr\/include\/gssapi -I\/usr\/include\/kadm5 -I\/usr\/include\/krb5 -I\/usr\/include\/roken/ ; +s/LDAP_INC=-I..\/..\/..\/include -I..\/..\/..\/servers\/slapd/LDAP_INC=-I..\/..\/..\/debian\/build\/include -I..\/..\/..\/debian\/build\/servers\/slapd -I..\/..\/..\/include -I..\/..\/..\/servers\/slapd/ ; +s/HEIMDAL_LIB=-L\/usr\/heimdal\/lib -lkrb5 -lkadm5srv/HEIMDAL_LIB=-L\/usr\/lib -lkrb5 -lkadm5srv/ ; +s/\/usr\/local\/libexec\/openldap/\/usr\/lib\/ldap/ ; +" Makefile + +make + +mv .libs/smbk5pwd.so.0.0.0 . +chmod 755 smbk5pwd.la smbk5pwd.so.0.0.0 + +ln -s smbk5pwd.so.0.0.0 smbk5pwd.so.0.0 +ln -s smbk5pwd.so.0.0 smbk5pwd.so.0 +ln -s smbk5pwd.so.0 smbk5pwd.so + + +perl -pi -e " +s/dlname='smbk5pwd.so.0'/dlname='smbk5pwd.so'/ ; +s/library_names='.*'/library_names='smbk5pwd.so smbk5pwd.so.0 smbk5pwd.so.0.0 smbk5pwd.so.0.0.0'/ ; +" smbk5pwd.la + +gzip --best README +chmod 644 README.gz + +chown root:root * + +mkdir -p ../../../debian/tmp/usr/share/doc/slapd-smbk5pwd/ +cp -p README.gz ../../../debian/tmp/usr/share/doc/slapd-smbk5pwd/ + +mkdir -p ../../../debian/tmp/usr/lib/ldap +mv smbk5pwd.so* smbk5pwd.la ../../../debian/tmp/usr/lib/ldap/ + +gzip -d README.gz +rm smbk5pwd.lo +rm -rf .libs + +cd ../../../ + +exit 0 + diff -Nru openldap2.3-2.4.7/debian/patches/entryCSN-backwards-compatibility openldap2.3-2.4.9/debian/patches/entryCSN-backwards-compatibility --- openldap2.3-2.4.7/debian/patches/entryCSN-backwards-compatibility 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/patches/entryCSN-backwards-compatibility 1969-12-31 19:00:00.000000000 -0500 @@ -1,255 +0,0 @@ -Patch from Pierangelo Masarati - -Support transitioning old entryCSN syntax to the current syntax on -slapadd, fixing a problem reported on upgrades from 2.3.38. (ITS #5348, -Debian bug #462099) - -Patch committed upstream. - -Index: trunk/servers/slapd/schema_init.c -=================================================================== ---- trunk.orig/servers/slapd/schema_init.c -+++ trunk/servers/slapd/schema_init.c -@@ -3561,6 +3561,114 @@ - return hexValidate( NULL, &bv ); - } - -+/* Normalize a CSN in OpenLDAP 2.1 format */ -+static int -+csnNormalize21( -+ slap_mask_t usage, -+ Syntax *syntax, -+ MatchingRule *mr, -+ struct berval *val, -+ struct berval *normalized, -+ void *ctx ) -+{ -+ struct berval gt, cnt, sid, mod; -+ struct berval bv; -+ char buf[ STRLENOF( "YYYYmmddHHMMSS.uuuuuuZ#SSSSSS#SID#ssssss" ) + 1 ]; -+ char *ptr; -+ int i; -+ -+ assert( SLAP_MR_IS_VALUE_OF_SYNTAX( usage ) != 0 ); -+ assert( !BER_BVISEMPTY( val ) ); -+ -+ gt = *val; -+ -+ ptr = ber_bvchr( >, '#' ); -+ if ( ptr == NULL || ptr - gt.bv_val == gt.bv_len ) { -+ return LDAP_INVALID_SYNTAX; -+ } -+ -+ gt.bv_len = ptr - gt.bv_val; -+ if ( gt.bv_len != STRLENOF( "YYYYmmddHH:MM:SSZ" ) ) { -+ return LDAP_INVALID_SYNTAX; -+ } -+ -+ if ( gt.bv_val[ 10 ] != ':' || gt.bv_val[ 13 ] != ':' ) { -+ return LDAP_INVALID_SYNTAX; -+ } -+ -+ cnt.bv_val = ptr + 1; -+ cnt.bv_len = val->bv_len - ( cnt.bv_val - val->bv_val ); -+ -+ ptr = ber_bvchr( &cnt, '#' ); -+ if ( ptr == NULL || ptr - val->bv_val == val->bv_len ) { -+ return LDAP_INVALID_SYNTAX; -+ } -+ -+ cnt.bv_len = ptr - cnt.bv_val; -+ if ( cnt.bv_len != STRLENOF( "0x0000" ) ) { -+ return LDAP_INVALID_SYNTAX; -+ } -+ -+ if ( strncmp( cnt.bv_val, "0x", STRLENOF( "0x" ) ) != 0 ) { -+ return LDAP_INVALID_SYNTAX; -+ } -+ -+ cnt.bv_val += STRLENOF( "0x" ); -+ cnt.bv_len -= STRLENOF( "0x" ); -+ -+ sid.bv_val = ptr + 1; -+ sid.bv_len = val->bv_len - ( sid.bv_val - val->bv_val ); -+ -+ ptr = ber_bvchr( &sid, '#' ); -+ if ( ptr == NULL || ptr - val->bv_val == val->bv_len ) { -+ return LDAP_INVALID_SYNTAX; -+ } -+ -+ sid.bv_len = ptr - sid.bv_val; -+ if ( sid.bv_len != STRLENOF( "0" ) ) { -+ return LDAP_INVALID_SYNTAX; -+ } -+ -+ mod.bv_val = ptr + 1; -+ mod.bv_len = val->bv_len - ( mod.bv_val - val->bv_val ); -+ if ( mod.bv_len != STRLENOF( "0000" ) ) { -+ return LDAP_INVALID_SYNTAX; -+ } -+ -+ bv.bv_len = STRLENOF( "YYYYmmddHHMMSS.uuuuuuZ#SSSSSS#SID#ssssss" ); -+ bv.bv_val = buf; -+ -+ ptr = bv.bv_val; -+ ptr = lutil_strncopy( ptr, gt.bv_val, STRLENOF( "YYYYmmddHH" ) ); -+ ptr = lutil_strncopy( ptr, >.bv_val[ STRLENOF( "YYYYmmddHH:" ) ], -+ STRLENOF( "MM" ) ); -+ ptr = lutil_strncopy( ptr, >.bv_val[ STRLENOF( "YYYYmmddHH:MM:" ) ], -+ STRLENOF( "SS" ) ); -+ ptr = lutil_strcopy( ptr, ".000000Z#00" ); -+ ptr = lutil_strncopy( ptr, cnt.bv_val, cnt.bv_len ); -+ *ptr++ = '#'; -+ *ptr++ = '0'; -+ *ptr++ = '0'; -+ *ptr++ = sid.bv_val[ 0 ]; -+ *ptr++ = '#'; -+ *ptr++ = '0'; -+ *ptr++ = '0'; -+ for ( i = 0; i < mod.bv_len; i++ ) { -+ *ptr++ = TOLOWER( mod.bv_val[ i ] ); -+ } -+ *ptr = '\0'; -+ -+ assert( ptr - bv.bv_val == bv.bv_len ); -+ -+ if ( csnValidate( syntax, &bv ) != LDAP_SUCCESS ) { -+ return LDAP_INVALID_SYNTAX; -+ } -+ -+ ber_dupbv_x( normalized, &bv, ctx ); -+ -+ return LDAP_SUCCESS; -+} -+ - /* Normalize a CSN in OpenLDAP 2.3 format */ - static int - csnNormalize23( -@@ -3572,6 +3680,8 @@ - void *ctx ) - { - struct berval gt, cnt, sid, mod; -+ struct berval bv; -+ char buf[ STRLENOF( "YYYYmmddHHMMSS.uuuuuuZ#SSSSSS#SID#ssssss" ) + 1 ]; - char *ptr; - int i; - -@@ -3586,7 +3696,9 @@ - } - - gt.bv_len = ptr - gt.bv_val; -- assert( gt.bv_len == STRLENOF( "YYYYmmddHHMMSSZ" ) ); -+ if ( gt.bv_len != STRLENOF( "YYYYmmddHHMMSSZ" ) ) { -+ return LDAP_INVALID_SYNTAX; -+ } - - cnt.bv_val = ptr + 1; - cnt.bv_len = val->bv_len - ( cnt.bv_val - val->bv_val ); -@@ -3597,7 +3709,9 @@ - } - - cnt.bv_len = ptr - cnt.bv_val; -- assert( cnt.bv_len == STRLENOF( "000000" ) ); -+ if ( cnt.bv_len != STRLENOF( "000000" ) ) { -+ return LDAP_INVALID_SYNTAX; -+ } - - sid.bv_val = ptr + 1; - sid.bv_len = val->bv_len - ( sid.bv_val - val->bv_val ); -@@ -3608,16 +3722,20 @@ - } - - sid.bv_len = ptr - sid.bv_val; -- assert( sid.bv_len == STRLENOF( "00" ) ); -+ if ( sid.bv_len != STRLENOF( "00" ) ) { -+ return LDAP_INVALID_SYNTAX; -+ } - - mod.bv_val = ptr + 1; - mod.bv_len = val->bv_len - ( mod.bv_val - val->bv_val ); -- assert( mod.bv_len == STRLENOF( "000000" ) ); -+ if ( mod.bv_len != STRLENOF( "000000" ) ) { -+ return LDAP_INVALID_SYNTAX; -+ } - -- normalized->bv_len = STRLENOF( "YYYYmmddHHMMSS.uuuuuuZ#SSSSSS#SID#ssssss" ); -- normalized->bv_val = ber_memalloc_x( normalized->bv_len + 1, ctx ); -+ bv.bv_len = STRLENOF( "YYYYmmddHHMMSS.uuuuuuZ#SSSSSS#SID#ssssss" ); -+ bv.bv_val = buf; - -- ptr = normalized->bv_val; -+ ptr = bv.bv_val; - ptr = lutil_strncopy( ptr, gt.bv_val, gt.bv_len - 1 ); - ptr = lutil_strcopy( ptr, ".000000Z#" ); - ptr = lutil_strncopy( ptr, cnt.bv_val, cnt.bv_len ); -@@ -3632,7 +3750,12 @@ - } - *ptr = '\0'; - -- assert( ptr - normalized->bv_val == normalized->bv_len ); -+ assert( ptr - bv.bv_val == bv.bv_len ); -+ if ( csnValidate( syntax, &bv ) != LDAP_SUCCESS ) { -+ return LDAP_INVALID_SYNTAX; -+ } -+ -+ ber_dupbv_x( normalized, &bv, ctx ); - - return LDAP_SUCCESS; - } -@@ -3666,14 +3789,24 @@ - return csnNormalize23( usage, syntax, mr, val, normalized, ctx ); - } - -- assert( val->bv_len == STRLENOF( "YYYYmmddHHMMSS.uuuuuuZ#SSSSSS#SID#ssssss" ) ); -+ if ( val->bv_len == STRLENOF( "YYYYmmddHH:MM:SSZ#0xSSSS#I#ssss" ) ) { -+ /* Openldap 2.1 */ -+ -+ return csnNormalize21( usage, syntax, mr, val, normalized, ctx ); -+ } -+ -+ if ( val->bv_len != STRLENOF( "YYYYmmddHHMMSS.uuuuuuZ#SSSSSS#SID#ssssss" ) ) { -+ return LDAP_INVALID_SYNTAX; -+ } - - ptr = ber_bvchr( val, '#' ); - if ( ptr == NULL || ptr - val->bv_val == val->bv_len ) { - return LDAP_INVALID_SYNTAX; - } - -- assert( ptr - val->bv_val == STRLENOF( "YYYYmmddHHMMSS.uuuuuuZ" ) ); -+ if ( ptr - val->bv_val != STRLENOF( "YYYYmmddHHMMSS.uuuuuuZ" ) ) { -+ return LDAP_INVALID_SYNTAX; -+ } - - cnt.bv_val = ptr + 1; - cnt.bv_len = val->bv_len - ( cnt.bv_val - val->bv_val ); -@@ -3683,7 +3816,9 @@ - return LDAP_INVALID_SYNTAX; - } - -- assert( ptr - cnt.bv_val == STRLENOF( "000000" ) ); -+ if ( ptr - cnt.bv_val != STRLENOF( "000000" ) ) { -+ return LDAP_INVALID_SYNTAX; -+ } - - sid.bv_val = ptr + 1; - sid.bv_len = val->bv_len - ( sid.bv_val - val->bv_val ); -@@ -3694,12 +3829,16 @@ - } - - sid.bv_len = ptr - sid.bv_val; -- assert( sid.bv_len == STRLENOF( "000" ) ); -+ if ( sid.bv_len != STRLENOF( "000" ) ) { -+ return LDAP_INVALID_SYNTAX; -+ } - - mod.bv_val = ptr + 1; - mod.bv_len = val->bv_len - ( mod.bv_val - val->bv_val ); - -- assert( mod.bv_len == STRLENOF( "000000" ) ); -+ if ( mod.bv_len != STRLENOF( "000000" ) ) { -+ return LDAP_INVALID_SYNTAX; -+ } - - ber_dupbv_x( normalized, val, ctx ); - diff -Nru openldap2.3-2.4.7/debian/patches/fix-notify-crasher.patch openldap2.3-2.4.9/debian/patches/fix-notify-crasher.patch --- openldap2.3-2.4.7/debian/patches/fix-notify-crasher.patch 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/patches/fix-notify-crasher.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,23 +0,0 @@ -diff -Naur openldap-2.4.7.orig/servers/slapd/back-bdb/modify.c openldap-2.4.7/servers/slapd/back-bdb/modify.c ---- openldap-2.4.7.orig/servers/slapd/back-bdb/modify.c 2007-12-10 12:54:46.000000000 -0500 -+++ openldap-2.4.7/servers/slapd/back-bdb/modify.c 2008-04-25 10:13:52.000000000 -0400 -@@ -283,7 +283,7 @@ - /* attribute was completely deleted */ - vals = ap->a_nvals; - } -- if ( !BER_BVISEMPTY( vals )) { -+ if ( !BER_BVISNULL( vals )) { - rc = bdb_index_values( op, tid, ap->a_desc, - vals, e->e_id, SLAP_INDEX_DELETE_OP ); - if ( rc != LDAP_SUCCESS ) { -diff -Naur openldap-2.4.7.orig/servers/slapd/modify.c openldap-2.4.7/servers/slapd/modify.c ---- openldap-2.4.7.orig/servers/slapd/modify.c 2007-09-29 05:55:21.000000000 -0400 -+++ openldap-2.4.7/servers/slapd/modify.c 2008-04-25 10:13:52.000000000 -0400 -@@ -585,6 +585,7 @@ - ml->sml_values[nvals] = pval; - } - } -+ ml->sml_values[nvals].bv_len = 0; - ml->sml_numvals = nvals; - - /* diff -Nru openldap2.3-2.4.7/debian/patches/fix-syncrepl-oops openldap2.3-2.4.9/debian/patches/fix-syncrepl-oops --- openldap2.3-2.4.7/debian/patches/fix-syncrepl-oops 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/debian/patches/fix-syncrepl-oops 2008-06-05 12:53:46.000000000 -0400 @@ -0,0 +1,12 @@ +diff -Naur openldap2.3_2.4.9.orig/servers/slapd/schema_init.c openldap2.3_2.4.9/servers/slapd/schema_init.c +--- openldap2.3_2.4.9.orig/servers/slapd/schema_init.c 2008-04-14 16:01:31.000000000 -0400 ++++ openldap2.3_2.4.9/servers/slapd/schema_init.c 2008-06-03 13:47:45.000000000 -0400 +@@ -2273,6 +2273,8 @@ + + keys[0].bv_len = index_intlen; + keys[0].bv_val = slap_sl_malloc( index_intlen, ctx ); ++ keys[1].bv_len = 0; ++ keys[1].bv_val = NULL; + + iv.bv_len = value->bv_len < index_intlen_strlen + INDEX_INTLEN_CHOP-1 + ? value->bv_len : index_intlen_strlen + INDEX_INTLEN_CHOP-1; diff -Nru openldap2.3-2.4.7/debian/patches/fix-ucred-libc openldap2.3-2.4.9/debian/patches/fix-ucred-libc --- openldap2.3-2.4.7/debian/patches/fix-ucred-libc 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/debian/patches/fix-ucred-libc 2008-06-05 12:53:46.000000000 -0400 @@ -0,0 +1,11 @@ +diff -Naur openldap2.3_2.4.9.orig/libraries/liblutil/getpeereid.c openldap2.3_2.4.9/libraries/liblutil/getpeereid.c +--- openldap2.3_2.4.9.orig/libraries/liblutil/getpeereid.c 2008-02-11 18:26:42.000000000 -0500 ++++ openldap2.3_2.4.9/libraries/liblutil/getpeereid.c 2008-06-02 14:11:28.000000000 -0400 +@@ -13,6 +13,7 @@ + * top-level directory of the distribution or, alternatively, at + * . + */ ++#define _GNU_SOURCE + + #include "portable.h" + diff -Nru openldap2.3-2.4.7/debian/patches/gnutls-ciphers openldap2.3-2.4.9/debian/patches/gnutls-ciphers --- openldap2.3-2.4.7/debian/patches/gnutls-ciphers 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/patches/gnutls-ciphers 2008-06-05 12:53:46.000000000 -0400 @@ -5,10 +5,8 @@ Addresses ITS#5341. -Index: trunk/libraries/libldap/tls.c -=================================================================== ---- trunk.orig/libraries/libldap/tls.c -+++ trunk/libraries/libldap/tls.c +--- openldap.orig/libraries/libldap/tls.c ++++ openldap/libraries/libldap/tls.c @@ -300,6 +300,7 @@ for (i=0; ibi_dbenv_home, + *ptr; + diff -Nru openldap2.3-2.4.7/debian/patches/index-files-created-as-root openldap2.3-2.4.9/debian/patches/index-files-created-as-root --- openldap2.3-2.4.7/debian/patches/index-files-created-as-root 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/patches/index-files-created-as-root 2008-06-05 12:53:46.000000000 -0400 @@ -13,7 +13,7 @@ --- doc/man/man8/slapindex.8.orig +++ doc/man/man8/slapindex.8 -@@ -129,6 +129,10 @@ +@@ -131,6 +131,10 @@ should not be running (at least, not in read-write mode) when you do this to ensure consistency of the database. .LP diff -Nru openldap2.3-2.4.7/debian/patches/libldap_r-link openldap2.3-2.4.9/debian/patches/libldap_r-link --- openldap2.3-2.4.7/debian/patches/libldap_r-link 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/patches/libldap_r-link 1969-12-31 19:00:00.000000000 -0500 @@ -1,15 +0,0 @@ -Link libldap_r directly with the threading libraries. Otherwise, it gets -unversioned references to the pthread symbols, which is a time bomb should -the ABI ever change (as it did with glibc on alpha in the past). - ---- trunk.orig/libraries/libldap_r/Makefile.in -+++ trunk/libraries/libldap_r/Makefile.in -@@ -56,7 +56,7 @@ - XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS) - XXXLIBS = $(LTHREAD_LIBS) - NT_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS) --UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS) -+UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS) $(LTHREAD_LIBS) - - .links : Makefile - @for i in $(XXSRCS); do \ diff -Nru openldap2.3-2.4.7/debian/patches/libldap-symbol-versions openldap2.3-2.4.9/debian/patches/libldap-symbol-versions --- openldap2.3-2.4.7/debian/patches/libldap-symbol-versions 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/patches/libldap-symbol-versions 2008-06-05 12:53:46.000000000 -0400 @@ -100,7 +100,7 @@ +rm -f conftest*])]) --- openldap.orig/configure.in +++ openldap/configure.in -@@ -1858,6 +1858,13 @@ +@@ -1863,6 +1863,13 @@ fi AC_SUBST(LTSTATIC)dnl diff -Nru openldap2.3-2.4.7/debian/patches/sasl-cleartext-strncasecmp openldap2.3-2.4.9/debian/patches/sasl-cleartext-strncasecmp --- openldap2.3-2.4.7/debian/patches/sasl-cleartext-strncasecmp 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/patches/sasl-cleartext-strncasecmp 1969-12-31 19:00:00.000000000 -0500 @@ -1,25 +0,0 @@ -Author: Steve Langasek - -Fix a regression introduced by wholesale replacement of strncasecmp() -with ber_bvstrcasecmp(): this code deliberately used strncasecmp() to -check for {CLEARTEXT} as an initial substring of the userPassword field, -changing this to strcasecmp() breaks the use of the {CLEARTEXT} password -scheme for sasl auth. - -Forwarded as ITS#5368, committed to upstream CVS. - -Index: servers/slapd/sasl.c -=================================================================== ---- servers/slapd/sasl.c (revision 1086) -+++ servers/slapd/sasl.c (working copy) -@@ -237,7 +237,9 @@ - * past the scheme name, skip this value. - */ - #ifdef SLAPD_CLEARTEXT -- if ( !ber_bvstrcasecmp( bv, &sc_cleartext ) ) { -+ if ( !strncasecmp( bv->bv_val, sc_cleartext.bv_val, -+ sc_cleartext.bv_len )) -+ { - struct berval cbv; - cbv.bv_len = bv->bv_len - sc_cleartext.bv_len; - if ( cbv.bv_len > 0 ) { diff -Nru openldap2.3-2.4.7/debian/patches/sasl-default-path openldap2.3-2.4.9/debian/patches/sasl-default-path --- openldap2.3-2.4.7/debian/patches/sasl-default-path 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/patches/sasl-default-path 2008-06-05 12:53:46.000000000 -0400 @@ -14,7 +14,7 @@ #endif /* _LDAP_CONFIG_H */ --- servers/slapd/sasl.c.orig +++ servers/slapd/sasl.c -@@ -1181,12 +1181,38 @@ +@@ -1071,12 +1071,38 @@ }; #endif diff -Nru openldap2.3-2.4.7/debian/patches/series openldap2.3-2.4.9/debian/patches/series --- openldap2.3-2.4.7/debian/patches/series 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/patches/series 2008-06-05 12:53:46.000000000 -0400 @@ -1,6 +1,5 @@ man-slapd -p0 evolution-ntlm -libldap_r-link add-autogen-sh slapi-errorlog-file -p0 ldapi-socket-place -p0 @@ -9,11 +8,9 @@ sasl-default-path -p0 libldap-symbol-versions gnutls-ciphers -entryCSN-backwards-compatibility -slapd-tlsverifyclient-default -p0 getaddrinfo-is-threadsafe -sasl-cleartext-strncasecmp -p0 -SECURITY_CVE-2008-0658.patch -fix-notify-crasher.patch +hurd-path-max +fix-ucred-libc fix-assertion-io.patch fix-dnpretty-assertion.patch +fix-syncrepl-oops diff -Nru openldap2.3-2.4.7/debian/patches/slapd-tlsverifyclient-default openldap2.3-2.4.9/debian/patches/slapd-tlsverifyclient-default --- openldap2.3-2.4.7/debian/patches/slapd-tlsverifyclient-default 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/patches/slapd-tlsverifyclient-default 1969-12-31 19:00:00.000000000 -0500 @@ -1,49 +0,0 @@ -Author: Steve Langasek - -Set the default value for client certificate checking with TLS/SSL in -the per-context options, not in the "global" options which are in fact -never used within slapd. - -Partially addresses Debian bug #462588. - -Forwarded as ITS#5360, committed to upstream CVS. - -Index: servers/slapd/main.c -=================================================================== ---- servers/slapd/main.c (revision 1074) -+++ servers/slapd/main.c (working copy) -@@ -736,6 +736,13 @@ - SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 20 ); - goto destroy; - } -+ /* Library defaults to full certificate checking. This is correct when -+ * a client is verifying a server because all servers should have a -+ * valid cert. But few clients have valid certs, so we want our default -+ * to be no checking. The config file can override this as usual. -+ */ -+ rc = LDAP_OPT_X_TLS_NEVER; -+ (void) ldap_pvt_tls_set_option( slap_tls_ld, LDAP_OPT_X_TLS_REQUIRE_CERT, &rc ); - #endif - - rc = slap_init( serverMode, serverName ); -Index: servers/slapd/init.c -=================================================================== ---- servers/slapd/init.c (revision 1074) -+++ servers/slapd/init.c (working copy) -@@ -179,16 +179,6 @@ - return 1; - } - --#ifdef HAVE_TLS -- /* Library defaults to full certificate checking. This is correct when -- * a client is verifying a server because all servers should have a -- * valid cert. But few clients have valid certs, so we want our default -- * to be no checking. The config file can override this as usual. -- */ -- rc = 0; -- (void) ldap_pvt_tls_set_option( NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &rc ); --#endif -- - if ( frontend_init() ) { - slap_debug |= LDAP_DEBUG_NONE; - Debug( LDAP_DEBUG_ANY, diff -Nru openldap2.3-2.4.7/debian/patches/wrong-database-location openldap2.3-2.4.9/debian/patches/wrong-database-location --- openldap2.3-2.4.7/debian/patches/wrong-database-location 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/patches/wrong-database-location 2008-06-05 12:53:46.000000000 -0400 @@ -5,7 +5,7 @@ --- doc/man/man5/slapd-bdb.5.orig +++ doc/man/man5/slapd-bdb.5 -@@ -97,7 +97,7 @@ +@@ -116,7 +116,7 @@ associated indexes live. A separate directory must be specified for each database. The default is diff -Nru openldap2.3-2.4.7/debian/po/cs.po openldap2.3-2.4.9/debian/po/cs.po --- openldap2.3-2.4.7/debian/po/cs.po 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/po/cs.po 2008-06-05 12:53:46.000000000 -0400 @@ -16,7 +16,7 @@ "Project-Id-Version: openldap2.3\n" "Report-Msgid-Bugs-To: openldap2.3@packages.debian.org\n" "POT-Creation-Date: 2008-02-09 10:32-0800\n" -"PO-Revision-Date: 2008-01-31 21:20+0100\n" +"PO-Revision-Date: 2008-05-08 11:22+0200\n" "Last-Translator: Miroslav Kure \n" "Language-Team: Czech \n" "MIME-Version: 1.0\n" @@ -429,7 +429,7 @@ #. Description #: ../slapd.templates:19001 msgid "TLSCipherSuite values have changed" -msgstr "" +msgstr "Hodnota TLSCipherSuite se změnila" #. Type: error #. Description @@ -440,6 +440,11 @@ "used, which has been changed from OpenSSL to GnuTLS. As a result, your " "existing TLSCipherSuite setting will not work with this package." msgstr "" +"Při aktualizaci byla ve vašem konfiguračním souboru programu slapd nalezena " +"volba „TLSCipherSuite“. Přípustné hodnoty, které můžete v této volbě použít, " +"jsou určeny použitou implementací SSL. Ta se změnila z OpenSSL na GnuTLS, " +"což znamená, že stávající nastavení TLSCipherSuite nebude s tímto balíkem " +"fungovat." #. Type: error #. Description @@ -450,3 +455,7 @@ "output of 'gnutls-cli -l' in the gnutls-bin package for the list of ciphers " "supported by GnuTLS." msgstr "" +"Toto nastavení bylo automaticky zakomentováno. Máte-li speciální požadavky, " +"které vyžadují opětovné zapnutí této volby, zjistěte si prosím seznam šifer " +"podporovaných v GnuTLS (např. příkazem „gnutls-cli -l“, který se nachází v " +"balíku gnutls-bin)." diff -Nru openldap2.3-2.4.7/debian/po/eu.po openldap2.3-2.4.9/debian/po/eu.po --- openldap2.3-2.4.7/debian/po/eu.po 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/debian/po/eu.po 2008-06-05 12:53:46.000000000 -0400 @@ -0,0 +1,454 @@ +# translation of openldap2.3-eu.po to Euskara +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Piarres Beobide , 2008. +msgid "" +msgstr "" +"Project-Id-Version: openldap2.3-eu\n" +"Report-Msgid-Bugs-To: openldap2.3@packages.debian.org\n" +"POT-Creation-Date: 2008-02-09 10:32-0800\n" +"PO-Revision-Date: 2008-05-08 16:41+0200\n" +"Last-Translator: Piarres Beobide \n" +"Language-Team: Euskara \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: boolean +#. Description +#: ../slapd.templates:1001 +msgid "Omit OpenLDAP server configuration?" +msgstr "OpenLDAP zerbitzari konfigurazio alde batetara utzi?" + +#. Type: boolean +#. Description +#: ../slapd.templates:1001 +msgid "" +"If you enable this option, no initial configuration or database will be " +"created for you." +msgstr "" +"Aukera hau gaitzen baduzu ez da hasierako konfigurazio edo datubaserik " +"sortuko." + +#. Type: select +#. Choices +#: ../slapd.templates:2001 +msgid "always" +msgstr "beti" + +#. Type: select +#. Choices +#: ../slapd.templates:2001 +msgid "when needed" +msgstr "beharrezko denean" + +#. Type: select +#. Choices +#: ../slapd.templates:2001 +msgid "never" +msgstr "inoiz" + +#. Type: select +#. Description +#: ../slapd.templates:2002 +msgid "Dump databases to file on upgrade:" +msgstr "Irauli datu-baseak fitxategi batetara bertsio-berritzean:" + +#. Type: select +#. Description +#: ../slapd.templates:2002 +msgid "" +"Before upgrading to a new version of the OpenLDAP server, the data from your " +"LDAP directories can be dumped into plain text files in the standard LDAP " +"Data Interchange Format." +msgstr "" +"OpenLDAP zerbitzariaren bertsio berri batetara bertsio-berritu aurretik, " +"zure LDAP direktorioak testu lau fitxategietara irauliko dira LDAP datu " +"elkartrukatze formatu estandarra erabiliaz." + +#. Type: select +#. Description +#: ../slapd.templates:2002 +msgid "" +"Selecting \"always\" will cause the databases to be dumped unconditionally " +"before an upgrade. Selecting \"when needed\" will only dump the database if " +"the new version is incompatible with the old database format and it needs to " +"be reimported. If you select \"never\", no dump will be done." +msgstr "" +"\"Beti\" hautatuaz datubaseak baldintzarik gabe iraukiko dira bertsio-" +"berritze baten aurretik. \"Beharrezko denean\" hautatuaz bertsio berria " +"datubase formatu zaharrarekin bateragarri ez denean eta berrinportatu behar " +"denean bakarrik irauliko da datubasea. \"Inoiz\" hautatzen baduzu inoiz ez " +"da datubasea irauliko." + +#. Type: string +#. Description +#: ../slapd.templates:3001 +msgid "Directory to use for dumped databases:" +msgstr "Datubaseak iraultzeko erabilioko den direktorioa:" + +#. Type: string +#. Description +#: ../slapd.templates:3001 +msgid "" +"Please specify the directory where the LDAP databases will be exported. In " +"this directory, several LDIF files will be created which correspond to the " +"search bases located on the server. Make sure you have enough free space on " +"the partition where the directory is located. The first occurrence of the " +"string \"VERSION\" is replaced with the server version you are upgrading " +"from." +msgstr "" +"Mesedez zehaztu LDAP esportatzeko erabiliko den direktorioa. Direktorio " +"honetan zerbitzariko datubase ezberdinei dagozkien LDIF fitxategiak sortuko " +"dira. Ziurtatu zaitez direktorioaren partizioan behar duzun bezainbeste leku " +"libre duzula. \"VERSION\" katearen lehenengo agerpena zerbitzariaren " +"jatorrizko bertsio zenbakiagatik ordeztuko da." + +#. Type: boolean +#. Description +#: ../slapd.templates:4001 +msgid "Move old database?" +msgstr "Mugitu datubase zaharra?" + +#. Type: boolean +#. Description +#: ../slapd.templates:4001 +msgid "" +"There are still files in /var/lib/ldap which will probably break the " +"configuration process. If you enable this option, the maintainer scripts " +"will move the old database files out of the way before creating a new " +"database." +msgstr "" +"Konfigurazio prozesua apur dezaketen fitxategiak daude oraindik /var/lib/" +"ldap direktorioan. Aukera hau gaitzen baduzu mantentzailearen skript-ek " +"datubase zaharreko fitxategiak hortik kenduko ditu datubase berria sortu " +"aurretik." + +#. Type: boolean +#. Description +#: ../slapd.templates:5001 +msgid "Retry configuration?" +msgstr "Berriz saiatu konfigurazioa egiten?" + +#. Type: boolean +#. Description +#: ../slapd.templates:5001 +msgid "" +"The configuration you entered is invalid. Make sure that the DNS domain name " +"is syntactically valid, the organization is not left empty and the admin " +"passwords match. If you decide not to retry the configuration the LDAP " +"server will not be set up. Run 'dpkg-reconfigure slapd' if you want to retry " +"later." +msgstr "" +"Zuk sartutako konfigurazioa baliogabea da. Ziurtatu DNS domeinu izena " +"sintaktikoki zuzena dela. erakundea ezin da hutsik egon eta kudeaketa " +"pasahitzak berdinak izan behar dira. Konfigurazioa ez berregitea hautatzen " +"baduzu LDAP zerbitzaria ez da konfiguratuko. Beranduago konfigurazioa egin " +"nahi izanez gero 'dpkg-reconfigure slapd' exekutatu." + +#. Type: string +#. Description +#: ../slapd.templates:6001 +msgid "DNS domain name:" +msgstr "DNS domeinu izena:" + +#. Type: string +#. Description +#: ../slapd.templates:6001 +msgid "" +"The DNS domain name is used to construct the base DN of the LDAP directory. " +"For example, 'foo.example.org' will create the directory with 'dc=foo, " +"dc=example, dc=org' as base DN." +msgstr "" +"DNS domeinu izena LDAP direktorioaren oinarri DN-a eraikitzeko erabiliko da. " +"Adibidez, 'foo.adibide.org' erabiliaz direktorioa DN oinarria 'dc=foo, " +"dc=example, dc=org' delarik sortuko da." + +#. Type: string +#. Description +#: ../slapd.templates:7001 +msgid "Organization name:" +msgstr "Erakunde izena:" + +#. Type: string +#. Description +#: ../slapd.templates:7001 +msgid "" +"Please enter the name of the organization to use in the base DN of your LDAP " +"directory." +msgstr "" +"Mesedez idatzi LDAP direktorioko oinarri DN-an erabiliko den erakunde izena." + +#. Type: password +#. Description +#: ../slapd.templates:8001 +msgid "Administrator password:" +msgstr "Kudeatzaile pasahitza:" + +#. Type: password +#. Description +#: ../slapd.templates:8001 +msgid "Please enter the password for the admin entry in your LDAP directory." +msgstr "Mesedez idatzi zure LDAP direktorioko kudeaketa sarrerarako pasahitza." + +#. Type: password +#. Description +#: ../slapd.templates:9001 +msgid "Confirm password:" +msgstr "Berretsi pasahitza:" + +#. Type: password +#. Description +#: ../slapd.templates:9001 +msgid "" +"Please enter the admin password for your LDAP directory again to verify that " +"you have typed it correctly." +msgstr "" +"Mesedez idatzi zure LDAP direktorioko kudeaketa sarrerarako pasahitza berriz " +"ondo idatzi duzula ziurtatzeko." + +#. Type: note +#. Description +#: ../slapd.templates:10001 +msgid "Password mismatch" +msgstr "Pasahitzak ez dira berdinak" + +#. Type: note +#. Description +#: ../slapd.templates:10001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "Idatzitako bi pasahitzak ez dira berdinak. Mesedez saiatu berriro." + +#. Type: boolean +#. Description +#: ../slapd.templates:11001 +msgid "Do you want the database to be removed when slapd is purged?" +msgstr "Slapd garbitzen bada datubasea ezabatzea nahi al duzu?" + +#. Type: boolean +#. Description +#: ../slapd.templates:13001 +msgid "Allow LDAPv2 protocol?" +msgstr "Onartu LDAPv2 protokoloa?" + +#. Type: boolean +#. Description +#: ../slapd.templates:13001 +msgid "" +"The obsolete LDAPv2 protocol is disabled by default in slapd. Programs and " +"users should upgrade to LDAPv3. If you have old programs which can't use " +"LDAPv3, you should select this option and 'allow bind_v2' will be added to " +"your slapd.conf file." +msgstr "" +"Lehenespen bezala slapd-en LDAPv2 protokolo zaharkitua ezgaiturik dago. " +"Programa eta erabiltzaileak LDAPv3-ra migratu beharko lirateke. LDAPv3 " +"erabili ezin duten programa zaharrak badituzu aukera hau hautatu behar duzun " +"eta slapd.conf fitxategian 'allow bind_v2' gehituko da." + +#. Type: boolean +#. Description +#: ../slapd.templates:14001 +msgid "Back up current database and create a new one?" +msgstr "Dagoen datubasearen babeskopia egin eta berri bat sortu?" + +#. Type: boolean +#. Description +#: ../slapd.templates:14001 +msgid "" +"The directory suffix (domain) you specified doesn't match the one currently " +"in /etc/ldap/slapd.conf. Changing the directory suffix requires moving aside " +"the current LDAP database and creating a new one. Please confirm whether you " +"want to back up and abandon the current database." +msgstr "" +"Zuk zehaztutako direktorio aurrizkia (domeinua) ez da /etc/ldap/slapd.conf " +"fitxategian dagoen berdina. Direktorio aurrizkia aldatzeak dagoen LDAP " +"datubasea alde batera utzi eta berri bat sortzea behar du. Mesedez berretsi " +"babeskopia egin eta datubase zaharra utzi nahi duzun." + +#. Type: error +#. Description +#: ../slapd.templates:15001 +msgid "slapcat failure during upgrade" +msgstr "slapcat hutsa bertsio-berritzean" + +#. Type: error +#. Description +#: ../slapd.templates:15001 +msgid "An error occurred while upgrading the LDAP directory." +msgstr "Errore bat gertatu da LDAP direktorioa bertsio-berritzean." + +#. Type: error +#. Description +#: ../slapd.templates:15001 +msgid "" +"The 'slapcat' program failed while extracting the LDAP directory. This may " +"be caused by an incorrect configuration file (for example, missing " +"'moduleload' lines to support the backend database)." +msgstr "" +"'slapcat' programak huts egin du LDAP direktorioa ateratzean. Hau " +"konfigurazio fitxategi oker bategatik izan daiteke (adibidez, datubase " +"interfazea onartzeko 'moduleload' lerroak falta badira)." + +#. Type: error +#. Description +#. This paragraph is followed by a (non translatable) paragraph +#. containing a command line +#: ../slapd.templates:15001 +msgid "" +"This failure will cause 'slapadd' to fail later as well. The old database " +"files will be moved to /var/backups. If you want to try this upgrade again, " +"you should move the old database files back into place, fix whatever caused " +"slapcat to fail, and run:" +msgstr "" +"Errore honek 'slapdd'-ek lehenago edo beranduago huts egitea eragingo du. " +"Datubase zaharra /var/backups karpetara mugituko da. Bertsio-berritze hau " +"beranduago Ebroz saiatu nahi izanez gero datubase zaharreko fitxategiak " +"atzera lehengo kokagunera mugitu beharko dituzu. slapcat-ek huts egitea " +"eragin duena konpondu eta komando hau exekutatu:" + +#. Type: error +#. Description +#. Translators: keep "$location" unchanged. This is a variable that +#. will be replaced by a directory name at execution +#: ../slapd.templates:15001 +msgid "" +"Then move the database files back to a backup area and then try running " +"slapadd from $location." +msgstr "" +"Orduan mugitu datubasea fitxategiak babeskopia eremu batera eta saiatu " +"slapadd $location-tik exekutatzen." + +#. Type: boolean +#. Description +#: ../slapd.templates:16001 +msgid "Change backend type from LDBM to BDB?" +msgstr "Interfaze mota LDBM-tik BDB-ra aldatu?" + +#. Type: boolean +#. Description +#: ../slapd.templates:16001 +msgid "" +"The LDBM backend type has serious stability problems and has been deprecated " +"by OpenLDAP as of 2.2. It is no longer supported by the OpenLDAP packages." +msgstr "" +"LDBM interfazeak estabilitate arazo handiak ditu eta baztertua izan da " +"OpenLDAP 2.2-tik aurrera. Aurrerantzean ez da onartuko OpenLDAP paketeetan." + +#. Type: boolean +#. Description +#: ../slapd.templates:16001 +msgid "" +"When the BDB backend is used, it must be configured properly. For more " +"information, see /usr/share/doc/slapd/README.DB_CONFIG.gz." +msgstr "" +"BDB interfazea erabiltzen denean behar bezala konfiguratu behar da. Argibide " +"gehiagorako, /usr/share/doc/slapd/README.DB_CONFIG.gz begiratu." + +#. Type: boolean +#. Description +#: ../slapd.templates:16001 +msgid "" +"If you enable this option, an attempt will be made to update the " +"configuration to use BDB instead of LDBM and convert the databases. If you " +"do not enable this option, the upgrade will be aborted." +msgstr "" +"Aukera hau gaitzen baduzu, LDBM ordez BDB erabiltzeko konfigurazio berritze " +"eta datubaseak bihurtzeko saiakera bat egingo da. Aukera hau gaitzen ez " +"baduzu bertsio-berritzea utzia izango da." + +#. Type: select +#. Description +#: ../slapd.templates:17001 +msgid "Database backend to use:" +msgstr "Erabili behar den datubase interfazea:" + +#. Type: select +#. Description +#: ../slapd.templates:17001 +msgid "" +"The HDB backend is recommended. HDB and BDB use similar storage formats, but " +"HDB adds support for subtree renames. Both support the same configuration " +"options." +msgstr "" +"HDB interfazea gomendatzen da. HDM eta BDB interfazeek antzeko biltegiratze " +"formatuak erabiltzen dituzte, baina HDB-ek azpi-zuhaitz berrizendatzea " +"onartzen du. Biek konfigurazio aukera berdinak onartzen dituzte." + +#. Type: select +#. Description +#: ../slapd.templates:17001 +msgid "" +"In either case, you should review the resulting database configuration for " +"your needs. See /usr/share/doc/slapd/README.DB_CONFIG.gz for more details." +msgstr "" +"Edozein kasuetan sortutako datubasea konfigurazioa begiratu beharko zenuke " +"zure beharrei erantzuten diren jakiteko. Begiratu /usr/share/doc/slapd/" +"README.DB_CONFIG.gz xehetasun gehiagorako." + +#. Type: error +#. Description +#: ../slapd.templates:18001 +msgid "slurpd is obsolete; replicas must be reconfigured by hand" +msgstr "slurpd zaharkiturik dago, erreplikak eskuz konfiguratu behar dira" + +#. Type: error +#. Description +#: ../slapd.templates:18001 +msgid "" +"One or more slurpd \"replica\" options were found in your slapd config when " +"upgrading. Because slurpd is obsolete beginning with OpenLDAP 2.4, you will " +"need to migrate your replicas to use the syncrepl protocol instead." +msgstr "" +"Bertsio-berritzean zure slapd konfigurazioan sluprd-ren \"replica\" aukera " +"bat edo gehiago aurkitu da. OpenLDAP2.4-tik aurrera slurpd zaharkiturik " +"dagoenez zure erreplikak horren ordez syncrepl protokoloa erabiltzea aldatu " +"beharko dituzu." + +#. Type: error +#. Description +#: ../slapd.templates:18001 +msgid "" +"The conversion from slurpd to the pull-based syncrepl protocol cannot be " +"done automatically and you will need to configure your replica servers by " +"hand. Please see http://www.openldap.org/doc/admin24/syncrepl.html for " +"details." +msgstr "" +"Slurped-etik ilaratan oinarritutako syncrepl protokolora aldatzeko bihurketa " +"ezin da automatikoki egin, beraz zure erreplika zerbitzariak eskuz " +"konfiguratu beharko dituzu. Mesedez begiratu http://www.openldap.org/doc/" +"admin24/syncrepl.html xehetasun gehiago nahi badituzu." + +#. Type: error +#. Description +#: ../slapd.templates:19001 +msgid "TLSCipherSuite values have changed" +msgstr "TLSCipherSuite balioak aldatu egin dira" + +#. Type: error +#. Description +#: ../slapd.templates:19001 +msgid "" +"A \"TLSCipherSuite\" option was found in your slapd config when upgrading. " +"The values allowed for this option are determined by the SSL implementation " +"used, which has been changed from OpenSSL to GnuTLS. As a result, your " +"existing TLSCipherSuite setting will not work with this package." +msgstr "" +"Bertsio-berritzean \"TLSCipherSuite\" aukera bat topatu da slapd.conf " +"konfigurazioan. Aukera honetan onartzen diren balioak OpenSSL-tik GnuTLS-ra " +"aldatu den SSL inplementazioaren arabera aldatzen dira. Hau dela eta dagoen " +"TLSCipherSuite ezarpenak ez du funtzioantuko pakete honekin." + +#. Type: error +#. Description +#: ../slapd.templates:19001 +msgid "" +"This setting has been automatically commented out for you. If you have " +"specific encryption needs that require this option to be re-enabled, see the " +"output of 'gnutls-cli -l' in the gnutls-bin package for the list of ciphers " +"supported by GnuTLS." +msgstr "" +"Ezarpen hori komentatua izan da. Aukera hau birgaitzea behar duten behar " +"kriptografiko zehatzak baldin badituzu, begiratu gnutls-bin paketeko 'gnutls-" +"cli -l' komandoko irteeran GnuTLS-ek onartzen dituen zifraketen zerrenda." diff -Nru openldap2.3-2.4.7/debian/po/fi.po openldap2.3-2.4.9/debian/po/fi.po --- openldap2.3-2.4.7/debian/po/fi.po 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/po/fi.po 2008-06-05 12:53:46.000000000 -0400 @@ -3,7 +3,7 @@ "Project-Id-Version: openldap2.3\n" "Report-Msgid-Bugs-To: openldap2.3@packages.debian.org\n" "POT-Creation-Date: 2008-02-09 10:32-0800\n" -"PO-Revision-Date: 2008-01-26 23:23+0200\n" +"PO-Revision-Date: 2008-04-09 20:55+0200\n" "Last-Translator: Esko Arajärvi \n" "Language-Team: Finnish \n" "MIME-Version: 1.0\n" @@ -235,9 +235,9 @@ "your slapd.conf file." msgstr "" "Vanhentunut LDAPv2-yhteyskäytäntö on slapdissa oletuksena poissa käytöstä. " -"Ohjelmien ja käyttäjien tulisi päivittää versioon LDAPv3. Jos jotkut vanhat " -"ohjelmat eivät voi käyttää LDAPv3-yhteyskäytäntöä, valitse tämä, jolloin " -"”allow bind_v2” lisätään tiedostoon slapd.conf." +"Järjestelmät ja ohjelmat päivittää käyttämään LDAPv3:a. Jos jotkin vanhat " +"ohjelmat eivät voi käyttää LDAPv3-yhteyskäytäntöä, valitse tämä lisätäksesi " +"asetuksen ”allow bind_v2” tiedostoon slapd.conf" #. Type: boolean #. Description @@ -255,8 +255,8 @@ "want to back up and abandon the current database." msgstr "" "Annettu hakemistopääte (verkkotunnus) ei täsmää tiedostossa /etc/ldap/slapd." -"conf olevaan. Hakemistopäätteen muuttaminen vaatii nykyisen LDAP-tietokannan " -"siirtämistä syrjään ja uuden luomista. Vahvista haluatko tehdä tehdä " +"conf olevaan. Hakemistopäätteen muuttaminen vaatii, että nykyinen LDAP-" +"tietokanta siirretään syrjään ja luodaan uusi. Vahvista haluatko tehdä tehdä " "varmuuskopion nykyisestä tietokannasta ja hylätä sen." #. Type: error @@ -416,7 +416,7 @@ #. Description #: ../slapd.templates:19001 msgid "TLSCipherSuite values have changed" -msgstr "" +msgstr "TLSCipherSuite-arvot ovat muuttuneet" #. Type: error #. Description @@ -427,6 +427,10 @@ "used, which has been changed from OpenSSL to GnuTLS. As a result, your " "existing TLSCipherSuite setting will not work with this package." msgstr "" +"Asetus ”TLSCipherSuite” löydettiin päivitettäessä slapdin asetuksista. Tämän " +"asetuksen sallitut arvot riippuvat käytetystä SSL-toteutuksesta. Käytetty " +"toteutus on vaihdettu OpenSSL:stä GnuTLS:ään. Tämän seurauksena nykyinen " +"TLSCipherSuite-asetus ei toimi tämän paketin kanssa." #. Type: error #. Description @@ -437,3 +441,7 @@ "output of 'gnutls-cli -l' in the gnutls-bin package for the list of ciphers " "supported by GnuTLS." msgstr "" +"Tämä asetus on automaattisesti kommentoitu pois käytöstä. Jos on tarpeen " +"asettaa tietty salaus tällä asetuksella, lista GnuTLS:n tukemista " +"salauksista voidaan tulostaa paketin gnutls-bin avulla komennolla ”gnutls-" +"cli -l”." diff -Nru openldap2.3-2.4.7/debian/po/fr.po openldap2.3-2.4.9/debian/po/fr.po --- openldap2.3-2.4.7/debian/po/fr.po 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/po/fr.po 2008-06-05 12:53:46.000000000 -0400 @@ -8,7 +8,7 @@ "Project-Id-Version: \n" "Report-Msgid-Bugs-To: openldap2.3@packages.debian.org\n" "POT-Creation-Date: 2008-02-09 10:32-0800\n" -"PO-Revision-Date: 2008-01-22 18:10+0100\n" +"PO-Revision-Date: 2008-03-10 19:56+0100\n" "Last-Translator: Christian Perrier \n" "Language-Team: French \n" "MIME-Version: 1.0\n" @@ -78,12 +78,12 @@ "the new version is incompatible with the old database format and it needs to " "be reimported. If you select \"never\", no dump will be done." msgstr "" -"Si vous choisissez l'option « Toujours », les données seront systématiquement " -"exportées avant une mise à niveau. Si vous choisissez « Lorsque nécessaire », " -"elles ne seront exportées que lorsque la nouvelle version utilisera un " -"format incompatible avec l'ancienne, ce qui imposera de réimporter les " -"données. Si vous choisissez « Jamais », les données ne seront jamais " -"exportées." +"Si vous choisissez l'option « Toujours », les données seront " +"systématiquement exportées avant une mise à niveau. Si vous choisissez " +"« Lorsque nécessaire », elles ne seront exportées que lorsque la nouvelle " +"version utilisera un format incompatible avec l'ancienne, ce qui imposera de " +"réimporter les données. Si vous choisissez « Jamais », les données ne seront " +"jamais exportées." #. Type: string #. Description @@ -439,7 +439,7 @@ #. Description #: ../slapd.templates:19001 msgid "TLSCipherSuite values have changed" -msgstr "" +msgstr "Changement des valeurs possibles pour « TLSCipherSuite »" #. Type: error #. Description @@ -450,6 +450,11 @@ "used, which has been changed from OpenSSL to GnuTLS. As a result, your " "existing TLSCipherSuite setting will not work with this package." msgstr "" +"L'option « TLSCipherSuite » a été trouvée dans le fichier de configuration " +"de slapd lors de la mise à niveau. Les valeurs possibles pour cette option " +"dépendent de l'implémentation de SSL qui est utilisée. Comme OpenSSL a été " +"remplacé par GnuTLS, les réglages actuels de « TLSCipherSuite » ne " +"fonctionnent plus avec cette version du paquet." #. Type: error #. Description @@ -460,3 +465,7 @@ "output of 'gnutls-cli -l' in the gnutls-bin package for the list of ciphers " "supported by GnuTLS." msgstr "" +"Ce réglage a été automatiquement mis en commentaire. Si une méthode " +"spécifique de chiffrement impose de la réactiver, vous devriez consulter " +"l'affichage de la commande « gnutls-cli -l » du paquet gnutls-bin pour une " +"liste des méthodes de chiffrement gérées par GnuTLS." diff -Nru openldap2.3-2.4.7/debian/po/gl.po openldap2.3-2.4.9/debian/po/gl.po --- openldap2.3-2.4.7/debian/po/gl.po 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/po/gl.po 2008-06-05 12:53:46.000000000 -0400 @@ -7,7 +7,7 @@ "Project-Id-Version: openldap2.3\n" "Report-Msgid-Bugs-To: openldap2.3@packages.debian.org\n" "POT-Creation-Date: 2008-02-09 10:32-0800\n" -"PO-Revision-Date: 2008-01-28 18:58+0000\n" +"PO-Revision-Date: 2008-05-08 20:39+0100\n" "Last-Translator: Jacobo Tarrio \n" "Language-Team: Galician \n" "MIME-Version: 1.0\n" @@ -424,7 +424,7 @@ #. Description #: ../slapd.templates:19001 msgid "TLSCipherSuite values have changed" -msgstr "" +msgstr "Os valores de TLSCipherSuite cambiaron" #. Type: error #. Description @@ -435,6 +435,11 @@ "used, which has been changed from OpenSSL to GnuTLS. As a result, your " "existing TLSCipherSuite setting will not work with this package." msgstr "" +"Atopouse unha opción \"TLSCipherSuite\" na configuración de slapd ao " +"actualizar. Os valores admitidos para esta opción están determinados pola " +"implementación de SSL en uso, que se cambiou de OpenSSL a GnuTLS. Coma " +"resultado, a configuración actual de TLSCipherSuite non ha funcionar con " +"este paquete." #. Type: error #. Description @@ -445,3 +450,7 @@ "output of 'gnutls-cli -l' in the gnutls-bin package for the list of ciphers " "supported by GnuTLS." msgstr "" +"Anulouse cun comentario esta configuración por vostede. Se ten necesidades " +"de cifrado específicas que precisan de que se volva activar esta opción, " +"consulte a saída de \"gnutls-cli -l\" no paquete gnutls-bin para obter a " +"lista de sistemas de cifrado soportados por GnuTLS." diff -Nru openldap2.3-2.4.7/debian/po/it.po openldap2.3-2.4.9/debian/po/it.po --- openldap2.3-2.4.7/debian/po/it.po 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/po/it.po 2008-06-05 12:53:46.000000000 -0400 @@ -1,14 +1,14 @@ # Italian (it) translation of debconf templates for openldap2.3 # Copyright (C) 2006 Software in the Public Interest # This file is distributed under the same license as the openldap2.3 package. -# Luca Monducci , 2007. +# Luca Monducci , 2007-2008. # msgid "" msgstr "" -"Project-Id-Version: openldap2.3 2.3.38 italian debconf templates\n" +"Project-Id-Version: openldap2.3 2.4.7 italian debconf templates\n" "Report-Msgid-Bugs-To: openldap2.3@packages.debian.org\n" "POT-Creation-Date: 2008-02-09 10:32-0800\n" -"PO-Revision-Date: 2007-11-17 13:43+0100\n" +"PO-Revision-Date: 2008-04-22 21:55+0200\n" "Last-Translator: Luca Monducci \n" "Language-Team: Italian \n" "MIME-Version: 1.0\n" @@ -24,7 +24,6 @@ #. Type: boolean #. Description #: ../slapd.templates:1001 -#, fuzzy msgid "" "If you enable this option, no initial configuration or database will be " "created for you." @@ -59,20 +58,18 @@ #. Type: select #. Description #: ../slapd.templates:2002 -#, fuzzy msgid "" "Before upgrading to a new version of the OpenLDAP server, the data from your " "LDAP directories can be dumped into plain text files in the standard LDAP " "Data Interchange Format." msgstr "" "Prima dell'aggiornamento a una nuova versione del server OpenLDAP, è " -"possibile effettuare il dump delle directory LDAP in dei semplici file di " -"testo LDIF (il formato standard per lo scambio di dati LDAP)." +"possibile effettuare il dump delle proprie directory LDAP in dei semplici " +"file di testo in formato LDIF (lo standard per lo scambio di dati LDAP)." #. Type: select #. Description #: ../slapd.templates:2002 -#, fuzzy msgid "" "Selecting \"always\" will cause the databases to be dumped unconditionally " "before an upgrade. Selecting \"when needed\" will only dump the database if " @@ -82,8 +79,8 @@ "Selezionando \"sempre\" il dump dei database verrà effettuato prima di ogni " "aggiornamento. Con \"quando necessario\" il dump dei database verrà fatto " "solo quando la nuova versione è incompatibile con il vecchio formato del " -"database e quindi deve essere reimportato. Infine con \"mai\" si impedisce " -"la creazione del dump." +"database e quindi deve essere reimportato. Infine con \"mai\" il dump dei " +"database non verrà mai fatto." #. Type: string #. Description @@ -138,7 +135,6 @@ #. Type: boolean #. Description #: ../slapd.templates:5001 -#, fuzzy msgid "" "The configuration you entered is invalid. Make sure that the DNS domain name " "is syntactically valid, the organization is not left empty and the admin " @@ -146,11 +142,11 @@ "server will not be set up. Run 'dpkg-reconfigure slapd' if you want to retry " "later." msgstr "" -"La configurazione inserita non risulta valida. Assicurarsi che il nome di " -"dominio DNS sia corretto, che il nome dell'organizzazione non sia stato " -"lasciato in bianci che le password di amministrazione corrispondano. Se si " -"decide di non riprovare la configurazione, il server LDAP non verrà " -"impostato. In seguito per riprovare la configurazione usare \"dpkg-" +"La configurazione inserita non è valida. Assicurarsi che il nome di dominio " +"DNS sia sintatticamente corretto, che il nome dell'organizzazione non sia " +"stato lasciato in bianco e che le password di amministrazione coincidano. Se " +"si decide di non riprovare la configurazione, il server LDAP non verrà " +"impostato. In seguito, per riprovare la configurazione, usare \"dpkg-" "reconfigure slapd\"." #. Type: string @@ -167,27 +163,25 @@ "For example, 'foo.example.org' will create the directory with 'dc=foo, " "dc=example, dc=org' as base DN." msgstr "" -"Il nome di dominio DNS è usato per costruire il DN di base della directory " +"Il nome di dominio DNS è usato per costruire la base DN della directory " "LDAP. Per esempio \"pippo.esempio.org\" creerà una directory con \"dc=pippo, " -"dc=esempio, dc=org\" come DN di base." +"dc=esempio, dc=org\" come base DN." #. Type: string #. Description #: ../slapd.templates:7001 -#, fuzzy msgid "Organization name:" -msgstr "Organizzazione:" +msgstr "Nome dell'organizzazione:" #. Type: string #. Description #: ../slapd.templates:7001 -#, fuzzy msgid "" "Please enter the name of the organization to use in the base DN of your LDAP " "directory." msgstr "" -"Inserire il nome dell'organizzazione da usare nel DN di base della directory " -"LDAP." +"Inserire il nome dell'organizzazione da usare nella base DN della propria " +"directory LDAP." #. Type: password #. Description @@ -198,9 +192,9 @@ #. Type: password #. Description #: ../slapd.templates:8001 -#, fuzzy msgid "Please enter the password for the admin entry in your LDAP directory." -msgstr "Inserire la password per l'amministratore della directory LDAP." +msgstr "" +"Inserire la password per l'amministratore della propria directory LDAP." #. Type: password #. Description @@ -211,13 +205,12 @@ #. Type: password #. Description #: ../slapd.templates:9001 -#, fuzzy msgid "" "Please enter the admin password for your LDAP directory again to verify that " "you have typed it correctly." msgstr "" -"Inserire di nuovo la password per l'amministratore della directory LDAP, per " -"verificare che sia stata digitata correttamente." +"Inserire di nuovo la password per l'amministratore della propria directory " +"LDAP, per verificare che sia stata digitata correttamente." #. Type: note #. Description @@ -234,9 +227,8 @@ #. Type: boolean #. Description #: ../slapd.templates:11001 -#, fuzzy msgid "Do you want the database to be removed when slapd is purged?" -msgstr "Eliminare il database in caso di rimozione completa del pacchetto?" +msgstr "Eliminare il database in caso di rimozione completa di slapd?" #. Type: boolean #. Description @@ -247,7 +239,6 @@ #. Type: boolean #. Description #: ../slapd.templates:13001 -#, fuzzy msgid "" "The obsolete LDAPv2 protocol is disabled by default in slapd. Programs and " "users should upgrade to LDAPv3. If you have old programs which can't use " @@ -256,8 +247,9 @@ msgstr "" "Con la configurazione predefinita di slapd il vecchio protocollo LDAPv2 è " "disabilitato. I programmi e gli utenti dovrebbero aggiornarsi a LDAPv3. Se " -"qualche vecchio programma non può usare LDAPv3, si dovrebbe accettare così " -"che venga aggiunto \"allow bind_v2\" al file di configurazione slapd.conf." +"si usa qualche vecchio programma che non può usare LDAPv3, si dovrebbe " +"accettare in modo da aggiungere \"allow bind_v2\" al file di configurazione " +"slapd.conf." #. Type: boolean #. Description @@ -277,7 +269,7 @@ "Il suffisso della directory (dominio) specificato non corrisponde a quello " "attualmente presente in /etc/ldap/slapd.conf. La modifica del suffisso della " "directory implica l'accantonamento dell'attuale database LDAP e la creazione " -"di uno nuovo. Confermare se si intende fare un backup e poi abbandonare il " +"di uno nuovo. Confermare l'intenzione di fare un backup e di abbandonare il " "database corrente." #. Type: error @@ -289,23 +281,22 @@ #. Type: error #. Description #: ../slapd.templates:15001 -#, fuzzy msgid "An error occurred while upgrading the LDAP directory." -msgstr "Si è verificato un errore nel aggiornamento della directory LDAP." +msgstr "" +"Si è verificato un errore durante l'aggiornamento della directory LDAP." #. Type: error #. Description #: ../slapd.templates:15001 -#, fuzzy msgid "" "The 'slapcat' program failed while extracting the LDAP directory. This may " "be caused by an incorrect configuration file (for example, missing " "'moduleload' lines to support the backend database)." msgstr "" -"Il programma \"slapcat\", che tenta di estrarre la directory LDAP, ha " -"fallito. L'errore potrebbe essere causato da un file di configurazione " -"sbagliato (per esempio, la mancanza delle righe \"moduleload\" per il " -"supporto al database di backend)." +"Il programma \"slapcat\" ha riportato un errore durante l'estrazione della " +"directory LDAP. L'errore potrebbe essere causato da un file di " +"configurazione sbagliato (per esempio, la mancanza delle righe \"moduleload" +"\" per il supporto al database di backend)." #. Type: error #. Description @@ -318,8 +309,8 @@ "you should move the old database files back into place, fix whatever caused " "slapcat to fail, and run:" msgstr "" -"Questo errore provocherà il successivo fallimento di \"slapadd\". I file del " -"vecchio database saranno spostati in /var/backups. Per riprovare " +"Questo errore provocherà anche il successivo fallimento di \"slapadd\". I " +"file del vecchio database saranno spostati in /var/backups. Per riprovare " "l'aggiornamento è necessario riportare i file nella posizione originale, " "correggere ciò che ha causato il fallimento di slapcat ed eseguire:" @@ -390,7 +381,7 @@ msgstr "" "Si raccomanda HDB come backend. HDB e BDB usano un formato di memorizzazione " "simile ma HDB dispone in più del supporto per rinominare i sottoalberi. " -"Entrambi espongono la configurazione delle stesse opzioni." +"Entrambi hanno le stesse opzioni da configurare." #. Type: select #. Description @@ -407,7 +398,7 @@ #. Description #: ../slapd.templates:18001 msgid "slurpd is obsolete; replicas must be reconfigured by hand" -msgstr "" +msgstr "slurpd è obsoleto; le repliche devono essere riconfigurate manualmente" #. Type: error #. Description @@ -417,6 +408,10 @@ "upgrading. Because slurpd is obsolete beginning with OpenLDAP 2.4, you will " "need to migrate your replicas to use the syncrepl protocol instead." msgstr "" +"Durante l'aggiornamento sono state trovate nel file di configurazione di " +"slapd una o più opzioni \"replica\" per slurpd. Poiché con OpenLDAP 2.4 " +"slurpd diventa obsoleto, è necessario migrare le proprie repliche in modo da " +"usare il protocollo syncrepl." #. Type: error #. Description @@ -427,12 +422,16 @@ "hand. Please see http://www.openldap.org/doc/admin24/syncrepl.html for " "details." msgstr "" +"La conversione da slurpd al protocollo syncrepl di pull non può essere fatta " +"automaticamente ed è necessario configurare a mano la replica fra i propri " +"server. Si veda http://www.openldap.org/doc/admin24/syncrepl.html per i " +"dettagli." #. Type: error #. Description #: ../slapd.templates:19001 msgid "TLSCipherSuite values have changed" -msgstr "" +msgstr "Sono cambiati i valori di TLSCipherSuite" #. Type: error #. Description @@ -443,6 +442,11 @@ "used, which has been changed from OpenSSL to GnuTLS. As a result, your " "existing TLSCipherSuite setting will not work with this package." msgstr "" +"Durante l'aggiornamento è stata trovata nel file di configurazione di slapd " +"l'opzione \"TLSCipherSuite\". I valori consentiti per questa opzione sono " +"determinati dall'implementazione di SSL in uso, che è passata da OpenSSL a " +"GnuTLS. Il risultato è che l'attuale impostazione di TLSCipherSuite non " +"funziona con questo pacchetto." #. Type: error #. Description @@ -453,3 +457,8 @@ "output of 'gnutls-cli -l' in the gnutls-bin package for the list of ciphers " "supported by GnuTLS." msgstr "" +"Questa impostazione è stata automaticamente disattivata trasformandola in un " +"commento. Se si hanno particolari esigenze di cifratura le quali richiedono " +"la riattivazione di questa opzione, si veda l'output di \"gnutls-cli -l\", " +"contenuto nel pacchetto gnutls-bin, per l'elenco dei cifrari supportati da " +"GnuTLS." diff -Nru openldap2.3-2.4.7/debian/po/ja.po openldap2.3-2.4.9/debian/po/ja.po --- openldap2.3-2.4.7/debian/po/ja.po 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/po/ja.po 2008-06-05 12:53:46.000000000 -0400 @@ -1,22 +1,22 @@ -# -# Translators, if you are not familiar with the PO format, gettext -# documentation is worth reading, especially sections dedicated to -# this format, e.g. by running: -# info -n '(gettext)PO Files' -# info -n '(gettext)Header Entry' -# -# Some information specific to po-debconf are available at -# /usr/share/doc/po-debconf/README-trans -# or http://www.debian.org/intl/l10n/po-debconf/README-trans -# -# Developers do not need to manually edit POT or PO files. -# +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# msgid "" msgstr "" "Project-Id-Version: openldap2.3\n" "Report-Msgid-Bugs-To: openldap2.3@packages.debian.org\n" "POT-Creation-Date: 2008-02-09 10:32-0800\n" -"PO-Revision-Date: 2008-01-23 12:16+0900\n" +"PO-Revision-Date: 2008-05-09 11:50+0900\n" "Last-Translator: Kenshi Muto \n" "Language-Team: Japanese \n" "MIME-Version: 1.0\n" @@ -423,7 +423,7 @@ #. Description #: ../slapd.templates:19001 msgid "TLSCipherSuite values have changed" -msgstr "" +msgstr "TLSCipherSuite の値が変更されました" #. Type: error #. Description @@ -434,6 +434,10 @@ "used, which has been changed from OpenSSL to GnuTLS. As a result, your " "existing TLSCipherSuite setting will not work with this package." msgstr "" +"更新中に、\"TLSCipherSuite\" オプションがあなたの slapd 設定に見つかりまし" +"た。このオプションで許される値は、利用するSSL 実装によって決定されますが、そ" +"の実装は OpenSSL から GnuTLS へと変更されました。結果として、既存の " +"TLSCipherSuite 設定はこのパッケージでは動作しません。" #. Type: error #. Description @@ -444,3 +448,7 @@ "output of 'gnutls-cli -l' in the gnutls-bin package for the list of ciphers " "supported by GnuTLS." msgstr "" +"設定は自動的にコメントアウトされました。このオプションを再び有効化しないとい" +"けないような特定の暗号化を使う必要があるなら、GnuTLS でサポートしている暗号法" +"の一覧を得るために gnutls-bin パッケージの 'gnutls-cli -i' の出力を参照して" +"ください。" diff -Nru openldap2.3-2.4.7/debian/po/nl.po openldap2.3-2.4.9/debian/po/nl.po --- openldap2.3-2.4.7/debian/po/nl.po 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/po/nl.po 2008-06-05 12:53:46.000000000 -0400 @@ -16,7 +16,7 @@ "Project-Id-Version: openldap2\n" "Report-Msgid-Bugs-To: openldap2.3@packages.debian.org\n" "POT-Creation-Date: 2008-02-09 10:32-0800\n" -"PO-Revision-Date: 2008-02-01 14:32+0100\n" +"PO-Revision-Date: 2008-05-08 12:42+0100\n" "Last-Translator: Bart Cornelis \n" "Language-Team: debian-l10n-dutch \n" "MIME-Version: 1.0\n" @@ -442,7 +442,7 @@ #. Description #: ../slapd.templates:19001 msgid "TLSCipherSuite values have changed" -msgstr "" +msgstr "De TLSCipherSuite-waardes zijn veranderd" #. Type: error #. Description @@ -453,6 +453,10 @@ "used, which has been changed from OpenSSL to GnuTLS. As a result, your " "existing TLSCipherSuite setting will not work with this package." msgstr "" +"Er is een 'TLSCipherSuite'-optie gevonden in uw slapd-configuratie. De " +"toegelaten waardes voor deze opties worden bepaald door de gebruikte SSL-" +"implementatie, en deze is veranderd van OpenSSL naar GnuTLS. Uw bestaande " +"TLSCipherSuite-instelling zal dan ook niet werken met dit pakket." #. Type: error #. Description @@ -463,3 +467,7 @@ "output of 'gnutls-cli -l' in the gnutls-bin package for the list of ciphers " "supported by GnuTLS." msgstr "" +"De instelling is automatisch uitgecommentarieerd. Als u specifieke encryptie-" +"eisen heeft waarvoor deze optie geheractiveerd moet worden vindt u via het " +"commando 'gnutls-cli-l' (uit het pakket gnutls-bin) de lijst van door GnuTLS " +"ondersteunde ciphers terug." diff -Nru openldap2.3-2.4.7/debian/po/pt_BR.po openldap2.3-2.4.9/debian/po/pt_BR.po --- openldap2.3-2.4.7/debian/po/pt_BR.po 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/po/pt_BR.po 2008-06-05 12:53:46.000000000 -0400 @@ -11,7 +11,7 @@ "Project-Id-Version: openldap2.3 2.4.7-3\n" "Report-Msgid-Bugs-To: openldap2.3@packages.debian.org\n" "POT-Creation-Date: 2008-02-09 10:32-0800\n" -"PO-Revision-Date: 2008-01-31 14:10-0200\n" +"PO-Revision-Date: 2008-05-08 10:00-0300\n" "Last-Translator: Eder L. Marques (frolic) \n" "Language-Team: l10n Portuguese \n" "MIME-Version: 1.0\n" @@ -438,7 +438,7 @@ #. Description #: ../slapd.templates:19001 msgid "TLSCipherSuite values have changed" -msgstr "" +msgstr "Os valores da TLSCipherSuite mudou" #. Type: error #. Description @@ -449,6 +449,11 @@ "used, which has been changed from OpenSSL to GnuTLS. As a result, your " "existing TLSCipherSuite setting will not work with this package." msgstr "" +"Uma opção \"TLSCipherSuite\" foi encontrada em seu arquivo slapd durante a " +"atualização. Os valores permitidos para esta opção são determinados pela " +"implementação SSL utilizada, a qual foi alterada de OpenSSL para GnuTLS. " +"Como resultado, sua configuração TLSCipherSuite existente não irá funcionar " +"com este pacote." #. Type: error #. Description @@ -459,3 +464,7 @@ "output of 'gnutls-cli -l' in the gnutls-bin package for the list of ciphers " "supported by GnuTLS." msgstr "" +"Esta configuração foi automaticamente comentada para você. Se você tem " +"necessidades específicas de criptografia que requerem que esta opção seja " +"reabilitada, veja a saída do comando 'gnutls-cli -l' no pacote gnutls-bin " +"para uma lista das cifras suportadas pelo GnuTLS." diff -Nru openldap2.3-2.4.7/debian/po/pt.po openldap2.3-2.4.9/debian/po/pt.po --- openldap2.3-2.4.7/debian/po/pt.po 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/po/pt.po 2008-06-05 12:53:46.000000000 -0400 @@ -1,7 +1,7 @@ # Portuguese translation for openldap2.3 debconf messages. # Copyright (C) Tiago Fernandes , 2006 # This file is distributed under the same license as the Openldap2.3 package. -# Tiago Fernandes , 2006. +# Tiago Fernandes , 2006-2008. # # msgid "" @@ -9,7 +9,7 @@ "Project-Id-Version: openldap2.3 2.3.38-2\n" "Report-Msgid-Bugs-To: openldap2.3@packages.debian.org\n" "POT-Creation-Date: 2008-02-09 10:32-0800\n" -"PO-Revision-Date: 2007-11-28 21:22+0000\n" +"PO-Revision-Date: 2008-05-12 21:10+0100\n" "Last-Translator: Tiago Fernandes \n" "Language-Team: Portuguese \n" "MIME-Version: 1.0\n" @@ -66,29 +66,28 @@ msgstr "" "Antes de actualizar para uma nova versão do servidor OpenLDAP, os dados dos " "seu directórios LDAP podem ser despejados para ficheiros de texto simples no " -"formato standardizado LDAP Data Interchange Format." +"formato padronizado LDAP Data Interchange Format." #. Type: select #. Description #: ../slapd.templates:2002 -#, fuzzy msgid "" "Selecting \"always\" will cause the databases to be dumped unconditionally " "before an upgrade. Selecting \"when needed\" will only dump the database if " "the new version is incompatible with the old database format and it needs to " "be reimported. If you select \"never\", no dump will be done." msgstr "" -"Seleccionando \"sempre\" fará com as bases de dados sejam despejadas " -"incondicionalmente antes de uma actualização. Seleccionando \"quando " -"necessário\" irá apenas despejar a base de dados se a nova versão for " -"incompatível com o formato da base de dados antiga e for necessário " -"reimporta-la. Seleccionando \"nunca\" fará com que não ocorram despejos." +"Seleccionar \"sempre\" fará com as bases de dados sejam despejadas " +"incondicionalmente antes de uma actualização. Seleccionar \"quando necessário" +"\" irá apenas despejar a base de dados se a nova versão for incompatível com " +"o formato da base de dados antiga e for necessário reimporta-la. Se " +"seleccionar \"nunca\", não será feito qualquer despejo." #. Type: string #. Description #: ../slapd.templates:3001 msgid "Directory to use for dumped databases:" -msgstr "Directório para bases de dados despejadas:" +msgstr "Directório a utilizar para bases de dados despejadas:" #. Type: string #. Description @@ -102,7 +101,7 @@ "from." msgstr "" "Por favor, especifique o directório para onde as bases de dados LDAP serão " -"exportadas. Dentro deste directório são criados vários ficheiros LDIF que " +"exportadas. Dentro deste directório serão criados vários ficheiros LDIF que " "correspondem às bases de pesquisas localizadas no servidor. Assegure-se que " "tem espaço livre suficiente na partição onde se encontra o directório. A " "primeira ocorrência da string \"VERSION\" é substituída com a versão do " @@ -145,10 +144,10 @@ "later." msgstr "" "A configuração que inseriu é inválida. Assegure-se que o nome do domínio DNS " -"tem uma sintaxe válida, que a organização é preenchida e que as passwords de " -"admin coincidem. Se decidir não tentar novamente a configuração, o servidor " -"de LDAP não ficará configurado. Corra \"dpkg-reconfigure slapd\" se quiser " -"tentar novamente mais tarde." +"tem uma sintaxe válida, que a organização é preenchida e que as palavras-" +"chave de admininostrador coincidem. Se decidir não tentar novamente a " +"configuração, o servidor de LDAP não ficará configurado. Corra \"dpkg-" +"reconfigure slapd\" se quiser tentar novamente mais tarde." #. Type: string #. Description @@ -165,15 +164,14 @@ "dc=example, dc=org' as base DN." msgstr "" "O nome do domínio DNS é usado para construir o DN base do seu directório " -"LDAP. Por exemplo, 'foo.example.org' irá criar o directório com 'dc=foo," -"dc=example,dc=org' como DN base." +"LDAP. Por exemplo, 'foo.examplo.org' irá criar o directório com 'dc=foo," +"dc=examplo,dc=org' como DN base." #. Type: string #. Description #: ../slapd.templates:7001 -#, fuzzy msgid "Organization name:" -msgstr "Nome da sua organização:" +msgstr "Nome da Organização:" #. Type: string #. Description @@ -196,7 +194,7 @@ #: ../slapd.templates:8001 msgid "Please enter the password for the admin entry in your LDAP directory." msgstr "" -"Por favor, insira a palavra-passe para a entrada de admin do seu directório " +"Por favor, insira a palavra-passe para a entrada admin do seu directório " "LDAP." #. Type: password @@ -232,11 +230,8 @@ #. Type: boolean #. Description #: ../slapd.templates:11001 -#, fuzzy msgid "Do you want the database to be removed when slapd is purged?" -msgstr "" -"Quer que a base de dados seja removida quando o slapd for removido com a " -"opção purge?" +msgstr "Quer que a base de dados seja removida quando o slapd for purgado?" #. Type: boolean #. Description @@ -247,17 +242,16 @@ #. Type: boolean #. Description #: ../slapd.templates:13001 -#, fuzzy msgid "" "The obsolete LDAPv2 protocol is disabled by default in slapd. Programs and " "users should upgrade to LDAPv3. If you have old programs which can't use " "LDAPv3, you should select this option and 'allow bind_v2' will be added to " "your slapd.conf file." msgstr "" -"Por pré-definição o protocolo obsoleto LDAPv2 é desactivado no slapd. Os " +"O protocolo obsoleto LDAPv2 está desactivado por pré-definição no slapd. Os " "programas e utilizadores devem actualizar para LDAPv3. Se tiver programas " -"antigos que não conseguiram usar LDAPv3, deve seleccionar esta opção e será " -"adicionado ao ficheiro slapd.conf 'allow bind_v2'." +"antigos que não conseguem usar LDAPv3, deverá seleccionar esta opção e será " +"adicionado 'allow bin_v2' ao seu ficheiro slapd.conf." #. Type: boolean #. Description @@ -284,7 +278,7 @@ #. Description #: ../slapd.templates:15001 msgid "slapcat failure during upgrade" -msgstr "falha do slapcat durante a actualização" +msgstr "Falha do slapcat durante a actualização" #. Type: error #. Description @@ -295,22 +289,20 @@ #. Type: error #. Description #: ../slapd.templates:15001 -#, fuzzy msgid "" "The 'slapcat' program failed while extracting the LDAP directory. This may " "be caused by an incorrect configuration file (for example, missing " "'moduleload' lines to support the backend database)." msgstr "" -"O programa 'slapcat', que tenta extrair o directório LDAP, falhou. Isto pode " -"ser causado por ficheiro de configuração incorrecto (por exemplo, uma linha " -"'moduleload' em falta para suportar o backend da base de dados." +"O programa 'slapcat' falhou enquanto extraía o directório LDAP. Isto pode " +"ter sido causado por um ficheiro de configuração incorrecto (por exemplo, " +"linhas 'moduleload' em falta para suportar o backend da base de dados)." #. Type: error #. Description #. This paragraph is followed by a (non translatable) paragraph #. containing a command line #: ../slapd.templates:15001 -#, fuzzy msgid "" "This failure will cause 'slapadd' to fail later as well. The old database " "files will be moved to /var/backups. If you want to try this upgrade again, " @@ -318,10 +310,10 @@ "slapcat to fail, and run:" msgstr "" "Esta falha irá fazer com que o 'slapadd' falhe também mais tarde. Os " -"ficheiros da base de dados antiga serão movidos para /var/backups. Se quiser " -"tentar novamente a actualização, deve mover os ficheiros da base de dados " -"antiga de volta para o seu lugar, corrigir tudo o que possa ter feito o " -"slapcat falhar e correr:" +"ficheiros antigos da base de dados serão movidos para /var/backups. Se " +"quiser tentar novamente esta actualização, deverá mover os ficheiros antigos " +"da base de dados antiga de volta para o seu lugar, corrigir o que possa ter " +"causado a falha do slapcat, e executar:" #. Type: error #. Description @@ -332,7 +324,7 @@ "Then move the database files back to a backup area and then try running " "slapadd from $location." msgstr "" -"Então mova os ficheiros da base de dados de volta para a área de backup. A " +"Depois mova os ficheiros da base de dados de volta para a área de backup e a " "seguir tente correr o slapadd a partir de $location." #. Type: boolean @@ -400,14 +392,14 @@ "your needs. See /usr/share/doc/slapd/README.DB_CONFIG.gz for more details." msgstr "" "Num ou noutro caso, deverá rever a configuração da base de dados resultante, " -"para as suasnecessidades. Ver /usr/share/doc/slapd/README.DB_CONFIG.gz para " +"para as suas necessidades. Ver /usr/share/doc/slapd/README.DB_CONFIG.gz para " "mais detalhes." #. Type: error #. Description #: ../slapd.templates:18001 msgid "slurpd is obsolete; replicas must be reconfigured by hand" -msgstr "" +msgstr "o slurpd está obsoleto; as réplicas terão de ser configuradas á mão" #. Type: error #. Description @@ -417,6 +409,10 @@ "upgrading. Because slurpd is obsolete beginning with OpenLDAP 2.4, you will " "need to migrate your replicas to use the syncrepl protocol instead." msgstr "" +"Foi encontrada, durante a actualização, uma ou mais opções \"replica\" do " +"slurpd na sua configuração do slapd. Devido ao slurpd estar obsoleto a " +"partir do OpenLDAP 2.4, terá de migrar as suas réplicas para usar o " +"protocolo syncrepl, em seu lugar." #. Type: error #. Description @@ -427,12 +423,16 @@ "hand. Please see http://www.openldap.org/doc/admin24/syncrepl.html for " "details." msgstr "" +"A conversão do slurpd para o protocolo syncrepl (pull-based) não poderá ser " +"feita automaticamente e terá de configurar manualmente os seus servidores " +"replicados. Por favor, para mais detalhes veja http://www.openldap.org/doc/" +"admin24/syncrepl.html ." #. Type: error #. Description #: ../slapd.templates:19001 msgid "TLSCipherSuite values have changed" -msgstr "" +msgstr "Os valores para TLSCipherSuite foram alterados" #. Type: error #. Description @@ -443,6 +443,11 @@ "used, which has been changed from OpenSSL to GnuTLS. As a result, your " "existing TLSCipherSuite setting will not work with this package." msgstr "" +"Durante a actualização a opção \"TLSCipherSuite\" foi encontrada na " +"configuração do seu slapd. Os valores permitidos para esta opção são " +"determinados pela implementação SSL usada, a qual foi alterada de OpenSSL " +"para GnuTLS. Como resultado, a sua actual opção TLSCipherSuite não irá " +"funcionar com este pacote." #. Type: error #. Description @@ -453,3 +458,7 @@ "output of 'gnutls-cli -l' in the gnutls-bin package for the list of ciphers " "supported by GnuTLS." msgstr "" +"Esta opção foi comentada automaticamente para si. Se tiver necessidades " +"específicas de encriptação que necessitem que esta opção seja reactivada, " +"veja o output de 'gnutls-cli -l' que existe no pacote gnutls-bin, para obter " +"a lista de cifras suportadas pelo GnuTLS." diff -Nru openldap2.3-2.4.7/debian/po/ru.po openldap2.3-2.4.9/debian/po/ru.po --- openldap2.3-2.4.7/debian/po/ru.po 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/po/ru.po 2008-06-05 12:53:46.000000000 -0400 @@ -13,10 +13,10 @@ # Yuri Kozlov , 2007, 2008. msgid "" msgstr "" -"Project-Id-Version: 2.4.7-3\n" +"Project-Id-Version: openldap2.3 2.4.7-6.4\n" "Report-Msgid-Bugs-To: openldap2.3@packages.debian.org\n" "POT-Creation-Date: 2008-02-09 10:32-0800\n" -"PO-Revision-Date: 2008-01-23 20:45+0300\n" +"PO-Revision-Date: 2008-05-11 08:49+0400\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" @@ -434,7 +434,7 @@ #. Description #: ../slapd.templates:19001 msgid "TLSCipherSuite values have changed" -msgstr "" +msgstr "Изменились значения для TLSCipherSuite" #. Type: error #. Description @@ -445,6 +445,10 @@ "used, which has been changed from OpenSSL to GnuTLS. As a result, your " "existing TLSCipherSuite setting will not work with this package." msgstr "" +"При обновлении в настройке slapd был найден параметр \"TLSCipherSuite\". " +"Допустимые значения этого параметра, определяемые авторами SSL, были " +"изменены при переходе с OpenSSL на GnuTLS. В результате, имеющаяся настройка " +"TLSCipherSuite не заработает с этим пакетом." #. Type: error #. Description @@ -455,3 +459,7 @@ "output of 'gnutls-cli -l' in the gnutls-bin package for the list of ciphers " "supported by GnuTLS." msgstr "" +"Данная настройка будет автоматически закомментирована. Если для какого-то " +"специфичного шифрования вам требуется её использовать, то список " +"поддерживаемых GnuTLS алгоритмов можно посмотреть, запустив команду 'gnutls-" +"cli -l' из пакета gnutls-bin." diff -Nru openldap2.3-2.4.7/debian/po/vi.po openldap2.3-2.4.9/debian/po/vi.po --- openldap2.3-2.4.7/debian/po/vi.po 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/po/vi.po 2008-06-05 12:53:46.000000000 -0400 @@ -1,20 +1,20 @@ # Vietnamese translation for OpenLDAP. -# Copyright © 2007 Free Software Foundation, Inc. -# Clytie Siddall , 2005-2007. +# Copyright © 2008 Free Software Foundation, Inc. +# Clytie Siddall , 2005-2008. # msgid "" msgstr "" -"Project-Id-Version: openldap2.3 2.3.38-2\n" +"Project-Id-Version: openldap2.3 2.4.7-6.4\n" "Report-Msgid-Bugs-To: openldap2.3@packages.debian.org\n" "POT-Creation-Date: 2008-02-09 10:32-0800\n" -"PO-Revision-Date: 2007-11-29 22:34+1030\n" +"PO-Revision-Date: 2008-05-09 00:24+0930\n" "Last-Translator: Clytie Siddall \n" "Language-Team: Vietnamese \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: LocFactoryEditor 1.7b1\n" +"X-Generator: LocFactoryEditor 1.7b3\n" #. Type: boolean #. Description @@ -29,8 +29,7 @@ "If you enable this option, no initial configuration or database will be " "created for you." msgstr "" -"Nếu bạn hiệu lực tùy chọn này, không có cấu hình hay cơ sở dữ liệu đầu tiên " -"sẽ được tạo cho bạn." +"Bật tùy chọn này thì không tạo cho bạn cấu hình hay cơ sở dữ liệu đầu tiên." #. Type: select #. Choices @@ -59,42 +58,38 @@ #. Type: select #. Description #: ../slapd.templates:2002 -#, fuzzy msgid "" "Before upgrading to a new version of the OpenLDAP server, the data from your " "LDAP directories can be dumped into plain text files in the standard LDAP " "Data Interchange Format." msgstr "" "Trước khi nâng cấp lên phiên bản mới của trình phục vụ OpenLDAP, dữ liệu nằm " -"trong các thư mục LDAP có thể được đổ vào tập tin nhập thô (theo định dạng " -"trao đổi dữ liệu LDAP [LDIF] chuẩn)." +"trong các thư mục LDAP có thể được đổ vào tập tin nhập thô theo định dạng " +"trao đổi dữ liệu LDAP chuẩn." #. Type: select #. Description #: ../slapd.templates:2002 -#, fuzzy msgid "" "Selecting \"always\" will cause the databases to be dumped unconditionally " "before an upgrade. Selecting \"when needed\" will only dump the database if " "the new version is incompatible with the old database format and it needs to " "be reimported. If you select \"never\", no dump will be done." msgstr "" -"Chọn mục « luôn luôn » thì gây ra các cơ sở dữ liệu bị đổ một cách không điều " -"kiện trước khi nâng cấp. Chọn « khi cần thiết » thì chỉ đổ cơ sở dữ liệu nếu " -"phiên bản mới không tương thích với định dạng cơ sở dữ liệu cũ và có nên " -"nhập khẩu nó. Còn chọn « không bao giờ » thì không đổ gì." +"Chọn mục « luôn luôn » thì gây ra các cơ sở dữ liệu bị đổ một cách không " +"điều kiện trước khi nâng cấp. Chọn « khi cần thiết » thì chỉ đổ cơ sở dữ " +"liệu nếu phiên bản mới không tương thích với định dạng cơ sở dữ liệu cũ và " +"cần phải nhập lại nó. Còn chọn « không bao giờ » thì không đổ gì." #. Type: string #. Description #: ../slapd.templates:3001 -#, fuzzy msgid "Directory to use for dumped databases:" msgstr "Thư mục vào đó cần đổ cơ sở dữ liệu :" #. Type: string #. Description #: ../slapd.templates:3001 -#, fuzzy msgid "" "Please specify the directory where the LDAP databases will be exported. In " "this directory, several LDIF files will be created which correspond to the " @@ -106,8 +101,8 @@ "Ghi rõ tên thư mục vào đó cần xuất các cơ sở dữ liệu LDAP. Trong thư mục này " "thì tạo vài tập tin LDIF mà tương ứng với những cơ bản tìm kiếm nằm trên máy " "phục vụ. Hãy kiểm tra xem vẫn có đủ chỗ rỗng trong phân vùng đó. Lần đầu " -"tiên gặp chuỗi « VERSION » (phiên bản) thì được thay thế bằng phiên bản từ đó " -"bạn đang nâng cấp." +"tiên gặp chuỗi « VERSION » (phiên bản) thì được thay thế bằng phiên bản từ " +"đó bạn đang nâng cấp." #. Type: boolean #. Description @@ -138,7 +133,6 @@ #. Type: boolean #. Description #: ../slapd.templates:5001 -#, fuzzy msgid "" "The configuration you entered is invalid. Make sure that the DNS domain name " "is syntactically valid, the organization is not left empty and the admin " @@ -158,9 +152,8 @@ msgid "DNS domain name:" msgstr "Tên miền DNS:" -# msgid "" -# The DNS domain name is used to construct the base DN of your LDAP -# directory. Entering foo.bar.org will give you the base DN dc=foo, dc=bar, +# The DNS domain name is used to construct the base DN of your LDAP +# directory. Entering foo.bar.org will give you the base DN dc=foo, dc=bar, # dc=org. #. Type: string #. Description @@ -171,20 +164,18 @@ "dc=example, dc=org' as base DN." msgstr "" "Tên miền DNS được dùng để cấu trúc tên miền cơ bản của thư mục LDAP. Chẳng " -"hạn, « foo.thí_dụ.org » sẽ tạo thư mục có « dc=foo, dc=thí_dụ, dc=org » là tên " -"miền cơ bản." +"hạn, « foo.thí_dụ.org » sẽ tạo thư mục có « dc=foo, dc=thí_dụ, dc=org » là " +"tên miền cơ bản." #. Type: string #. Description #: ../slapd.templates:7001 -#, fuzzy msgid "Organization name:" -msgstr "Tổ chức:" +msgstr "Tên tổ chức:" #. Type: string #. Description #: ../slapd.templates:7001 -#, fuzzy msgid "" "Please enter the name of the organization to use in the base DN of your LDAP " "directory." @@ -212,11 +203,11 @@ #. Type: password #. Description #: ../slapd.templates:9001 -#, fuzzy msgid "" "Please enter the admin password for your LDAP directory again to verify that " "you have typed it correctly." -msgstr "Hãy nhập lại mật khẩu người chủ này, để xác nhận bạn đã gõ đúng." +msgstr "" +"Hãy nhập lại mật khẩu quản trị cho thư mục LDAP, để xác nhận bạn đã gõ đúng." #. Type: note #. Description @@ -233,7 +224,6 @@ #. Type: boolean #. Description #: ../slapd.templates:11001 -#, fuzzy msgid "Do you want the database to be removed when slapd is purged?" msgstr "" "Khi tẩy gói phần mềm slapd, bạn cũng có muốn gỡ bỏ cơ sở dữ liệu không?" @@ -247,7 +237,6 @@ #. Type: boolean #. Description #: ../slapd.templates:13001 -#, fuzzy msgid "" "The obsolete LDAPv2 protocol is disabled by default in slapd. Programs and " "users should upgrade to LDAPv3. If you have old programs which can't use " @@ -255,9 +244,9 @@ "your slapd.conf file." msgstr "" "Giao thức LDAPv2 (phiên bản 2) quá cũ bị tắt theo mặc định trong slapd. Các " -"chương trình và người dùng đều nên nâng cấp lên LDAPv3 (phiên bản 3). Chương " -"trình cũ không thể dùng LDAPv3 thì bạn nên bật tùy chọn này và chuỗi « allow " -"bind_v2 » sẽ được thêm vào tập tin cấu hình « slapd.conf »." +"chương trình và người dùng đều nên nâng cấp lên LDAPv3 (phiên bản 3). Có " +"chương trình cũ không thể dùng LDAPv3 thì bạn nên bật tùy chọn này và chuỗi " +"« allow bind_v2 » sẽ được thêm vào tập tin cấu hình « slapd.conf »." #. Type: boolean #. Description @@ -275,8 +264,8 @@ "want to back up and abandon the current database." msgstr "" "Bạn đã ghi rõ một hậu tố thư mục (miền) không khớp với điều hiện thời được " -"ghi trong tập tin cấu hình « /etc/ldap/slapd.conf ». Việc thay đổi hậu tố thư " -"mục cần thiết di chuyển cơ sở dữ liệu LDAP hiện thời ra rồi tạo một điều " +"ghi trong tập tin cấu hình « /etc/ldap/slapd.conf ». Việc thay đổi hậu tố " +"thư mục cần thiết di chuyển cơ sở dữ liệu LDAP hiện thời ra rồi tạo một điều " "mới. Hãy xác nhận nếu bạn muốn sao lưu và hủy cơ sở dữ liệu hiện thời không." #. Type: error @@ -288,20 +277,18 @@ #. Type: error #. Description #: ../slapd.templates:15001 -#, fuzzy msgid "An error occurred while upgrading the LDAP directory." -msgstr "Gặp lỗi trong sự thử nâng cấp thư mục LDAP." +msgstr "Gặp lỗi trong khi nâng cấp thư mục LDAP." #. Type: error #. Description #: ../slapd.templates:15001 -#, fuzzy msgid "" "The 'slapcat' program failed while extracting the LDAP directory. This may " "be caused by an incorrect configuration file (for example, missing " "'moduleload' lines to support the backend database)." msgstr "" -"Chương trình « slapcat », mà thử rút thư mục LDAP, đã bị lỗi. Có lẽ do tập " +"Chương trình « slapcat » bị lỗi trong khi giải nén mục LDAP. Có lẽ do tập " "tin cấu hình sai (v.d. thiếu dòng « moduleload » để hỗ trợ cơ sở dữ liệu hậu " "phương)." @@ -310,17 +297,17 @@ #. This paragraph is followed by a (non translatable) paragraph #. containing a command line #: ../slapd.templates:15001 -#, fuzzy msgid "" "This failure will cause 'slapadd' to fail later as well. The old database " "files will be moved to /var/backups. If you want to try this upgrade again, " "you should move the old database files back into place, fix whatever caused " "slapcat to fail, and run:" msgstr "" -"Sự thất bại này sẽ cũng gây ra « slapadd » thất bại về sau. Các tập tin cơ sở " -"dữ liệu cũ sẽ được di chuyển vào thư mục « /var/backups ». Muốn thử lại tiến " -"trình sao lưu thì bạn nên di chuyển các tập tin cơ sở dữ liệu về nơi gốc, " -"sửa chữa trường hợp gây ra slapcat bị lỗi, rồi chạy lệnh này:" +"Sự thất bại này sẽ cũng gây ra tiến trình « slapadd » thất bại về sau. Các " +"tập tin cơ sở dữ liệu cũ sẽ được di chuyển vào thư mục « /var/backups ». " +"Muốn thử lại tiến trình nâng cấp thì bạn nên di chuyển các tập tin cơ sở dữ " +"liệu cũ về nơi gốc, sửa chữa trường hợp gây ra slapcat bị lỗi, rồi chạy lệnh " +"này:" #. Type: error #. Description @@ -350,8 +337,7 @@ "Kiểu hậu phương LDBM không ổn định nên bị phản đối bởi OpenLDAP kể từ phiên " "bản 2.2. Vì thế nó không còn được gói OpenLDAP hỗ trợ lại." -# msgid "" -# When using the BDB backend make sure you configure BDB properly. For +# When using the BDB backend make sure you configure BDB properly. For # information to do so, see /usr/share/doc/slapd/README.DB_CONFIG.gz #. Type: boolean #. Description @@ -361,10 +347,10 @@ "information, see /usr/share/doc/slapd/README.DB_CONFIG.gz." msgstr "" "Để sử dụng hậu phương BDB, nó phải được cấu hình cho đúng. Muốn tìm thêm " -"thông tin thì xem tập tin Đọc Đi « /usr/share/doc/slapd/README.DB_CONFIG.gz »." +"thông tin thì xem tập tin Đọc Đi « /usr/share/doc/slapd/README.DB_CONFIG.gz " +"»." -# msgid "" -# If you enable this option an attempt will be made to update your +# If you enable this option an attempt will be made to update your # configuration to use BDB instead of LDBM and convert your databases. #. Type: boolean #. Description @@ -396,9 +382,8 @@ "nhau, nhưng HDB thêm hỗ trợ khả năng thay đổi tên của cây con. Cả hai đều hỗ " "trợ cùng các tùy chọn cấu hình." -# msgid "" -# The BDB backend is the recommended choice of the OpenLDAP developers. -# When using the BDB backend make sure that you configure the underlying +# The BDB backend is the recommended choice of the OpenLDAP developers. +# When using the BDB backend make sure that you configure the underlying # database for your requirements. Look into /usr/share/doc/slapd/README. # DB_CONFIG.gz #. Type: select @@ -409,14 +394,14 @@ "your needs. See /usr/share/doc/slapd/README.DB_CONFIG.gz for more details." msgstr "" "Trong cả trường hợp, bạn nên xem lại cấu hình cơ sở dữ liệu đã kết quả, kiểm " -"tra nó thích hợp với trường hợp của bạn. Xem tài liệu Đọc Đi « /usr/share/doc/" -"slapd/README.DB_CONFIG.gz » để tìm chi tiết." +"tra nó thích hợp với trường hợp của bạn. Xem tài liệu Đọc Đi « /usr/share/" +"doc/slapd/README.DB_CONFIG.gz » để tìm chi tiết." #. Type: error #. Description #: ../slapd.templates:18001 msgid "slurpd is obsolete; replicas must be reconfigured by hand" -msgstr "" +msgstr "slurpd quá cũ ; mỗi bản sao phải được cấu hình lại bằng tay" #. Type: error #. Description @@ -426,6 +411,9 @@ "upgrading. Because slurpd is obsolete beginning with OpenLDAP 2.4, you will " "need to migrate your replicas to use the syncrepl protocol instead." msgstr "" +"Một hay nhiều tùy chọn « sao chép » của slurpd đã được tim trong cấu hình " +"slapd của bạn trong khi nâng cấp. Vì slurpd quá cũ kể từ OpenLDAP 2.4, bạn " +"cần phải nâng cấp các bản sao để sử dụng giao thức syncrepl thay vào đó." #. Type: error #. Description @@ -436,12 +424,16 @@ "hand. Please see http://www.openldap.org/doc/admin24/syncrepl.html for " "details." msgstr "" +"Tiến trình chuyển đổi từ slurpd sang giao thức syncrepl dựa vào pull không " +"thể được tự động chạy, và bạn sẽ cần phải cấu hình bằng tay các trình phục " +"vụ sao chép. Xem địa chỉ « http://www.openldap.org/doc/admin24/syncrepl.html " +"» để tìm chi tiết." #. Type: error #. Description #: ../slapd.templates:19001 msgid "TLSCipherSuite values have changed" -msgstr "" +msgstr "Giá trị TLSCipherSuite bị thay đổi" #. Type: error #. Description @@ -452,6 +444,11 @@ "used, which has been changed from OpenSSL to GnuTLS. As a result, your " "existing TLSCipherSuite setting will not work with this package." msgstr "" +"Một tùy chọn « TLSCipherSuite » đã được tìm trong cấu hình slapd của bạn " +"trong khi nâng cấp. Các giá trị được phép cho tùy chọn này được quyết định " +"bởi bản thực hiện SSL đang chạy, mà đã được thay đổi từ OpenSSL sang GnuTLS. " +"Kết quả là thiết lập TLSCipherSuite đã tồn tại của bạn sẽ không chạy được " +"với gói này." #. Type: error #. Description @@ -462,3 +459,7 @@ "output of 'gnutls-cli -l' in the gnutls-bin package for the list of ciphers " "supported by GnuTLS." msgstr "" +"Thiết lập này đã do ghi chú tự động tắt cho bạn. Nếu bạn có sự cần mật mã " +"đặc biệt mà cần thiết bật lại tùy chọn này, xem kết xuất của câu lệnh « " +"gnutls-cli -l » trong gói gnutls-bin để tìm danh sách các mật mã được GnuTLS " +"hỗ trợ." diff -Nru openldap2.3-2.4.7/debian/rules openldap2.3-2.4.9/debian/rules --- openldap2.3-2.4.7/debian/rules 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/rules 2008-06-05 12:53:46.000000000 -0400 @@ -42,7 +42,7 @@ # These variables are used only by get-orig-source, which will normally only # be run by maintainers. -VERSION = 2.4.7 +VERSION = 2.4.9 URL = http://www.openldap.org/software/download/OpenLDAP/openldap-release/ # Download the upstream source and make changes as required for DFSG reasons. diff -Nru openldap2.3-2.4.7/debian/slapd.init openldap2.3-2.4.9/debian/slapd.init --- openldap2.3-2.4.7/debian/slapd.init 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/slapd.init 2008-06-05 12:53:46.000000000 -0400 @@ -1,10 +1,10 @@ #!/bin/sh ### BEGIN INIT INFO # Provides: slapd -# Required-Start: networking syslog -# Required-Stop: networking syslog +# Required-Start: $remote_fs $network $syslog +# Required-Stop: $remote_fs $network $syslog # Default-Start: 2 3 4 5 -# Default-Stop: 0 6 +# Default-Stop: 0 1 6 # Short-Description: OpenLDAP standalone server (Lightweight Directory Access Protocol) ### END INIT INFO diff -Nru openldap2.3-2.4.7/debian/slapd.manpages openldap2.3-2.4.9/debian/slapd.manpages --- openldap2.3-2.4.7/debian/slapd.manpages 2008-06-05 12:53:46.000000000 -0400 +++ openldap2.3-2.4.9/debian/slapd.manpages 2008-06-05 12:53:46.000000000 -0400 @@ -1,39 +1,2 @@ -debian/tmp/usr/share/man/man5/slapd.access.5 -debian/tmp/usr/share/man/man5/slapd-hdb.5 -debian/tmp/usr/share/man/man5/slapd-meta.5 -debian/tmp/usr/share/man/man5/slapd-perl.5 -debian/tmp/usr/share/man/man5/slapd-shell.5 -debian/tmp/usr/share/man/man5/slapd-bdb.5 -debian/tmp/usr/share/man/man5/slapd-hdb.5 -debian/tmp/usr/share/man/man5/slapd-ldap.5 -debian/tmp/usr/share/man/man5/slapd-monitor.5 -debian/tmp/usr/share/man/man5/slapd.plugin.5 -debian/tmp/usr/share/man/man5/slapd-sql.5 -debian/tmp/usr/share/man/man5/slapd.conf.5 -debian/tmp/usr/share/man/man5/slapd-null.5 -debian/tmp/usr/share/man/man5/slapd-relay.5 -debian/tmp/usr/share/man/man5/slapd-dnssrv.5 -debian/tmp/usr/share/man/man5/slapd-ldif.5 -debian/tmp/usr/share/man/man5/slapd-passwd.5 -debian/tmp/usr/share/man/man5/slapo-accesslog.5 -debian/tmp/usr/share/man/man5/slapo-auditlog.5 -debian/tmp/usr/share/man/man5/slapo-chain.5 -debian/tmp/usr/share/man/man5/slapo-dynlist.5 -debian/tmp/usr/share/man/man5/slapo-pcache.5 -debian/tmp/usr/share/man/man5/slapo-ppolicy.5 -debian/tmp/usr/share/man/man5/slapo-refint.5 -debian/tmp/usr/share/man/man5/slapo-retcode.5 -debian/tmp/usr/share/man/man5/slapo-rwm.5 -debian/tmp/usr/share/man/man5/slapo-syncprov.5 -debian/tmp/usr/share/man/man5/slapo-translucent.5 -debian/tmp/usr/share/man/man5/slapo-unique.5 -debian/tmp/usr/share/man/man5/slapo-valsort.5 -debian/tmp/usr/share/man/man8/slapd.8 -debian/tmp/usr/share/man/man8/slapadd.8 -debian/tmp/usr/share/man/man8/slapcat.8 -debian/tmp/usr/share/man/man8/slapacl.8 -debian/tmp/usr/share/man/man8/slapauth.8 -debian/tmp/usr/share/man/man8/slapdn.8 -debian/tmp/usr/share/man/man8/slapindex.8 -debian/tmp/usr/share/man/man8/slappasswd.8 -debian/tmp/usr/share/man/man8/slaptest.8 +debian/tmp/usr/share/man/man8/slap*.5 +debian/tmp/usr/share/man/man8/slap*.8 diff -Nru openldap2.3-2.4.7/debian/slapd-smbk5pwd.install openldap2.3-2.4.9/debian/slapd-smbk5pwd.install --- openldap2.3-2.4.7/debian/slapd-smbk5pwd.install 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/debian/slapd-smbk5pwd.install 2008-06-05 12:53:46.000000000 -0400 @@ -0,0 +1,6 @@ +debian/tmp/usr/lib/ldap/smbk5pwd.la usr/lib/ldap +debian/tmp/usr/lib/ldap/smbk5pwd.so.0.0.0 usr/lib/ldap +debian/tmp/usr/lib/ldap/smbk5pwd.so.0.0 usr/lib/ldap +debian/tmp/usr/lib/ldap/smbk5pwd.so.0 usr/lib/ldap +debian/tmp/usr/lib/ldap/smbk5pwd.so usr/lib/ldap +debian/tmp/usr/share/doc/slapd-smbk5pwd/README.gz usr/share/doc/slapd-smbk5pwd diff -Nru openldap2.3-2.4.7/doc/devel/args openldap2.3-2.4.9/doc/devel/args --- openldap2.3-2.4.7/doc/devel/args 2007-08-31 19:13:52.000000000 -0400 +++ openldap2.3-2.4.9/doc/devel/args 2008-02-08 19:53:37.000000000 -0500 @@ -1,6 +1,6 @@ Tools ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ldapcompare * DE**HI*K M*OPQR UVWXYZ de *h**k *nop* vwxyz -ldapdelete *CDE**HI*K M*OPQR UVWXYZ cdef*h**k *nop* vwxy +ldapdelete *CDE**HI*K M*OPQR UVWXYZ cdef*h**k *nop* vwxyz ldapmodify *CDE**HI*K M*OPQRS UVWXYZabcde *h**k *nop*r t vwxy ldapmodrdn *CDE**HI*K M*OPQR UVWXYZ cdef*h**k *nop*rs vwxy ldappasswd A*CDE**HI* *O QRS UVWXYZa def*h** * o * s vwxy @@ -56,4 +56,4 @@ --- -$OpenLDAP: pkg/ldap/doc/devel/args,v 1.29.2.2 2007/08/31 23:13:52 quanah Exp $ +$OpenLDAP: pkg/ldap/doc/devel/args,v 1.29.2.3 2008/02/09 00:53:37 quanah Exp $ diff -Nru openldap2.3-2.4.7/doc/guide/admin/abstract.sdf openldap2.3-2.4.9/doc/guide/admin/abstract.sdf --- openldap2.3-2.4.7/doc/guide/admin/abstract.sdf 2007-11-07 18:01:35.000000000 -0500 +++ openldap2.3-2.4.9/doc/guide/admin/abstract.sdf 2008-02-11 18:26:39.000000000 -0500 @@ -1,5 +1,5 @@ -# $OpenLDAP: pkg/openldap-guide/admin/abstract.sdf,v 1.7.2.4 2007/11/07 23:01:35 ghenry Exp $ -# Copyright 1999-2007 The OpenLDAP Foundation, All Rights Reserved. +# $OpenLDAP: pkg/openldap-guide/admin/abstract.sdf,v 1.7.2.5 2008/02/11 23:26:39 kurt Exp $ +# Copyright 1999-2008 The OpenLDAP Foundation, All Rights Reserved. # COPYING RESTRICTIONS APPLY, see COPYRIGHT. # # OpenLDAP Administrator's Guide: Abstract diff -Nru openldap2.3-2.4.7/doc/guide/admin/access-control.sdf openldap2.3-2.4.9/doc/guide/admin/access-control.sdf --- openldap2.3-2.4.7/doc/guide/admin/access-control.sdf 1969-12-31 19:00:00.000000000 -0500 +++ openldap2.3-2.4.9/doc/guide/admin/access-control.sdf 2008-04-14 16:35:10.000000000 -0400 @@ -0,0 +1,1539 @@ +# $OpenLDAP: pkg/openldap-guide/admin/access-control.sdf,v 1.3.2.1 2008/04/14 20:35:10 quanah Exp $ +# Copyright 1999-2008 The OpenLDAP Foundation, All Rights Reserved. +# COPYING RESTRICTIONS APPLY, see COPYRIGHT. + +H1: Access Control + +H2: Introduction + +As the directory gets populated with more and more data of varying sensitivity, +controlling the kinds of access granted to the directory becomes more and more +critical. For instance, the directory may contain data of a confidential nature +that you may need to protect by contract or by law. Or, if using the directory +to control access to other services, inappropriate access to the directory may +create avenues of attack to your sites security that result in devastating +damage to your assets. + +Access to your directory can be configured via two methods, the first using +{{SECT:The slapd Configuration File}} and the second using the {{slapd-config}}(5) +format ({{SECT:Configuring slapd}}). + +The default access control policy is allow read by all clients. Regardless of +what access control policy is defined, the {{rootdn}} is always allowed full +rights (i.e. auth, search, compare, read and write) on everything and anything. + +As a consequence, it's useless (and results in a performance penalty) to explicitly +list the {{rootdn}} among the {{}} clauses. + +The following sections will describe Access Control Lists in more details and +follow with some examples and recommendations. + +H2: Access Control via Static Configuration + +Access to entries and attributes is controlled by the +access configuration file directive. The general form of an +access line is: + +> ::= access to +> [by [] [] ]+ +> ::= * | +> [dn[.]= | dn.=] +> [filter=] [attrs=] +> ::= regex | exact +> ::= base | one | subtree | children +> ::= [val[.]=] | , +> ::= | entry | children +> ::= * | [anonymous | users | self +> | dn[.]= | dn.=] +> [dnattr=] +> [group[/[/][.]]=] +> [peername[.]=] +> [sockname[.]=] +> [domain[.]=] +> [sockurl[.]=] +> [set=] +> [aci=] +> ::= [self]{|} +> ::= none | disclose | auth | compare | search | read | write | manage +> ::= {=|+|-}{m|w|r|s|c|x|d|0}+ +> ::= [stop | continue | break] + +where the part selects the entries and/or attributes to which +the access applies, the {{EX:}} part specifies which entities +are granted access, and the {{EX:}} part specifies the +access granted. Multiple {{EX: }} triplets +are supported, allowing many entities to be granted different access +to the same set of entries and attributes. Not all of these access +control options are described here; for more details see the +{{slapd.access}}(5) man page. + + +H3: What to control access to + +The part of an access specification determines the entries +and attributes to which the access control applies. Entries are +commonly selected in two ways: by DN and by filter. The following +qualifiers select entries by DN: + +> to * +> to dn[.]= +> to dn.= + +The first form is used to select all entries. The second form may +be used to select entries by matching a regular expression against +the target entry's {{normalized DN}}. (The second form is not +discussed further in this document.) The third form is used to +select entries which are within the requested scope of DN. The + is a string representation of the Distinguished Name, as +described in {{REF:RFC4514}}. + +The scope can be either {{EX:base}}, {{EX:one}}, {{EX:subtree}}, +or {{EX:children}}. Where {{EX:base}} matches only the entry with +provided DN, {{EX:one}} matches the entries whose parent is the +provided DN, {{EX:subtree}} matches all entries in the subtree whose +root is the provided DN, and {{EX:children}} matches all entries +under the DN (but not the entry named by the DN). + +For example, if the directory contained entries named: + +> 0: o=suffix +> 1: cn=Manager,o=suffix +> 2: ou=people,o=suffix +> 3: uid=kdz,ou=people,o=suffix +> 4: cn=addresses,uid=kdz,ou=people,o=suffix +> 5: uid=hyc,ou=people,o=suffix + +\Then: +. {{EX:dn.base="ou=people,o=suffix"}} match 2; +. {{EX:dn.one="ou=people,o=suffix"}} match 3, and 5; +. {{EX:dn.subtree="ou=people,o=suffix"}} match 2, 3, 4, and 5; and +. {{EX:dn.children="ou=people,o=suffix"}} match 3, 4, and 5. + + +Entries may also be selected using a filter: + +> to filter= + +where is a string representation of an LDAP +search filter, as described in {{REF:RFC4515}}. For example: + +> to filter=(objectClass=person) + +Note that entries may be selected by both DN and filter by +including both qualifiers in the clause. + +> to dn.one="ou=people,o=suffix" filter=(objectClass=person) + +Attributes within an entry are selected by including a comma-separated +list of attribute names in the selector: + +> attrs= + +A specific value of an attribute is selected by using a single +attribute name and also using a value selector: + +> attrs= val[.