From fedora-directory-commits at redhat.com Mon Oct 1 05:24:59 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 1 Oct 2007 01:24:59 -0400 Subject: [Fedora-directory-commits] ldapserver Makefile.in, 1.70, 1.71 configure, 1.64, 1.65 aclocal.m4, 1.51, 1.52 Makefile.am, 1.57, 1.58 Message-ID: <200710010524.l915OxIW008853@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8798 Modified Files: Makefile.in configure aclocal.m4 Makefile.am Log Message: Resolves: #312811 Summary: Installation failed. template files not found. Description: Added template-sasl.ldif to Makefile.am Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- Makefile.in 12 Sep 2007 15:20:59 -0000 1.70 +++ Makefile.in 1 Oct 2007 05:24:56 -0000 1.71 @@ -850,7 +850,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ -SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOLARIS_FALSE = @SOLARIS_FALSE@ @@ -1057,7 +1056,6 @@ ldap/ldif/template-pampta.ldif \ ldap/ldif/template-dnaplugin.ldif \ ldap/ldif/template-bitwise.ldif \ - ldap/ldif/template-dse.ldif \ ldap/ldif/template-org.ldif \ ldap/ldif/template-domain.ldif \ ldap/ldif/template-state.ldif \ @@ -1065,6 +1063,7 @@ ldap/ldif/template-country.ldif \ ldap/ldif/template-orgunit.ldif \ ldap/ldif/template-baseacis.ldif \ + ldap/ldif/template-sasl.ldif \ $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-FamilyNames \ $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-GivenNames \ $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-OrgUnits Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.64 retrieving revision 1.65 diff -u -r1.64 -r1.65 --- configure 12 Sep 2007 15:20:59 -0000 1.64 +++ configure 1 Oct 2007 05:24:56 -0000 1.65 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for dirsrv 1.1.0b1. +# Generated by GNU Autoconf 2.59 for dirsrv 8.0.0. # # Report bugs to . # @@ -423,8 +423,8 @@ # Identity of this package. PACKAGE_NAME='dirsrv' PACKAGE_TARNAME='dirsrv' -PACKAGE_VERSION='1.1.0b1' -PACKAGE_STRING='dirsrv 1.1.0b1' +PACKAGE_VERSION='8.0.0' +PACKAGE_STRING='dirsrv 8.0.0' PACKAGE_BUGREPORT='http://bugzilla.redhat.com/' # Factoring default headers for most tests. @@ -465,7 +465,7 @@ #endif" ac_default_prefix=/opt/$PACKAGE_NAME -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 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 MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP! P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor 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 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 MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CX! XCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -954,7 +954,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dirsrv 1.1.0b1 to adapt to many kinds of systems. +\`configure' configures dirsrv 8.0.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1020,7 +1020,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dirsrv 1.1.0b1:";; + short | recursive ) echo "Configuration of dirsrv 8.0.0:";; esac cat <<\_ACEOF @@ -1201,7 +1201,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -dirsrv configure 1.1.0b1 +dirsrv configure 8.0.0 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1215,7 +1215,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dirsrv $as_me 1.1.0b1, which was +It was created by dirsrv $as_me 8.0.0, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1861,7 +1861,7 @@ # Define the identity of the package. PACKAGE='dirsrv' - VERSION='1.1.0b1' + VERSION='8.0.0' cat >>confdefs.h <<_ACEOF @@ -3836,7 +3836,6 @@ done done done -IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -3871,7 +3870,6 @@ fi SED=$lt_cv_path_SED - echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 @@ -4312,7 +4310,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4315 "configure"' > conftest.$ac_ext + echo '#line 4313 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5447,7 +5445,7 @@ # Provide some information about the compiler. -echo "$as_me:5450:" \ +echo "$as_me:5448:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6510,11 +6508,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:6513: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6511: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6517: \$? = $ac_status" >&5 + echo "$as_me:6515: \$? = $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. @@ -6778,11 +6776,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:6781: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6779: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6785: \$? = $ac_status" >&5 + echo "$as_me:6783: \$? = $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. @@ -6882,11 +6880,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:6885: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6883: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6889: \$? = $ac_status" >&5 + echo "$as_me:6887: \$? = $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 @@ -8347,31 +8345,10 @@ # before this can be enabled. hardcode_into_libs=yes - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 8354 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -9248,7 +9225,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11668: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11698: \$? = $ac_status" >&5 + echo "$as_me:11672: \$? = $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. @@ -11795,11 +11769,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:11798: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11772: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11802: \$? = $ac_status" >&5 + echo "$as_me:11776: \$? = $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 @@ -12327,31 +12301,10 @@ # before this can be enabled. hardcode_into_libs=yes - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 12334 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -12735,9 +12688,6 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - # An ERE matcher. EGREP=$lt_EGREP @@ -12871,11 +12821,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. @@ -12887,7 +12837,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -12967,7 +12917,7 @@ link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -13389,11 +13339,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:13392: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13342: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13396: \$? = $ac_status" >&5 + echo "$as_me:13346: \$? = $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. @@ -13493,11 +13443,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:13496: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13446: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13500: \$? = $ac_status" >&5 + echo "$as_me:13450: \$? = $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 @@ -14938,31 +14888,10 @@ # before this can be enabled. hardcode_into_libs=yes - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 14945 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -15346,9 +15275,6 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - # An ERE matcher. EGREP=$lt_EGREP @@ -15482,11 +15408,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. @@ -15498,7 +15424,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -15578,7 +15504,7 @@ link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -15720,11 +15646,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:15723: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15649: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15727: \$? = $ac_status" >&5 + echo "$as_me:15653: \$? = $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. @@ -15988,11 +15914,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:15991: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15917: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15995: \$? = $ac_status" >&5 + echo "$as_me:15921: \$? = $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. @@ -16092,11 +16018,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:16095: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16021: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16099: \$? = $ac_status" >&5 + echo "$as_me:16025: \$? = $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 @@ -17557,31 +17483,10 @@ # before this can be enabled. hardcode_into_libs=yes - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 17564 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -17965,9 +17870,6 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - # An ERE matcher. EGREP=$lt_EGREP @@ -18101,11 +18003,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. @@ -18117,7 +18019,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -18197,7 +18099,7 @@ link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -18449,9 +18351,6 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_RC -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - # An ERE matcher. EGREP=$lt_EGREP @@ -18585,11 +18484,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. @@ -18601,7 +18500,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -18681,7 +18580,7 @@ link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -23055,9 +22954,9 @@ # the default prefix - override with --prefix or --with-fhs -brand=fedora -capbrand=Fedora -vendor="Fedora Project" +brand=redhat +capbrand='Red Hat' +vendor="Red Hat" # BEGIN COPYRIGHT BLOCK # Copyright (C) 2006 Red Hat, Inc. @@ -25704,7 +25603,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by dirsrv $as_me 1.1.0b1, which was +This file was extended by dirsrv $as_me 8.0.0, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -25767,7 +25666,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -dirsrv config.status 1.1.0b1 +dirsrv config.status 8.0.0 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -26020,7 +25919,6 @@ s, at CCDEPMODE@,$CCDEPMODE,;t t s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t -s, at SED@,$SED,;t t s, at EGREP@,$EGREP,;t t s, at LN_S@,$LN_S,;t t s, at ECHO@,$ECHO,;t t Index: aclocal.m4 =================================================================== RCS file: /cvs/dirsec/ldapserver/aclocal.m4,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- aclocal.m4 12 Sep 2007 15:20:59 -0000 1.51 +++ aclocal.m4 1 Oct 2007 05:24:56 -0000 1.52 @@ -1578,27 +1578,10 @@ # before this can be enabled. hardcode_into_libs=yes - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -4305,9 +4288,6 @@ # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - # An ERE matcher. EGREP=$lt_EGREP @@ -4441,11 +4421,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. @@ -4457,7 +4437,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -4537,7 +4517,7 @@ link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -6373,7 +6353,6 @@ done done done -IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -6406,7 +6385,6 @@ done ]) SED=$lt_cv_path_SED -AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.am,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- Makefile.am 7 Sep 2007 19:08:44 -0000 1.57 +++ Makefile.am 1 Oct 2007 05:24:56 -0000 1.58 @@ -145,7 +145,6 @@ ldap/ldif/template-pampta.ldif \ ldap/ldif/template-dnaplugin.ldif \ ldap/ldif/template-bitwise.ldif \ - ldap/ldif/template-dse.ldif \ ldap/ldif/template-org.ldif \ ldap/ldif/template-domain.ldif \ ldap/ldif/template-state.ldif \ @@ -153,6 +152,7 @@ ldap/ldif/template-country.ldif \ ldap/ldif/template-orgunit.ldif \ ldap/ldif/template-baseacis.ldif \ + ldap/ldif/template-sasl.ldif \ $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-FamilyNames \ $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-GivenNames \ $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-OrgUnits From fedora-directory-commits at redhat.com Mon Oct 1 06:02:36 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 1 Oct 2007 02:02:36 -0400 Subject: [Fedora-directory-commits] ldapserver configure,1.65,1.66 Message-ID: <200710010602.l9162aKV016637@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16572 Modified Files: configure Log Message: Fixed the brand and version mistakenly put in the previous check-in. Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.65 retrieving revision 1.66 diff -u -r1.65 -r1.66 --- configure 1 Oct 2007 05:24:56 -0000 1.65 +++ configure 1 Oct 2007 06:02:33 -0000 1.66 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for dirsrv 8.0.0. +# Generated by GNU Autoconf 2.59 for dirsrv 1.1.0b1. # # Report bugs to . # @@ -423,8 +423,8 @@ # Identity of this package. PACKAGE_NAME='dirsrv' PACKAGE_TARNAME='dirsrv' -PACKAGE_VERSION='8.0.0' -PACKAGE_STRING='dirsrv 8.0.0' +PACKAGE_VERSION='1.1.0b1' +PACKAGE_STRING='dirsrv 1.1.0b1' PACKAGE_BUGREPORT='http://bugzilla.redhat.com/' # Factoring default headers for most tests. @@ -954,7 +954,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dirsrv 8.0.0 to adapt to many kinds of systems. +\`configure' configures dirsrv 1.1.0b1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1020,7 +1020,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dirsrv 8.0.0:";; + short | recursive ) echo "Configuration of dirsrv 1.1.0b1:";; esac cat <<\_ACEOF @@ -1201,7 +1201,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -dirsrv configure 8.0.0 +dirsrv configure 1.1.0b1 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1215,7 +1215,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dirsrv $as_me 8.0.0, which was +It was created by dirsrv $as_me 1.1.0b1, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1861,7 +1861,7 @@ # Define the identity of the package. PACKAGE='dirsrv' - VERSION='8.0.0' + VERSION='1.1.0b1' cat >>confdefs.h <<_ACEOF @@ -22954,9 +22954,9 @@ # the default prefix - override with --prefix or --with-fhs -brand=redhat -capbrand='Red Hat' -vendor="Red Hat" +brand=fedora +capbrand=Fedora +vendor="Fedora Project" # BEGIN COPYRIGHT BLOCK # Copyright (C) 2006 Red Hat, Inc. @@ -25603,7 +25603,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by dirsrv $as_me 8.0.0, which was +This file was extended by dirsrv $as_me 1.1.0b1, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -25666,7 +25666,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -dirsrv config.status 8.0.0 +dirsrv config.status 1.1.0b1 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" From fedora-directory-commits at redhat.com Mon Oct 1 15:59:37 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Mon, 1 Oct 2007 11:59:37 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/ldif template-sasl.ldif.in, 1.1, 1.2 Message-ID: <200710011559.l91FxbRN005262@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/ldif In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5232 Modified Files: template-sasl.ldif.in Log Message: Resolves: 311851 Summary: Added container entries for sasl mappings. Index: template-sasl.ldif.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/ldif/template-sasl.ldif.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- template-sasl.ldif.in 28 Sep 2007 23:34:55 -0000 1.1 +++ template-sasl.ldif.in 1 Oct 2007 15:59:35 -0000 1.2 @@ -1,4 +1,14 @@ # replace the Suffix token with your suffix e.g. dc=example,dc=com +dn: cn=sasl,cn=config +objectClass: top +objectClass: nsContainer +cn: sasl + +dn: cn=mapping,cn=sasl,cn=config +objectClass: top +objectClass: nsContainer +cn: mapping + dn: cn=Kerberos uid mapping,cn=mapping,cn=sasl,cn=config objectClass: top objectClass: nsSaslMapping From fedora-directory-commits at redhat.com Mon Oct 1 18:52:37 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Mon, 1 Oct 2007 14:52:37 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm ldbm_add.c, 1.6, 1.7 Message-ID: <200710011852.l91Iqbmh010889@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10823 Modified Files: ldbm_add.c Log Message: Resolves: 238517 Summary: Add entries to entrycache after adding operational attributes. Index: ldbm_add.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_add.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ldbm_add.c 10 Nov 2006 23:45:39 -0000 1.6 +++ ldbm_add.c 1 Oct 2007 18:52:35 -0000 1.7 @@ -458,13 +458,6 @@ slapi_entry_add_string(addingentry->ep_entry, SLAPI_ATTR_VALUE_PARENT_UNIQUEID, operation->o_params.p.p_add.parentuniqueid); } } - if ( cache_add_tentative( &inst->inst_cache, addingentry, NULL )!= 0 ) - { - LDAPDebug( LDAP_DEBUG_CACHE, "cache_add_tentative concurrency detected\n", 0, 0, 0 ); - ldap_result_code= LDAP_ALREADY_EXISTS; - goto error_return; - } - addingentry_in_cache= 1; } /* @@ -537,6 +530,16 @@ add_update_entry_operational_attributes(addingentry, pid); } + /* Tentatively add the entry to the cache. We do this after adding any + * operational attributes to ensure that the cache is sized correctly. */ + if ( cache_add_tentative( &inst->inst_cache, addingentry, NULL )!= 0 ) + { + LDAPDebug( LDAP_DEBUG_CACHE, "cache_add_tentative concurrency detected\n", 0, 0, 0 ); + ldap_result_code= LDAP_ALREADY_EXISTS; + goto error_return; + } + addingentry_in_cache= 1; + /* * Before we add the entry, find out if the syntax of the aci * aci attribute values are correct or not. We don't want to From fedora-directory-commits at redhat.com Mon Oct 1 19:04:05 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Mon, 1 Oct 2007 15:04:05 -0400 Subject: [Fedora-directory-commits] ldapserver Makefile.in, 1.71, 1.72 aclocal.m4, 1.52, 1.53 configure, 1.66, 1.67 ltmain.sh, 1.20, 1.21 Message-ID: <200710011904.l91J45Z6020960@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20925 Modified Files: Makefile.in aclocal.m4 configure ltmain.sh Log Message: Summary: Re-generated autotools build files. Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.71 retrieving revision 1.72 diff -u -r1.71 -r1.72 --- Makefile.in 1 Oct 2007 05:24:56 -0000 1.71 +++ Makefile.in 1 Oct 2007 19:04:02 -0000 1.72 @@ -850,6 +850,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOLARIS_FALSE = @SOLARIS_FALSE@ Index: aclocal.m4 =================================================================== RCS file: /cvs/dirsec/ldapserver/aclocal.m4,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- aclocal.m4 1 Oct 2007 05:24:56 -0000 1.52 +++ aclocal.m4 1 Oct 2007 19:04:02 -0000 1.53 @@ -1578,10 +1578,27 @@ # before this can be enabled. hardcode_into_libs=yes + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -4288,6 +4305,9 @@ # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + # An ERE matcher. EGREP=$lt_EGREP @@ -4421,11 +4441,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) +predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) +postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -4437,7 +4457,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) +compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -4517,7 +4537,7 @@ link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -6353,6 +6373,7 @@ done done done +IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -6385,6 +6406,7 @@ done ]) SED=$lt_cv_path_SED +AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.66 retrieving revision 1.67 diff -u -r1.66 -r1.67 --- configure 1 Oct 2007 06:02:33 -0000 1.66 +++ configure 1 Oct 2007 19:04:02 -0000 1.67 @@ -465,7 +465,7 @@ #endif" ac_default_prefix=/opt/$PACKAGE_NAME -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 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 MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CX! XCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor 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 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 MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP! P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -3836,6 +3836,7 @@ done done done +IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -3870,6 +3871,7 @@ fi SED=$lt_cv_path_SED + echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 @@ -4310,7 +4312,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4313 "configure"' > conftest.$ac_ext + echo '#line 4315 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5445,7 +5447,7 @@ # Provide some information about the compiler. -echo "$as_me:5448:" \ +echo "$as_me:5450:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6508,11 +6510,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:6511: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6513: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6515: \$? = $ac_status" >&5 + echo "$as_me:6517: \$? = $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. @@ -6776,11 +6778,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:6779: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6781: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6783: \$? = $ac_status" >&5 + echo "$as_me:6785: \$? = $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. @@ -6880,11 +6882,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:6883: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6885: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6887: \$? = $ac_status" >&5 + echo "$as_me:6889: \$? = $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 @@ -8345,10 +8347,31 @@ # before this can be enabled. hardcode_into_libs=yes + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 8354 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -9225,7 +9248,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11694: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11672: \$? = $ac_status" >&5 + echo "$as_me:11698: \$? = $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. @@ -11769,11 +11795,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:11772: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11798: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11776: \$? = $ac_status" >&5 + echo "$as_me:11802: \$? = $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 @@ -12301,10 +12327,31 @@ # before this can be enabled. hardcode_into_libs=yes + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 12334 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -12688,6 +12735,9 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + # An ERE matcher. EGREP=$lt_EGREP @@ -12821,11 +12871,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects_CXX +predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects_CXX +postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -12837,7 +12887,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -12917,7 +12967,7 @@ link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -13339,11 +13389,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:13342: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13392: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13346: \$? = $ac_status" >&5 + echo "$as_me:13396: \$? = $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. @@ -13443,11 +13493,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:13446: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13496: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13450: \$? = $ac_status" >&5 + echo "$as_me:13500: \$? = $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 @@ -14888,10 +14938,31 @@ # before this can be enabled. hardcode_into_libs=yes + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 14945 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -15275,6 +15346,9 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + # An ERE matcher. EGREP=$lt_EGREP @@ -15408,11 +15482,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects_F77 +predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects_F77 +postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -15424,7 +15498,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_F77 +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -15504,7 +15578,7 @@ link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -15646,11 +15720,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:15649: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15723: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15653: \$? = $ac_status" >&5 + echo "$as_me:15727: \$? = $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. @@ -15914,11 +15988,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:15917: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15991: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15921: \$? = $ac_status" >&5 + echo "$as_me:15995: \$? = $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. @@ -16018,11 +16092,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:16021: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16095: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16025: \$? = $ac_status" >&5 + echo "$as_me:16099: \$? = $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 @@ -17483,10 +17557,31 @@ # before this can be enabled. hardcode_into_libs=yes + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 17564 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -17870,6 +17965,9 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + # An ERE matcher. EGREP=$lt_EGREP @@ -18003,11 +18101,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects_GCJ +predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects_GCJ +postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -18019,7 +18117,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -18099,7 +18197,7 @@ link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -18351,6 +18449,9 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_RC +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + # An ERE matcher. EGREP=$lt_EGREP @@ -18484,11 +18585,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects_RC +predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects_RC +postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -18500,7 +18601,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_RC +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -18580,7 +18681,7 @@ link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -25919,6 +26020,7 @@ s, at CCDEPMODE@,$CCDEPMODE,;t t s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t +s, at SED@,$SED,;t t s, at EGREP@,$EGREP,;t t s, at LN_S@,$LN_S,;t t s, at ECHO@,$ECHO,;t t Index: ltmain.sh =================================================================== RCS file: /cvs/dirsec/ldapserver/ltmain.sh,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- ltmain.sh 7 Sep 2007 19:08:44 -0000 1.20 +++ ltmain.sh 1 Oct 2007 19:04:02 -0000 1.21 @@ -46,10 +46,16 @@ VERSION=1.5.22 TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes. -if test -n "${ZSH_VERSION+set}" ; then +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi # Check that we have a working $echo. @@ -105,12 +111,14 @@ # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). # We save the old values to restore during execute mode. -if test "${LC_ALL+set}" = set; then - save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL -fi -if test "${LANG+set}" = set; then - save_LANG="$LANG"; LANG=C; export LANG -fi +for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + fi" +done # Make sure IFS has a sensible default lt_nl=' @@ -136,6 +144,8 @@ preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 ##################################### # Shell function definitions: @@ -327,7 +337,17 @@ *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xdir="$my_gentop/$my_xlib" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" @@ -758,6 +778,7 @@ *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; + *.obj) xform=obj ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` @@ -1138,8 +1159,9 @@ for arg do case $arg in - -all-static | -static) - if test "X$arg" = "X-all-static"; then + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 fi @@ -1147,12 +1169,20 @@ dlopen_self=$dlopen_self_static fi prefer_static_libs=yes - else + ;; + -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built - fi + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac build_libtool_libs=no build_old_libs=yes break @@ -1712,7 +1742,7 @@ continue ;; - -static) + -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects @@ -2490,7 +2520,9 @@ if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. @@ -3186,7 +3218,7 @@ # which has an extra 1 added just for fun # case $version_type in - darwin|linux|osf|windows) + darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" @@ -3410,11 +3442,11 @@ fi # Eliminate all temporary directories. - for path in $notinst_path; do - lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - done +# for path in $notinst_path; do +# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` +# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` +# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` +# done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. @@ -3515,13 +3547,12 @@ int main() { return 0; } EOF $rm conftest - $LTCC $LTCFLAGS -o conftest conftest.c $deplibs - if test "$?" -eq 0 ; then + if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then ldd_output=`ldd conftest` for i in $deplibs; do name=`expr $i : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" -ne "0"; then + if test "$name" != "" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) @@ -3560,9 +3591,7 @@ # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" != "0"; then $rm conftest - $LTCC $LTCFLAGS -o conftest conftest.c $i - # Did it work? - if test "$?" -eq 0 ; then + if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in @@ -3594,7 +3623,7 @@ droppeddeps=yes $echo $echo "*** Warning! Library $i is needed by this library but I was not able to" - $echo "*** make it link in! You will probably need to install it or some" + $echo "*** make it link in! You will probably need to install it or some" $echo "*** library that it depends on before this library will be fully" $echo "*** functional. Installing it before continuing would be even better." fi @@ -4239,12 +4268,14 @@ reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then - eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" @@ -4692,16 +4723,16 @@ case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; @@ -4716,13 +4747,13 @@ # really was required. # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. @@ -4809,7 +4840,7 @@ if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= @@ -4846,7 +4877,7 @@ fi done relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. @@ -5253,6 +5284,18 @@ Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi + # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @@ -5395,7 +5438,7 @@ ;; esac $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else @@ -5581,7 +5624,7 @@ done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi @@ -5926,9 +5969,9 @@ if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 @@ -6137,7 +6180,7 @@ file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : @@ -6413,12 +6456,15 @@ fi # Restore saved environment variables - if test "${save_LC_ALL+set}" = set; then - LC_ALL="$save_LC_ALL"; export LC_ALL - fi - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - fi + for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + # Now prepare to actually exec the command. exec_cmd="\$cmd$args" @@ -6775,9 +6821,9 @@ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE + try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX - try to export only the symbols matching REGEX + try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened @@ -6791,9 +6837,11 @@ -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of libtool libraries + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] + specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. From fedora-directory-commits at redhat.com Mon Oct 1 23:22:41 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Mon, 1 Oct 2007 19:22:41 -0400 Subject: [Fedora-directory-commits] ldapserver/wrappers ldclt.in,1.2,1.3 Message-ID: <200710012322.l91NMfqO008028@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/wrappers In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7987/wrappers Modified Files: ldclt.in Log Message: Resolves: 314791 Summary: Set SASL_PATH in ldclt wrapper script. Index: ldclt.in =================================================================== RCS file: /cvs/dirsec/ldapserver/wrappers/ldclt.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ldclt.in 2 Nov 2006 03:11:40 -0000 1.2 +++ ldclt.in 1 Oct 2007 23:22:39 -0000 1.3 @@ -16,6 +16,8 @@ LD_LIBRARY_PATH=${LIB_DIR} export LD_LIBRARY_PATH +SASL_PATH=@sasl_path@ +export SASL_PATH ############################################################################### From fedora-directory-commits at redhat.com Mon Oct 1 23:22:41 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Mon, 1 Oct 2007 19:22:41 -0400 Subject: [Fedora-directory-commits] ldapserver Makefile.am, 1.58, 1.59 Makefile.in, 1.72, 1.73 configure, 1.67, 1.68 configure.ac, 1.37, 1.38 Message-ID: <200710012322.l91NMfHE008024@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7987 Modified Files: Makefile.am Makefile.in configure configure.ac Log Message: Resolves: 314791 Summary: Set SASL_PATH in ldclt wrapper script. Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.am,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- Makefile.am 1 Oct 2007 05:24:56 -0000 1.58 +++ Makefile.am 1 Oct 2007 23:22:37 -0000 1.59 @@ -1005,6 +1005,7 @@ -e 's, at db_libdir\@,$(libdir),g' \ -e 's, at db_bindir\@,$(bindir),g' \ -e 's, at sasl_libdir\@,$(libdir),g' \ + -e 's, at sasl_path\@,$(libdir)/sasl2,g' \ -e 's, at netsnmp_libdir\@,$(libdir),g' \ -e 's, at propertydir\@,$(propertydir),g' \ -e 's, at datadir\@,$(datadir),g' \ @@ -1051,6 +1052,7 @@ -e 's, at db_libdir\@,$(db_libdir),g' \ -e 's, at db_bindir\@,$(db_bindir),g' \ -e 's, at sasl_libdir\@,$(sasl_libdir),g' \ + -e 's, at sasl_path\@, at sasl_path@,g' \ -e 's, at netsnmp_libdir\@,$(netsnmp_libdir),g' \ -e 's, at propertydir\@,$(propertydir),g' \ -e 's, at datadir\@,$(datadir),g' \ Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.72 retrieving revision 1.73 diff -u -r1.72 -r1.73 --- Makefile.in 1 Oct 2007 19:04:02 -0000 1.72 +++ Makefile.in 1 Oct 2007 23:22:37 -0000 1.73 @@ -949,6 +949,7 @@ sasl_inc = @sasl_inc@ sasl_lib = @sasl_lib@ sasl_libdir = @sasl_libdir@ +sasl_path = @sasl_path@ sbindir = @sbindir@ schemadir = $(sysconfdir)@schemadir@ scripttemplatedir = @scripttemplatedir@ @@ -1875,6 +1876,7 @@ @BUNDLE_FALSE@ -e 's, at db_libdir\@,$(db_libdir),g' \ @BUNDLE_FALSE@ -e 's, at db_bindir\@,$(db_bindir),g' \ @BUNDLE_FALSE@ -e 's, at sasl_libdir\@,$(sasl_libdir),g' \ + at BUNDLE_FALSE@ -e 's, at sasl_path\@, at sasl_path@,g' \ @BUNDLE_FALSE@ -e 's, at netsnmp_libdir\@,$(netsnmp_libdir),g' \ @BUNDLE_FALSE@ -e 's, at propertydir\@,$(propertydir),g' \ @BUNDLE_FALSE@ -e 's, at datadir\@,$(datadir),g' \ @@ -1931,6 +1933,7 @@ @BUNDLE_TRUE@ -e 's, at db_libdir\@,$(libdir),g' \ @BUNDLE_TRUE@ -e 's, at db_bindir\@,$(bindir),g' \ @BUNDLE_TRUE@ -e 's, at sasl_libdir\@,$(libdir),g' \ + at BUNDLE_TRUE@ -e 's, at sasl_path\@,$(libdir)/sasl2,g' \ @BUNDLE_TRUE@ -e 's, at netsnmp_libdir\@,$(libdir),g' \ @BUNDLE_TRUE@ -e 's, at propertydir\@,$(propertydir),g' \ @BUNDLE_TRUE@ -e 's, at datadir\@,$(datadir),g' \ Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.67 retrieving revision 1.68 diff -u -r1.67 -r1.68 --- configure 1 Oct 2007 19:04:02 -0000 1.67 +++ configure 1 Oct 2007 23:22:38 -0000 1.68 @@ -465,7 +465,7 @@ #endif" ac_default_prefix=/opt/$PACKAGE_NAME -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 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 MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP! P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor 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 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 MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP! P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir sasl_path svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -25188,6 +25188,13 @@ PACKAGE_BASE_VERSION=`echo $PACKAGE_VERSION | awk -F\. '{print $1"."$2}'` +# set sasl_path for wrapper scripts +if test -z "$sasl_libdir" ; then + sasl_path="$libdir/sasl2" +else + sasl_path="$sasl_libdir/sasl2" +fi + # write out paths for binary components @@ -25223,6 +25230,7 @@ + cat >>confdefs.h <<\_ACEOF #define LDAP_DEBUG 1 _ACEOF @@ -26095,6 +26103,7 @@ s, at sasl_inc@,$sasl_inc,;t t s, at sasl_lib@,$sasl_lib,;t t s, at sasl_libdir@,$sasl_libdir,;t t +s, at sasl_path@,$sasl_path,;t t s, at svrcore_inc@,$svrcore_inc,;t t s, at svrcore_lib@,$svrcore_lib,;t t s, at icu_lib@,$icu_lib,;t t Index: configure.ac =================================================================== RCS file: /cvs/dirsec/ldapserver/configure.ac,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- configure.ac 22 Aug 2007 05:11:34 -0000 1.37 +++ configure.ac 1 Oct 2007 23:22:38 -0000 1.38 @@ -343,6 +343,13 @@ PACKAGE_BASE_VERSION=`echo $PACKAGE_VERSION | awk -F\. '{print $1"."$2}'` AC_SUBST(PACKAGE_BASE_VERSION) +# set sasl_path for wrapper scripts +if test -z "$sasl_libdir" ; then + sasl_path="$libdir/sasl2" +else + sasl_path="$sasl_libdir/sasl2" +fi + # write out paths for binary components AC_SUBST(nspr_inc) AC_SUBST(nspr_lib) @@ -363,6 +370,7 @@ AC_SUBST(sasl_inc) AC_SUBST(sasl_lib) AC_SUBST(sasl_libdir) +AC_SUBST(sasl_path) AC_SUBST(svrcore_inc) AC_SUBST(svrcore_lib) AC_SUBST(icu_lib) From fedora-directory-commits at redhat.com Tue Oct 2 18:39:52 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 2 Oct 2007 14:39:52 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/syntaxes cis.c, 1.5, 1.6 int.c, 1.6, 1.7 value.c, 1.7, 1.8 Message-ID: <200710021839.l92Idq8c008591@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8531/ldapserver/ldap/servers/plugins/syntaxes Modified Files: cis.c int.c value.c Log Message: Resolves: bug 249366 Bug Description: rhds71 - search filters returns too many entries on integer attributes value greater than 2 to the power of 31 Reviewed by: nkinder, nhosoi (Thanks!) Fix Description: The way >= and <= searches are supposed to work in LDAP is that you are supposed to define an ORDERING matching rule for the attribute you want to use in the search filter. The way our code is written, most strings "just work" as a side effect of the way bdb sorts the keys by default - so you can do (uid>=jvedder) and get what you would expect, even though LDAP says this is illegal because the schema definition of the uid attribute does not have an ORDERING matching rule. And INTEGER worked with the old binary format for the same reason. The only attribute definitions we use with ORDERING are attributes that use Generalized Time syntax (e.g. createTimestamp, et. al.) and numSubordinates (which uses INTEGER, but this is a special case handled internally by the db code). The way it works now is that the indexing code will honor the ORDERING matching rule specified in the schema definition. Or, if ORDERING is not specified, the user can use the nsMatchingRule index configuration. This will allow an existing customer that depends all integer syntax attributes (e.g. uidNumber) to allow range searches by default to enable range searches without editing the schema. The syntax definition for the attribute must also specify a compare function. This compare function will be used by the bdb bt_compare() function. I also fixed a bug in the integer normalize code - a string of all zeros should normalize to a single "0". In all other cases, the leading zeros should be removed. Platforms tested: RHEL5 x86_64 Flag Day: Yes. Integer indexes will need to be rebuilt (except for numsubordinates). Doc impact: Yes - document slapi API additions QA impact: Pay close attention to tests that use >= or <= search filters, both with and without index attributes. Also, pay close attention to greater/less than searches using i18n collations. New Tests integrated into TET: Forthcoming Index: cis.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes/cis.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- cis.c 10 Nov 2006 23:45:31 -0000 1.5 +++ cis.c 2 Oct 2007 18:39:50 -0000 1.6 @@ -84,6 +84,19 @@ static char *time_names[] = { "GeneralizedTime", "time", GENERALIZEDTIME_SYNTAX_OID, 0 }; +#define GENERALIZEDTIMEMATCH_OID "2.5.13.27" +#define GENERALIZEDTIMEORDERINGMATCH_OID "2.5.13.28" +static Slapi_MatchingRuleEntry +generalizedTimeMatch = { GENERALIZEDTIMEMATCH_OID, NULL /* no alias? */, + "generalizedTimeMatch", "The rule evaluates to TRUE if and only if the attribute value represents the same universal coordinated time as the assertion value.", + GENERALIZEDTIME_SYNTAX_OID, 0 /* not obsolete */ }; + +static Slapi_MatchingRuleEntry +generalizedTimeOrderingMatch = { GENERALIZEDTIMEORDERINGMATCH_OID, NULL /* no alias? */, + "generalizedTimeOrderingMatch", "The rule evaluates to TRUE if and only if the attribute value represents a universal coordinated time that is earlier than the universal coordinated time represented by the assertion value.", + GENERALIZEDTIME_SYNTAX_OID, 0 /* not obsolete */ }; + + static char *country_names[] = { "Country String", COUNTRYSTRING_SYNTAX_OID, 0}; @@ -223,6 +236,9 @@ LDAPDebug( LDAP_DEBUG_PLUGIN, "=> time_init\n", 0, 0, 0 ); rc = register_cis_like_plugin( pb, &time_pdesc, time_names, GENERALIZEDTIME_SYNTAX_OID ); + /* also register this plugin for matching rules */ + rc |= slapi_matchingrule_register(&generalizedTimeMatch); + rc |= slapi_matchingrule_register(&generalizedTimeOrderingMatch); LDAPDebug( LDAP_DEBUG_PLUGIN, "<= time_init %d\n", rc, 0, 0 ); return( rc ); } Index: int.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes/int.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- int.c 19 Sep 2007 19:32:03 -0000 1.6 +++ int.c 2 Oct 2007 18:39:50 -0000 1.7 @@ -58,9 +58,23 @@ /* the first name is the official one from RFC 2252 */ static char *names[] = { "INTEGER", "int", INTEGER_SYNTAX_OID, 0 }; +#define INTEGERMATCH_OID "2.5.13.14" +#define INTEGERORDERINGMATCH_OID "2.5.13.15" + static Slapi_PluginDesc pdesc = { "int-syntax", PLUGIN_MAGIC_VENDOR_STR, PRODUCTTEXT, "integer attribute syntax plugin" }; +static Slapi_MatchingRuleEntry +integerMatch = { INTEGERMATCH_OID, NULL /* no alias? */, + "integerMatch", "The rule evaluates to TRUE if and only if the attribute value and the assertion value are the same integer value.", + INTEGER_SYNTAX_OID, 0 /* not obsolete */ }; + +static Slapi_MatchingRuleEntry +integerOrderingMatch = { INTEGERORDERINGMATCH_OID, NULL /* no alias? */, + "integerOrderingMatch", "The rule evaluates to TRUE if and only if the integer value of the attribute value is less than the integer value of the assertion value.", + INTEGER_SYNTAX_OID, 0 /* not obsolete */ }; + + int int_init( Slapi_PBlock *pb ) { @@ -88,6 +102,10 @@ rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_SYNTAX_COMPARE, (void *) int_compare ); + /* also register this plugin for matching rules */ + rc |= slapi_matchingrule_register(&integerMatch); + rc |= slapi_matchingrule_register(&integerOrderingMatch); + LDAPDebug( LDAP_DEBUG_PLUGIN, "<= int_init %d\n", rc, 0, 0 ); return( rc ); } Index: value.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes/value.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- value.c 19 Sep 2007 19:32:03 -0000 1.7 +++ value.c 2 Oct 2007 18:39:50 -0000 1.8 @@ -117,21 +117,25 @@ /* have to do this after trimming spaces */ if (syntax & SYNTAX_INT) { int foundsign = 0; + int foundzero = 0; + if (*s == '-') { foundsign = 1; LDAP_UTF8INC(s); } while (*s && (*s == '0')) { + foundzero = 1; LDAP_UTF8INC(s); } - /* if there is a hyphen, make sure it is just to the left - of the first significant (i.e. non-zero) digit e.g. - convert -00000001 to -1 */ - if (foundsign && (s > d)) { - *d = '-'; - d++; + if (foundzero && !*s) { /* value is all zeros */ + *d++ = '0'; /* set value to a single zero */ + } else if (foundsign && (s > d)) { + /* if there is a hyphen, make sure it is just to the left + of the first significant (i.e. non-zero) digit e.g. + convert -00000001 to -1 */ + *d++ = '-'; } /* s should now point at the first significant digit/char */ } From fedora-directory-commits at redhat.com Tue Oct 2 18:39:53 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 2 Oct 2007 14:39:53 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd match.c, 1.5, 1.6 slap.h, 1.26, 1.27 slapi-plugin.h, 1.16, 1.17 Message-ID: <200710021839.l92IdrtL008601@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8531/ldapserver/ldap/servers/slapd Modified Files: match.c slap.h slapi-plugin.h Log Message: Resolves: bug 249366 Bug Description: rhds71 - search filters returns too many entries on integer attributes value greater than 2 to the power of 31 Reviewed by: nkinder, nhosoi (Thanks!) Fix Description: The way >= and <= searches are supposed to work in LDAP is that you are supposed to define an ORDERING matching rule for the attribute you want to use in the search filter. The way our code is written, most strings "just work" as a side effect of the way bdb sorts the keys by default - so you can do (uid>=jvedder) and get what you would expect, even though LDAP says this is illegal because the schema definition of the uid attribute does not have an ORDERING matching rule. And INTEGER worked with the old binary format for the same reason. The only attribute definitions we use with ORDERING are attributes that use Generalized Time syntax (e.g. createTimestamp, et. al.) and numSubordinates (which uses INTEGER, but this is a special case handled internally by the db code). The way it works now is that the indexing code will honor the ORDERING matching rule specified in the schema definition. Or, if ORDERING is not specified, the user can use the nsMatchingRule index configuration. This will allow an existing customer that depends all integer syntax attributes (e.g. uidNumber) to allow range searches by default to enable range searches without editing the schema. The syntax definition for the attribute must also specify a compare function. This compare function will be used by the bdb bt_compare() function. I also fixed a bug in the integer normalize code - a string of all zeros should normalize to a single "0". In all other cases, the leading zeros should be removed. Platforms tested: RHEL5 x86_64 Flag Day: Yes. Integer indexes will need to be rebuilt (except for numsubordinates). Doc impact: Yes - document slapi API additions QA impact: Pay close attention to tests that use >= or <= search filters, both with and without index attributes. Also, pay close attention to greater/less than searches using i18n collations. New Tests integrated into TET: Forthcoming Index: match.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/match.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- match.c 10 Nov 2006 23:45:40 -0000 1.5 +++ match.c 2 Oct 2007 18:39:50 -0000 1.6 @@ -270,5 +270,26 @@ return(0); } +/* + See if a matching rule for this name or OID + is registered and is an ORDERING matching rule that applies + to the given syntax. +*/ +int slapi_matchingrule_is_ordering(const char *oid_or_name, const char *syntax_oid) +{ + struct matchingRuleList *mrl=NULL; + for (mrl = g_get_global_mrl(); mrl != NULL; mrl = mrl->mrl_next) { + if (mrl->mr_entry->mr_name && !strcasecmp(oid_or_name, mrl->mr_entry->mr_name)) { + return (mrl->mr_entry->mr_name && + PL_strcasestr(mrl->mr_entry->mr_name, "ordering") && + !strcmp(mrl->mr_entry->mr_syntax, syntax_oid)); + } + if (mrl->mr_entry->mr_oid && !strcmp(oid_or_name, mrl->mr_entry->mr_oid)) { + return (mrl->mr_entry->mr_name && + PL_strcasestr(mrl->mr_entry->mr_name, "ordering") && + !strcmp(mrl->mr_entry->mr_syntax, syntax_oid)); + } + } - + return 0; +} Index: slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slap.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- slap.h 7 Sep 2007 19:08:45 -0000 1.26 +++ slap.h 2 Oct 2007 18:39:50 -0000 1.27 @@ -616,15 +616,6 @@ struct objclass *oc_next; }; -typedef struct slapi_matchingRuleEntry { - char *mr_oid; - char *mr_oidalias; - char *mr_name; - char *mr_desc; - char *mr_syntax; - int mr_obsolete; -} slapi_matchingRuleEntry; - struct matchingRuleList { Slapi_MatchingRuleEntry *mr_entry; struct matchingRuleList *mrl_next; Index: slapi-plugin.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-plugin.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- slapi-plugin.h 30 Aug 2007 15:56:36 -0000 1.16 +++ slapi-plugin.h 2 Oct 2007 18:39:50 -0000 1.17 @@ -140,7 +140,6 @@ typedef struct slapi_value Slapi_Value; typedef struct slapi_value_set Slapi_ValueSet; typedef struct slapi_filter Slapi_Filter; -typedef struct slapi_matchingRuleEntry Slapi_MatchingRuleEntry; typedef struct backend Slapi_Backend; typedef struct _guid_t Slapi_UniqueID; typedef struct op Slapi_Operation; @@ -645,6 +644,16 @@ #define SLAPI_BERVAL_EQ(L,R) ((L)->bv_len == (R)->bv_len && \ ! memcmp ((L)->bv_val, (R)->bv_val, (L)->bv_len)) +typedef struct slapi_matchingRuleEntry { + char *mr_oid; + char *mr_oidalias; + char *mr_name; + char *mr_desc; + char *mr_syntax; + int mr_obsolete; +} slapi_matchingRuleEntry; +typedef struct slapi_matchingRuleEntry Slapi_MatchingRuleEntry; + Slapi_MatchingRuleEntry *slapi_matchingrule_new(void); void slapi_matchingrule_free(Slapi_MatchingRuleEntry **mrEntry, int freeMembers); @@ -652,6 +661,7 @@ int slapi_matchingrule_set(Slapi_MatchingRuleEntry *mr, int arg, void *value); int slapi_matchingrule_register(Slapi_MatchingRuleEntry *mrEntry); int slapi_matchingrule_unregister(char *oid); +int slapi_matchingrule_is_ordering(const char *oid_or_name, const char *syntax_oid); /* * access control From fedora-directory-commits at redhat.com Tue Oct 2 18:39:53 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 2 Oct 2007 14:39:53 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm back-ldbm.h, 1.9, 1.10 dblayer.c, 1.21, 1.22 import-merge.c, 1.7, 1.8 ldbm_attr.c, 1.7, 1.8 proto-back-ldbm.h, 1.13, 1.14 Message-ID: <200710021839.l92IdrB6008608@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8531/ldapserver/ldap/servers/slapd/back-ldbm Modified Files: back-ldbm.h dblayer.c import-merge.c ldbm_attr.c proto-back-ldbm.h Log Message: Resolves: bug 249366 Bug Description: rhds71 - search filters returns too many entries on integer attributes value greater than 2 to the power of 31 Reviewed by: nkinder, nhosoi (Thanks!) Fix Description: The way >= and <= searches are supposed to work in LDAP is that you are supposed to define an ORDERING matching rule for the attribute you want to use in the search filter. The way our code is written, most strings "just work" as a side effect of the way bdb sorts the keys by default - so you can do (uid>=jvedder) and get what you would expect, even though LDAP says this is illegal because the schema definition of the uid attribute does not have an ORDERING matching rule. And INTEGER worked with the old binary format for the same reason. The only attribute definitions we use with ORDERING are attributes that use Generalized Time syntax (e.g. createTimestamp, et. al.) and numSubordinates (which uses INTEGER, but this is a special case handled internally by the db code). The way it works now is that the indexing code will honor the ORDERING matching rule specified in the schema definition. Or, if ORDERING is not specified, the user can use the nsMatchingRule index configuration. This will allow an existing customer that depends all integer syntax attributes (e.g. uidNumber) to allow range searches by default to enable range searches without editing the schema. The syntax definition for the attribute must also specify a compare function. This compare function will be used by the bdb bt_compare() function. I also fixed a bug in the integer normalize code - a string of all zeros should normalize to a single "0". In all other cases, the leading zeros should be removed. Platforms tested: RHEL5 x86_64 Flag Day: Yes. Integer indexes will need to be rebuilt (except for numsubordinates). Doc impact: Yes - document slapi API additions QA impact: Pay close attention to tests that use >= or <= search filters, both with and without index attributes. Also, pay close attention to greater/less than searches using i18n collations. New Tests integrated into TET: Forthcoming Index: back-ldbm.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/back-ldbm.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- back-ldbm.h 15 Mar 2007 21:34:32 -0000 1.9 +++ back-ldbm.h 2 Oct 2007 18:39:51 -0000 1.10 @@ -364,12 +364,22 @@ * yet. */ #define IS_INDEXED( a ) ( a & INDEX_ANY ) - void *ai_plugin; + void *ai_plugin; /* the syntax plugin for this attribute */ char **ai_index_rules; /* matching rule OIDs */ void *ai_dblayer; /* private data used by the dblayer code */ PRInt32 ai_dblayer_count; /* used by the dblayer code */ idl_private *ai_idl; /* private data used by the IDL code (eg locking the IDLs) */ attrcrypt_private *ai_attrcrypt; /* private data used by the attribute encryption code (eg is it enabled or not) */ + value_compare_fn_type ai_key_cmp_fn; /* function used to compare two index keys - + The function is the compare function provided by + ai_plugin - this function is used to order + the keys in the index so that we can use ORDERING + searches. In order for this function to be used, + the syntax plugin must define a compare function, + and either the attribute definition schema must + specify an ORDERING matching rule, or the index + configuration must define an ORDERING matching rule. + */ }; #define MAXDBCACHE 20 Index: dblayer.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- dblayer.c 25 Sep 2007 22:03:19 -0000 1.21 +++ dblayer.c 2 Oct 2007 18:39:51 -0000 1.22 @@ -223,6 +223,33 @@ #define MEGABYTE (1024 * 1024) #define GIGABYTE (1024 * MEGABYTE) + +/* This function compares two index keys. It is assumed + that the values are already normalized, since they should have + been when the index was created (by int_values2keys). + + richm - actually, the current syntax compare functions + always normalize both arguments. We need to add an additional + syntax compare function that does not normalize or takes + an argument like value_cmp to specify to normalize or not. +*/ + +typedef int (*syntax_cmp_fn_type)(struct berval *, struct berval *); +static int +dblayer_bt_compare(DB *db, const DBT *dbt1, const DBT *dbt2) +{ + struct berval bv1, bv2; + value_compare_fn_type syntax_cmp_fn = (value_compare_fn_type)db->app_private; + + bv1.bv_val = (char *)dbt1->data+1; /* remove leading '=' */ + bv1.bv_len = (ber_len_t)dbt1->size-1; + + bv2.bv_val = (char *)dbt2->data+1; /* remove leading '=' */ + bv2.bv_len = (ber_len_t)dbt2->size-1; + + return syntax_cmp_fn(&bv1, &bv2); +} + /* this flag use if user remotely turned batching off */ #define FLUSH_REMOTEOFF -1 @@ -2594,7 +2621,7 @@ Success: 0 Failure: -1 */ -int dblayer_open_file(backend *be, char* indexname, int open_flag, int index_flags, DB **ppDB) +int dblayer_open_file(backend *be, char* indexname, int open_flag, struct attrinfo *ai, DB **ppDB) { struct ldbminfo *li = (struct ldbminfo *) be->be_database->plg_private; ldbm_instance *inst = (ldbm_instance *) be->be_instance_info; @@ -2682,7 +2709,7 @@ } #endif - if (idl_get_idl_new() && !(index_flags & INDEX_VLV)) { + if (idl_get_idl_new() && !(ai->ai_indexmask & INDEX_VLV)) { return_value = dbp->set_flags(dbp, DB_DUP | DB_DUPSORT); if (0 != return_value) goto out; @@ -2695,7 +2722,7 @@ goto out; } - if (index_flags & INDEX_VLV) { + if (ai->ai_indexmask & INDEX_VLV) { /* * Need index with record numbers for * Virtual List View index @@ -2703,6 +2730,24 @@ return_value = dbp->set_flags(dbp, DB_RECNUM); if (0 != return_value) goto out; + } else if (ai->ai_key_cmp_fn) { /* set in attr_index_config() */ + /* + This is so that we can have ordered keys in the index, so that + greater than/less than searches work on indexed attrs. We had + to introduce this when we changed the integer key format from + a 32/64 bit value to a normalized string value. The default + bdb key cmp is based on length and lexicographic order, which + does not work with integer strings. + + NOTE: If we ever need to use app_private for something else, we + will have to create some sort of data structure with different + fields for different uses. We will also need to have a new() + function that creates and allocates that structure, and a + destroy() function that destroys the structure, and make sure + to call it when the DB* is closed and/or freed. + */ + dbp->app_private = (void *)ai->ai_key_cmp_fn; + dbp->set_bt_compare(dbp, dblayer_bt_compare); } /* The subname argument allows applications to have @@ -2842,7 +2887,7 @@ * index file and stuff it in the attrinfo. */ return_value = dblayer_open_file(be, attribute_name, open_flags, - a->ai_indexmask, &pDB); + a, &pDB); if (0 == return_value) { /* Opened it OK */ dblayer_handle *handle = (dblayer_handle *) Index: import-merge.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/import-merge.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- import-merge.c 10 Nov 2006 23:45:39 -0000 1.7 +++ import-merge.c 2 Oct 2007 18:39:51 -0000 1.8 @@ -338,7 +338,7 @@ return 0; } -static int import_open_merge_input_files(backend *be, char *indexname, +static int import_open_merge_input_files(backend *be, IndexInfo *index_info, int passes, DB ***input_files, int *number_found, int *pass_number) { int i = 0; @@ -354,16 +354,22 @@ } for (i = 0; i < passes; i++) { DB *pDB = NULL; - char *filename = slapi_ch_smprintf("%s.%d", indexname, i+1); + char *filename = slapi_ch_smprintf("%s.%d", index_info->name, i+1); if (NULL == filename) { return -1; } if (vlv_isvlv(filename)) { - ret = dblayer_open_file(be, filename, 0, INDEX_VLV, &pDB); + /* not sure why the file would be marked as a vlv index but + not the index configuration . . . but better make sure + the new code works with the old semantics */ + int saved_mask = index_info->ai->ai_indexmask; + index_info->ai->ai_indexmask |= INDEX_VLV; + ret = dblayer_open_file(be, filename, 0, index_info->ai, &pDB); + index_info->ai->ai_indexmask = saved_mask; } else { - ret = dblayer_open_file(be, filename, 0, 0, &pDB); + ret = dblayer_open_file(be, filename, 0, index_info->ai, &pDB); } slapi_ch_free( (void**)&filename); @@ -488,7 +494,7 @@ } #endif - ret = import_open_merge_input_files(be, worker->index_info->name, + ret = import_open_merge_input_files(be, worker->index_info, passes, &input_files, &number_found, &pass_number); if (0 != ret) { import_log_notice(worker->job, "MERGE FAIL 10"); @@ -496,7 +502,7 @@ } ret = dblayer_open_file(be, worker->index_info->name, 1, - vlv_index ? INDEX_VLV : 0, &output_file); + worker->index_info->ai, &output_file); if (0 != ret) { import_log_notice(worker->job, "Failed to open output file for " "index %s in merge", worker->index_info->name); Index: ldbm_attr.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_attr.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ldbm_attr.c 10 Nov 2006 23:45:39 -0000 1.7 +++ ldbm_attr.c 2 Oct 2007 18:39:51 -0000 1.8 @@ -57,6 +57,7 @@ p->ai_dblayer= NULL; p->ai_dblayer_count = 0; p->ai_idl= NULL; + p->ai_key_cmp_fn = NULL; return p; } @@ -66,6 +67,7 @@ if(pp!=NULL && *pp!=NULL) { idl_release_private(*pp); + (*pp)->ai_key_cmp_fn = NULL; slapi_ch_free((void**)&((*pp)->ai_type)); slapi_ch_free((void**)(*pp)->ai_index_rules); slapi_ch_free((void**)pp); @@ -179,9 +181,12 @@ } } for ( i = 0; attrs[i] != NULL; i++ ) { + int need_compare_fn = 0; + char *attrsyntax_oid = NULL; a = attrinfo_new(); a->ai_type = slapi_attr_basetype( attrs[i], NULL, 0 ); slapi_attr_type2plugin( a->ai_type, &a->ai_plugin ); + attrsyntax_oid = slapi_ch_strdup(plugin_syntax2oid(a->ai_plugin)); if ( argc == 1 ) { a->ai_indexmask = (INDEX_PRESENCE | INDEX_EQUALITY | INDEX_APPROX | INDEX_SUB); @@ -245,10 +250,12 @@ preamble, officialOID, index_rules[j] ); slapi_ch_free((void**)&preamble); } - } else { + } else if (!slapi_matchingrule_is_ordering(index_rules[j], attrsyntax_oid)) { LDAPDebug (LDAP_DEBUG_ANY, "%s: line %d: " - "unknown index rule \"%s\" (ignored)\n", + "unknown or invalid matching rule \"%s\" in index configuration (ignored)\n", fname, lineno, index_rules[j] ); + } else { /* assume builtin and use compare fn provided by syntax plugin */ + need_compare_fn = 1; } {/* It would improve speed to save the indexer, for future use. But, for simplicity, we destroy it now: */ @@ -269,13 +276,8 @@ } } } -#if 0 /* seems to not matter -- INDEX_FROMINIT is checked nowhere else */ - if ( init ) { - a->ai_indexmask |= INDEX_FROMINIT; - a->ai_indexmask &= ~INDEX_OFFLINE; - } -#endif + slapi_ch_free_string(&attrsyntax_oid); /* initialize the IDL code's private data */ return_value = idl_init_private(be, a); if (0 != return_value) { @@ -285,6 +287,26 @@ exit( 1 ); } + /* if user didn't specify an ordering rule in the index config, + see if the schema def for the attr defines one */ + if (!need_compare_fn) { + asyntaxinfo *asi = attr_syntax_get_by_name( a->ai_type ); + if (asi && asi->asi_mr_ordering) { + need_compare_fn = 1; + } + attr_syntax_return( asi ); + } + + if (need_compare_fn) { + int rc = plugin_call_syntax_get_compare_fn( a->ai_plugin, &a->ai_key_cmp_fn ); + if (rc != LDAP_SUCCESS) { + LDAPDebug(LDAP_DEBUG_ANY, + "The attribute [%s] does not have a valid ORDERING matching rule\n", + a->ai_type, 0, 0); + a->ai_key_cmp_fn = NULL; + } + } + if ( avl_insert( &inst->inst_attrs, a, ainfo_cmp, ainfo_dup ) != 0 ) { /* duplicate - existing version updated */ attrinfo_delete(&a); Index: proto-back-ldbm.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- proto-back-ldbm.h 25 Sep 2007 22:03:19 -0000 1.13 +++ proto-back-ldbm.h 2 Oct 2007 18:39:51 -0000 1.14 @@ -141,7 +141,7 @@ int dblayer_database_size(struct ldbminfo *li, unsigned int *size); int dblayer_terminate(struct ldbminfo *li); int dblayer_close_indexes(backend *be); -int dblayer_open_file(backend *be, char* indexname, int create, int index_flags, DB **ppDB); +int dblayer_open_file(backend *be, char* indexname, int create, struct attrinfo *ai, DB **ppDB); int dblayer_close_file(DB *db); void dblayer_sys_pages(size_t *pagesize, size_t *pages, size_t *procpages, size_t *availpages); int dblayer_is_cachesize_sane(size_t *cachesize); From fedora-directory-commits at redhat.com Tue Oct 2 19:21:34 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Tue, 2 Oct 2007 15:21:34 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd opshared.c, 1.8, 1.9 Message-ID: <200710021921.l92JLY0J016067@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16047 Modified Files: opshared.c Log Message: Resolves: 282911 Summary: Don't send result twice when searching against a non-existent suffix. Index: opshared.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/opshared.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- opshared.c 10 Nov 2006 23:45:40 -0000 1.8 +++ opshared.c 2 Oct 2007 19:21:32 -0000 1.9 @@ -210,6 +210,7 @@ int iscritical = 0; char * be_name = NULL; int index = 0; + int sent_result = 0; be_list[0] = NULL; referral_list[0] = NULL; @@ -548,6 +549,8 @@ int err; case 1: /* backend successfully sent result to the client */ rc = SLAPI_FAIL_GENERAL; + /* Set a flag here so we don't return another result. */ + sent_result = 1; /* fall through */ case -1: /* an error occurred */ @@ -676,9 +679,12 @@ else if (flag_no_such_object) { /* there was at least 1 backend that was called to process - * the operation and all backends returned NO SUCH OBJECTS + * the operation and all backends returned NO SUCH OBJECTS. + * Don't send the result if it's already been handled above. */ - slapi_send_ldap_result_from_pb(pb); + if (!sent_result) { + slapi_send_ldap_result_from_pb(pb); + } } else { From fedora-directory-commits at redhat.com Tue Oct 2 23:21:35 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 2 Oct 2007 19:21:35 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm vlv.c, 1.14, 1.15 Message-ID: <200710022321.l92NLZI6021435@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21406 Modified Files: vlv.c Log Message: Resolves: #314851 Summary: vlv: crash after repeated backend creation/deletion Description: added a check code for the backend's existing. Index: vlv.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/vlv.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- vlv.c 24 Sep 2007 18:27:15 -0000 1.14 +++ vlv.c 2 Oct 2007 23:21:31 -0000 1.15 @@ -76,6 +76,9 @@ struct vlvSearch* newVlvSearch= vlvSearch_new(); backend *be = inst->inst_be; + if (NULL == be) { /* backend is not associated */ + return SLAPI_DSE_CALLBACK_ERROR; + } vlvSearch_init(newVlvSearch, pb, entryBefore, inst); /* vlvSearchList is modified; need Wlock */ PR_RWLock_Wlock(be->vlvSearchList_lock); @@ -280,6 +283,9 @@ ldbm_instance *inst = (ldbm_instance*)arg; backend *be= inst->inst_be; + if (NULL == be) { /* backend is not associated */ + return SLAPI_DSE_CALLBACK_ERROR; + } vlvSearch_init(newVlvSearch, pb, entryBefore, inst); vlvSearch_addtolist(newVlvSearch, (struct vlvSearch **)&be->vlvSearchList); return SLAPI_DSE_CALLBACK_OK; From fedora-directory-commits at redhat.com Tue Oct 2 23:35:03 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 2 Oct 2007 19:35:03 -0400 Subject: [Fedora-directory-commits] adminserver/admserv/newinst/src AdminUtil.pm.in, 1.15, 1.16 Message-ID: <200710022335.l92NZ3ED021820@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv/newinst/src In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21803/adminserver/admserv/newinst/src Modified Files: AdminUtil.pm.in Log Message: Resolves: bug 315731 Description: SNMP Show-stopper - Can't install DS80 on Rhel4-32 bit Fix Description: If conn is NULL, we can't use it to get the error message, so just use a message of unknown in that case. Index: AdminUtil.pm.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/AdminUtil.pm.in,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- AdminUtil.pm.in 20 Sep 2007 21:47:28 -0000 1.15 +++ AdminUtil.pm.in 2 Oct 2007 23:35:01 -0000 1.16 @@ -244,10 +244,17 @@ $inf->{slapd}->{RootDN}, $inf->{slapd}->{RootDNPwd}, $inf->{General}->{certdir}); - if (!$conn) { + my $errstr; + if ($conn) { + $errstr = $conn->getErrorString(); + } + if (!$conn or ($errstr ne "Success")) { @{$errs} = ('error_connection_failed', $inf->{General}->{FullMachineName}, $inf->{slapd}->{ServerPort}, $inf->{slapd}->{RootDN}, - $conn->getErrorString()); + ($conn ? $errstr : "unknown")); + if ($conn) { + $conn->close(); + } return 0; } From fedora-directory-commits at redhat.com Wed Oct 3 00:55:37 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 2 Oct 2007 20:55:37 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication repl5_protocol_util.c, 1.10, 1.11 Message-ID: <200710030055.l930tb7J032260@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32219/plugins/replication Modified Files: repl5_protocol_util.c Log Message: Resolves: #196523 Summary: miscellaneous memory leaks Description: 1) fixed memory leaks 2) cleaned up normalize_path code with fixing memory leaks Index: repl5_protocol_util.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_protocol_util.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- repl5_protocol_util.c 21 Nov 2006 19:14:10 -0000 1.10 +++ repl5_protocol_util.c 3 Oct 2007 00:55:34 -0000 1.11 @@ -117,6 +117,10 @@ int return_value; ConnResult crc; Repl_Connection *conn; + struct berval *retdata = NULL; + char *retoid = NULL; + Slapi_DN *replarea_sdn = NULL; + struct berval **ruv_bervals = NULL; PR_ASSERT(prp && prot_oid); @@ -200,9 +204,6 @@ } else { CSN *current_csn = NULL; - struct berval *retdata = NULL; - char *retoid = NULL; - Slapi_DN *replarea_sdn; /* Good to go. Start the protocol. */ @@ -243,7 +244,6 @@ * Extop was processed. Look at extop response to see if we're * permitted to go ahead. */ - struct berval **ruv_bervals = NULL; int extop_result; int extop_rc = decode_repl_ext_response(retdata, &extop_result, &ruv_bervals); @@ -411,8 +411,6 @@ prp->last_acquire_response_code = NSDS50_REPL_INTERNAL_ERROR; return_value = ACQUIRE_FATAL_ERROR; } - if (NULL != ruv_bervals) - ber_bvecfree(ruv_bervals); } else { @@ -437,15 +435,18 @@ agmt_get_long_name(prp->agmt)); return_value = ACQUIRE_FATAL_ERROR; } - slapi_sdn_free(&replarea_sdn); - if (NULL != retoid) - ldap_memfree(retoid); - if (NULL != retdata) - ber_bvfree(retdata); } } } error: + if (NULL != ruv_bervals) + ber_bvecfree(ruv_bervals); + if (NULL != replarea_sdn) + slapi_sdn_free(&replarea_sdn); + if (NULL != retoid) + ldap_memfree(retoid); + if (NULL != retdata) + ber_bvfree(retdata); if (ACQUIRE_SUCCESS != return_value) { From fedora-directory-commits at redhat.com Wed Oct 3 00:55:37 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 2 Oct 2007 20:55:37 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd util.c, 1.14, 1.15 sasl_io.c, 1.11, 1.12 Message-ID: <200710030055.l930tbK5032267@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32219/slapd Modified Files: util.c sasl_io.c Log Message: Resolves: #196523 Summary: miscellaneous memory leaks Description: 1) fixed memory leaks 2) cleaned up normalize_path code with fixing memory leaks Index: util.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/util.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- util.c 4 Dec 2006 18:36:56 -0000 1.14 +++ util.c 3 Oct 2007 00:55:35 -0000 1.15 @@ -402,61 +402,63 @@ static void clean_path(char **norm_path) { - char **np; + char **np; - for (np = norm_path; np && *np; np++) - slapi_ch_free((void **)np); - slapi_ch_free((void **)&norm_path); + for (np = norm_path; np && *np; np++) + slapi_ch_free_string(np); + slapi_ch_free((void **)&norm_path); } static char ** normalize_path(char *path) { - char *dname = slapi_ch_strdup(path); - char *dnamep = dname; - char *bnamep = NULL; + char *dname = NULL; + char *dnamep = NULL; char **dirs = (char **)slapi_ch_calloc(strlen(path), sizeof(char *)); char **rdirs = (char **)slapi_ch_calloc(strlen(path), sizeof(char *)); char **dp = dirs; char **rdp; + int elimdots = 0; + + if (NULL == path || '\0' == *path) { + return NULL; + } + + dname = slapi_ch_strdup(path); do { - bnamep = strrchr(dnamep, _CSEP); - if (NULL == bnamep) { - bnamep = dnamep; + dnamep = strrchr(dname, _CSEP); + if (NULL == dnamep) { + dnamep = dname; } else { - *bnamep = '\0'; - bnamep++; + *dnamep = '\0'; + dnamep++; } - if (0 != strcmp(bnamep, ".")) { - *dp++ = slapi_ch_strdup(bnamep); /* remove "/./" in the path */ + if (0 != strcmp(dnamep, ".") && strlen(dnamep) > 0) { + *dp++ = slapi_ch_strdup(dnamep); /* rm "/./" and "//" in the path */ } - } while (NULL != dnamep && '\0' != *dnamep && /* done or relative path */ - !(0 == strcmp(dnamep, ".") && 0 == strcmp(bnamep, "."))); + } while ( dnamep > dname /* == -> no more _CSEP */ ); + slapi_ch_free_string(&dname); /* remove "xxx/.." in the path */ for (dp = dirs, rdp = rdirs; dp && *dp; dp++) { while (*dp && 0 == strcmp(*dp, "..")) { dp++; - if (rdp > rdirs) - rdp--; + elimdots++; } - if (*dp) + if (elimdots > 0) { + elimdots--; + } else if (*dp) { *rdp++ = slapi_ch_strdup(*dp); - } - for (--dp, rdp = rdirs; dp >= dirs; dp--) { - while (*dp && 0 == strcmp(*dp, "..")) { - dp--; - if (rdp > rdirs) - rdp--; } - if (*dp && strlen(*dp) > 0) - *rdp++ = slapi_ch_strdup(*dp); } - *rdp = NULL; + /* reverse */ + for (--rdp, dp = rdirs; rdp >= dp && rdp >= rdirs; --rdp, dp++) { + char *tmpp = *dp; + *dp = *rdp; + *rdp = tmpp; + } clean_path(dirs); - slapi_ch_free_string(&dname); - return rdirs; } Index: sasl_io.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/sasl_io.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- sasl_io.c 25 Apr 2007 20:24:31 -0000 1.11 +++ sasl_io.c 3 Oct 2007 00:55:35 -0000 1.12 @@ -139,6 +139,7 @@ sasl_io_cleanup(Connection *c) { int ret = 0; + struct lber_x_ext_io_fns *func_pointers = NULL; sasl_io_private *sp = c->c_sasl_io_private; if (sp) { LDAPDebug( LDAP_DEBUG_CONNS, @@ -147,6 +148,8 @@ slapi_ch_free((void**)&(sp->encrypted_buffer)); slapi_ch_free((void**)&(sp->decrypted_buffer)); /* Put the I/O functions back how they were */ + ber_sockbuf_get_option( c->c_sb, LBER_SOCKBUF_OPT_EXT_IO_FNS, &func_pointers); + slapi_ch_free((void**)&func_pointers); ber_sockbuf_set_option( c->c_sb, LBER_SOCKBUF_OPT_EXT_IO_FNS, sp->real_iofns); slapi_ch_free((void**)&sp); c->c_sasl_io_private = NULL; From fedora-directory-commits at redhat.com Wed Oct 3 17:44:53 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 3 Oct 2007 13:44:53 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd opshared.c, 1.9, 1.10 result.c, 1.10, 1.11 Message-ID: <200710031744.l93Hir3T000509@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv488/ldapserver/ldap/servers/slapd Modified Files: opshared.c result.c Log Message: Resolves: bug 282911 Description: double err=32 result sent when suffix doesn't exist Reviewed by: nkinder (Thanks!) Fix Description: The backend does not send back a result if the op is search and the err is NO_SUCH_OBJECT (32). The frontend should handle this case so that it knows to defer sending the result until all of the backend candidates have been scanned. We also need to change send_nobackend_ldap_result() to use slapi_send_ldap_result instead of send_ldap_result so that it has the same semantics as the regular backend code. Platforms tested: RHEL5 x86_64 Index: opshared.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/opshared.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- opshared.c 2 Oct 2007 19:21:32 -0000 1.9 +++ opshared.c 3 Oct 2007 17:44:50 -0000 1.10 @@ -546,10 +546,22 @@ rc = (*be->be_search)(pb); switch (rc) { - int err; - case 1: /* backend successfully sent result to the client */ + int err = 0; + case 1: /* if the backend returned LDAP_NO_SUCH_OBJECT for a SEARCH request, + it will not have sent back a result - otherwise, it will have + sent a result */ rc = SLAPI_FAIL_GENERAL; - /* Set a flag here so we don't return another result. */ + slapi_pblock_get(pb, SLAPI_RESULT_CODE, &err); + if (err == LDAP_NO_SUCH_OBJECT) + { + /* may be the object exist somewhere else + * wait the end of the loop to send back this error + */ + flag_no_such_object = 1; + break; + } + /* err something other than LDAP_NO_SUCH_OBJECT, so the backend will have sent the result - + Set a flag here so we don't return another result. */ sent_result = 1; /* fall through */ Index: result.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/result.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- result.c 10 Nov 2006 23:45:40 -0000 1.10 +++ result.c 3 Oct 2007 17:44:50 -0000 1.11 @@ -573,7 +573,7 @@ err in the pblock, so this function needs to also */ slapi_pblock_set(pb, SLAPI_RESULT_CODE, &err); - send_ldap_result( pb, err, NULL, NULL, 0, refurls ); + slapi_send_ldap_result( pb, err, NULL, NULL, 0, refurls ); } From fedora-directory-commits at redhat.com Wed Oct 3 19:15:00 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 3 Oct 2007 15:15:00 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm archive.c, 1.12, 1.13 Message-ID: <200710031915.l93JF0xL015791@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15561 Modified Files: archive.c Log Message: Resolves: #316281 Summary: db2bak fails if the archive path exists and ends with '/' Fix description: 1. Use path normalize API rel2abspath to remove the trailing '/'s. 2. db2bak renames the archive dir if the directory exists, checks the directory is the db dir or not. If it is, the command line rename back the existing db to the original and exits with the error: db2archive: Cannot archive to the db directory. Then, the original dir is renamed back. If the db2bak runs as a task (db2bak.pl or console), the server is up and running. Although the backend is disabled, we don't want to rename the db path even for a short time. That being said, changed the order to: check if the archive dir is the same as db dir or not. It exits immediately. Index: archive.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/archive.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- archive.c 26 Mar 2007 23:04:17 -0000 1.12 +++ archive.c 3 Oct 2007 19:14:58 -0000 1.13 @@ -110,7 +110,7 @@ slapi_task_log_notice(task, "backup has old idl format; " "to restore old formated backup onto the new server, " - "please use command line utility \"bak2db\" .\n"); + "please use command line utility \"bak2db\" ."); } goto out; } @@ -128,7 +128,7 @@ if (task) { slapi_task_log_notice(task, "Backend '%s' is already in the middle of " - "another task and cannot be disturbed.\n", + "another task and cannot be disturbed.", inst->inst_name); } @@ -257,7 +257,8 @@ int ldbm_back_ldbm2archive( Slapi_PBlock *pb ) { struct ldbminfo *li; - char *directory = NULL; /* -a */ + char *rawdirectory = NULL; /* -a */ + char *directory = NULL; /* normalized */ char *dir_bak = NULL; int return_value = -1; int task_flags = 0; @@ -266,25 +267,57 @@ struct stat sbuf; slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li ); - slapi_pblock_get( pb, SLAPI_SEQ_VAL, &directory ); + slapi_pblock_get( pb, SLAPI_SEQ_VAL, &rawdirectory ); slapi_pblock_get( pb, SLAPI_TASK_FLAGS, &task_flags ); li->li_flags = run_from_cmdline = (task_flags & TASK_RUNNING_FROM_COMMANDLINE); slapi_pblock_get( pb, SLAPI_BACKEND_TASK, &task ); - if ( !directory || !*directory ) { + if ( !rawdirectory || !*rawdirectory ) { LDAPDebug( LDAP_DEBUG_ANY, "db2archive: no archive name\n", 0, 0, 0 ); - return( -1 ); + return -1; } - if (stat(directory, &sbuf) == 0) { - int baklen = strlen(directory) + 5; /* ".bak\0" */ + + /* start the database code up, do not attempt to perform recovery */ + if (run_from_cmdline) { + /* No ldbm be's exist until we process the config information. */ + mapping_tree_init(); + ldbm_config_load_dse_info(li); + if (0 != (return_value = + dblayer_start(li, + DBLAYER_ARCHIVE_MODE|DBLAYER_NO_DBTHREADS_MODE))) { + LDAPDebug(LDAP_DEBUG_ANY, "db2archive: Failed to init database\n", + 0, 0, 0); + if (task) { + slapi_task_log_notice(task, "Failed to init database"); + } + return -1; + } + } + + if (stat(rawdirectory, &sbuf) == 0) { + int baklen = 0; + directory = rel2abspath(rawdirectory); + + if (slapd_comp_path(directory, li->li_directory) == 0) { + LDAPDebug(LDAP_DEBUG_ANY, + "db2archive: Cannot archive to the db directory.\n", 0, 0, 0); + if (task) { + slapi_task_log_notice(task, + "Cannot archive to the db directory."); + } + return_value = -1; + goto out; + } + + baklen = strlen(directory) + 5; /* ".bak\0" */ dir_bak = slapi_ch_malloc(baklen); PR_snprintf(dir_bak, baklen, "%s.bak", directory); LDAPDebug(LDAP_DEBUG_ANY, "db2archive: %s exists. Renaming to %s\n", directory, dir_bak, 0); if (task) { - slapi_task_log_notice(task, "%s exists. Renaming to %s\n", + slapi_task_log_notice(task, "%s exists. Renaming to %s", directory, dir_bak); } if (stat(dir_bak, &sbuf) == 0) { @@ -295,7 +328,7 @@ dir_bak, 0, 0); if (task) { slapi_task_log_notice(task, - "%s exists and failed to delete it.\n", dir_bak); + "%s exists and failed to delete it.", dir_bak); } return_value = -1; goto out; @@ -305,10 +338,10 @@ if (return_value != PR_SUCCESS) { PRErrorCode prerr = PR_GetError(); LDAPDebug(LDAP_DEBUG_ANY, - "db2archive: Failed to rename \"%s\" to \"%s\".", + "db2archive: Failed to rename \"%s\" to \"%s\".\n", directory, dir_bak, 0); LDAPDebug(LDAP_DEBUG_ANY, - SLAPI_COMPONENT_NAME_NSPR " error %d (%s)", + SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n", prerr, slapd_pr_strerror(prerr), 0); if (task) { slapi_task_log_notice(task, @@ -336,11 +369,6 @@ goto err; } - /* No ldbm be's exist until we process the config information. */ - if (run_from_cmdline) { - mapping_tree_init(); - ldbm_config_load_dse_info(li); - } /* to avoid conflict w/ import, do this check for commandline, as well */ { Object *inst_obj, *inst_obj2; @@ -360,7 +388,7 @@ if (task) { slapi_task_log_notice(task, "Backend '%s' is already in the middle of " - "another task and cannot be disturbed.\n", + "another task and cannot be disturbed.", inst->inst_name); } @@ -381,45 +409,9 @@ } } - /* start the database code up, do not attempt to perform recovery */ - if (run_from_cmdline && - 0 != (return_value = dblayer_start(li,DBLAYER_ARCHIVE_MODE|DBLAYER_NO_DBTHREADS_MODE))) { - LDAPDebug(LDAP_DEBUG_ANY, "db2archive: Failed to init database\n", - 0, 0, 0); - if (task) { - slapi_task_log_notice(task, "Failed to init database"); - } - goto rel_err; - } - - if (slapd_comp_path(directory, li->li_directory) == 0) { - LDAPDebug(LDAP_DEBUG_ANY, - "db2archive: Cannot archive to the db directory.\n", 0, 0, 0); - if (task) { - slapi_task_log_notice(task, "Cannot archive to the db directory.\n"); - } - return_value = -1; - goto rel_err; - } - /* tell it to archive */ return_value = dblayer_backup(li, directory, task); -rel_err: - /* close the database down again */ - if (run_from_cmdline && - 0 != dblayer_close(li,DBLAYER_ARCHIVE_MODE|DBLAYER_NO_DBTHREADS_MODE)) { - LDAPDebug(LDAP_DEBUG_ANY, "db2archive: Failed to close database\n", - 0, 0, 0); - if (task) { - slapi_task_log_notice(task, "Failed to close database"); - } - - /* The backup succeeded, so a failed close is not really a - total error... */ - /*return( -1 );*/ - } - if (! run_from_cmdline) { ldbm_instance *inst; Object *inst_obj; @@ -436,13 +428,24 @@ LDAPDebug(LDAP_DEBUG_ANY, "db2archive: Rename %s back to %s\n", dir_bak, directory, 0); if (task) { - slapi_task_log_notice(task, "Rename %s back to %s\n", + slapi_task_log_notice(task, "Rename %s back to %s", dir_bak, directory); } ldbm_delete_dirs(directory); PR_Rename(dir_bak, directory); } out: + /* close the database down again */ + if (run_from_cmdline && + 0 != dblayer_close(li,DBLAYER_ARCHIVE_MODE|DBLAYER_NO_DBTHREADS_MODE)) { + LDAPDebug(LDAP_DEBUG_ANY, "db2archive: Failed to close database\n", + 0, 0, 0); + if (task) { + slapi_task_log_notice(task, "Failed to close database"); + } + } + slapi_ch_free_string(&dir_bak); + slapi_ch_free_string(&directory); return return_value; } From fedora-directory-commits at redhat.com Wed Oct 3 20:17:24 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 3 Oct 2007 16:17:24 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd log.c, 1.16, 1.17 Message-ID: <200710032017.l93KHOkh024464@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24419 Modified Files: log.c Log Message: Resolves: #304161 Summary: logrotation time of -1 causes hang Change description: 1. slapd_log_audit_proc, slapd_log_error_proc_internal, and log_flush_buffer: use absolute value of rotationtime_secs to calculate the rotationsyncclock. 2. when the result of "atoi" for nsslapd-XXX-logrotationtime is 0 due to the invalid setting, logrotation time is reset to -1 (no rotation). 3. if nsslapd-XXX-logrotationtime and nsslapd-XXX-logexpirationtime is large (near MAXINT) and calculated rotationtime_secs and/or exptime_secs is overflown, set MAXINT to the sec value. Index: log.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/log.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- log.c 17 Aug 2007 02:12:37 -0000 1.16 +++ log.c 3 Oct 2007 20:17:22 -0000 1.17 @@ -1050,6 +1050,10 @@ } rtime = atoi(rtime_str); + + if (0 == rtime) { + rtime = -1; /* Value Range: -1 | 1 to PR_INT32_MAX */ + } switch (logtype) { case SLAPD_ACCESS_LOG: @@ -1087,6 +1091,10 @@ value = -1; } + if (rtime > 0 && value < 0) { + value = PR_INT32_MAX; /* overflown */ + } + switch (logtype) { case SLAPD_ACCESS_LOG: fe_cfg->accesslog_rotationtime = rtime; @@ -1116,7 +1124,7 @@ ******************************************************************************/ int log_set_rotationtimeunit(const char *attrname, char *runit, int logtype, char *errorbuf, int apply) { - int value= 0; + int origvalue = 0, value = 0; int runitType; int rv = 0; @@ -1150,15 +1158,15 @@ switch (logtype) { case SLAPD_ACCESS_LOG: LOG_ACCESS_LOCK_WRITE( ); - value = loginfo.log_access_rotationtime; + origvalue = loginfo.log_access_rotationtime; break; case SLAPD_ERROR_LOG: LOG_ERROR_LOCK_WRITE( ); - value = loginfo.log_error_rotationtime; + origvalue = loginfo.log_error_rotationtime; break; case SLAPD_AUDIT_LOG: LOG_AUDIT_LOCK_WRITE( ); - value = loginfo.log_audit_rotationtime; + origvalue = loginfo.log_audit_rotationtime; break; default: rv = 1; @@ -1166,23 +1174,27 @@ if (strcasecmp(runit, "month") == 0) { runitType = LOG_UNIT_MONTHS; - value *= 31 * 24 * 60 * 60; + value = origvalue * 31 * 24 * 60 * 60; } else if (strcasecmp(runit, "week") == 0) { runitType = LOG_UNIT_WEEKS; - value *= 7 * 24 * 60 * 60; + value = origvalue * 7 * 24 * 60 * 60; } else if (strcasecmp(runit, "day") == 0) { runitType = LOG_UNIT_DAYS; - value *= 24 * 60 * 60; + value = origvalue * 24 * 60 * 60; } else if (strcasecmp(runit, "hour") == 0) { runitType = LOG_UNIT_HOURS; - value *= 3600; + value = origvalue * 3600; } else if (strcasecmp(runit, "minute") == 0) { runitType = LOG_UNIT_MINS; - value *= 60; + value = origvalue * 60; } else { /* In this case we don't rotate */ runitType = LOG_UNIT_UNKNOWN; - value = -1; + value = -1; + } + + if (origvalue > 0 && value < 0) { + value = PR_INT32_MAX; /* overflown */ } switch (logtype) { @@ -1392,7 +1404,7 @@ return rv; } - exptime = atoi(exptime_str); + exptime = atoi(exptime_str); /* <= 0: no exptime */ switch (logtype) { case SLAPD_ACCESS_LOG: @@ -1429,9 +1441,12 @@ value = -1; } - if (value < rsec) { + if (value > 0 && value < rsec) { value = rsec; } + if (exptime > 0 && value < 0) { + value = PR_INT32_MAX; /* overflown */ + } switch (logtype) { case SLAPD_ACCESS_LOG: @@ -1534,7 +1549,7 @@ value = -1; } - if ((value> 0) && value < rsecs ) { + if ((value > 0) && value < rsecs) { value = rsecs; } @@ -1693,7 +1708,7 @@ return 0; } while (loginfo.log_audit_rotationsyncclock <= loginfo.log_audit_ctime) { - loginfo.log_audit_rotationsyncclock += loginfo.log_audit_rotationtime_secs; + loginfo.log_audit_rotationsyncclock += PR_ABS(loginfo.log_audit_rotationtime_secs); } } if (loginfo.log_audit_state & LOGGING_NEED_TITLE) { @@ -1743,7 +1758,7 @@ return 0; } while (loginfo.log_error_rotationsyncclock <= loginfo.log_error_ctime) { - loginfo.log_error_rotationsyncclock += loginfo.log_error_rotationtime_secs; + loginfo.log_error_rotationsyncclock += PR_ABS(loginfo.log_error_rotationtime_secs); } } @@ -2644,8 +2659,8 @@ if (loginfo.log_access_rotationsync_enabled && loginfo.log_access_rotationunit != LOG_UNIT_HOURS && loginfo.log_access_rotationunit != LOG_UNIT_MINS && - loginfo.log_access_ctime < loginfo.log_access_rotationsyncclock - loginfo.log_access_rotationtime_secs) { - loginfo.log_access_rotationsyncclock -= loginfo.log_access_rotationtime_secs; + loginfo.log_access_ctime < loginfo.log_access_rotationsyncclock - PR_ABS(loginfo.log_access_rotationtime_secs)) { + loginfo.log_access_rotationsyncclock -= PR_ABS(loginfo.log_access_rotationtime_secs); } return logfile_type; } @@ -3365,8 +3380,8 @@ if (loginfo.log_error_rotationsync_enabled && loginfo.log_error_rotationunit != LOG_UNIT_HOURS && loginfo.log_error_rotationunit != LOG_UNIT_MINS && - loginfo.log_error_ctime < loginfo.log_error_rotationsyncclock - loginfo.log_error_rotationtime_secs) { - loginfo.log_error_rotationsyncclock -= loginfo.log_error_rotationtime_secs; + loginfo.log_error_ctime < loginfo.log_error_rotationsyncclock - PR_ABS(loginfo.log_error_rotationtime_secs)) { + loginfo.log_error_rotationsyncclock -= PR_ABS(loginfo.log_error_rotationtime_secs); } return logfile_type; @@ -3452,8 +3467,8 @@ if (loginfo.log_audit_rotationsync_enabled && loginfo.log_audit_rotationunit != LOG_UNIT_HOURS && loginfo.log_audit_rotationunit != LOG_UNIT_MINS && - loginfo.log_audit_ctime < loginfo.log_audit_rotationsyncclock - loginfo.log_audit_rotationtime_secs) { - loginfo.log_audit_rotationsyncclock -= loginfo.log_audit_rotationtime_secs; + loginfo.log_audit_ctime < loginfo.log_audit_rotationsyncclock - PR_ABS(loginfo.log_audit_rotationtime_secs)) { + loginfo.log_audit_rotationsyncclock -= PR_ABS(loginfo.log_audit_rotationtime_secs); } return logfile_type; @@ -3842,7 +3857,7 @@ return; } while (loginfo.log_access_rotationsyncclock <= loginfo.log_access_ctime) { - loginfo.log_access_rotationsyncclock += loginfo.log_access_rotationtime_secs; + loginfo.log_access_rotationsyncclock += PR_ABS(loginfo.log_access_rotationtime_secs); } } From fedora-directory-commits at redhat.com Thu Oct 4 03:28:22 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 3 Oct 2007 23:28:22 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm dblayer.c, 1.22, 1.23 index.c, 1.12, 1.13 Message-ID: <200710040328.l943SM4H023600@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23581/ldapserver/ldap/servers/slapd/back-ldbm Modified Files: dblayer.c index.c Log Message: Resolves: bug 249366 Bug Description: rhds71 - search filters returns too many entries on interger attributes value greater than 2 to the 31 Reviewed by: nkinder, nhosoi (Thanks!) Fix Description: I found a bug in my previous patch. The bt_compare function is used not only for comparing the actual key values but also for comparing raw index keys - that is, keys with the leading '=' or '*'. If comparing two keys, we should only use the syntax specific compare function if we are comparing two valid equality keys. A valid equality key begins with EQ_PREFIX and has at least one character after that. In this case, we strip off the EQ_PREFIX and pass the values to the syntax specific compare function. Otherwise, we just use a simple berval compare function that is based on memcmp. The code in index_range_read needs to use a similar comparison algorithm, so I beefed up DBTcmp. Why is this necessary? When doing a >= search or a <= search, we need to get the upper (for >=) or lower (for <=) bound for the range, which will either be the last (for >=) or first (for <=) equality key in the index. The index code uses a key of '=' to find the lower bound (which is lower than any key "=value") and a key of '>' to find the upper bound. A '=' with no value will collate before any real eq key with a value, and the ascii value of '>' is one greater than the ascii value of '='. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: dblayer.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- dblayer.c 2 Oct 2007 18:39:51 -0000 1.22 +++ dblayer.c 4 Oct 2007 03:28:19 -0000 1.23 @@ -232,22 +232,42 @@ always normalize both arguments. We need to add an additional syntax compare function that does not normalize or takes an argument like value_cmp to specify to normalize or not. -*/ -typedef int (*syntax_cmp_fn_type)(struct berval *, struct berval *); + More fun - this function is used to compare both raw database + keys (e.g. with the prefix '=' or '+' or '*' etc.) and without + (in the case of two equality keys, we want to strip off the + leading '=' to compare the actual values). We only use the + value_compare function if both keys are equality keys with + some data after the equality prefix. In every other case, + we will just use a standard berval cmp function. + + see also DBTcmp +*/ static int dblayer_bt_compare(DB *db, const DBT *dbt1, const DBT *dbt2) { struct berval bv1, bv2; value_compare_fn_type syntax_cmp_fn = (value_compare_fn_type)db->app_private; - bv1.bv_val = (char *)dbt1->data+1; /* remove leading '=' */ - bv1.bv_len = (ber_len_t)dbt1->size-1; + if ((dbt1->data && (dbt1->size>1) && (*((char*)dbt1->data) == EQ_PREFIX)) && + (dbt2->data && (dbt2->size>1) && (*((char*)dbt2->data) == EQ_PREFIX))) { + bv1.bv_val = (char *)dbt1->data+1; /* remove leading '=' */ + bv1.bv_len = (ber_len_t)dbt1->size-1; + + bv2.bv_val = (char *)dbt2->data+1; /* remove leading '=' */ + bv2.bv_len = (ber_len_t)dbt2->size-1; + + return syntax_cmp_fn(&bv1, &bv2); + } + + /* else compare two "raw" index keys */ + bv1.bv_val = (char *)dbt1->data; + bv1.bv_len = (ber_len_t)dbt1->size; - bv2.bv_val = (char *)dbt2->data+1; /* remove leading '=' */ - bv2.bv_len = (ber_len_t)dbt2->size-1; + bv2.bv_val = (char *)dbt2->data; + bv2.bv_len = (ber_len_t)dbt2->size; - return syntax_cmp_fn(&bv1, &bv2); + return slapi_berval_cmp(&bv1, &bv2); } /* this flag use if user remotely turned batching off */ Index: index.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/index.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- index.c 28 Sep 2007 23:46:40 -0000 1.12 +++ index.c 4 Oct 2007 03:28:19 -0000 1.13 @@ -895,16 +895,50 @@ return( idl ); } +/* This function compares two index keys. It is assumed + that the values are already normalized, since they should have + been when the index was created (by int_values2keys). + + richm - actually, the current syntax compare functions + always normalize both arguments. We need to add an additional + syntax compare function that does not normalize or takes + an argument like value_cmp to specify to normalize or not. + + More fun - this function is used to compare both raw database + keys (e.g. with the prefix '=' or '+' or '*' etc.) and without + (in the case of two equality keys, we want to strip off the + leading '=' to compare the actual values). We only use the + value_compare function if both keys are equality keys with + some data after the equality prefix. In every other case, + we will just use a standard berval cmp function. + + see also dblayer_bt_compare +*/ static int -DBTcmp (DBT* L, DBT* R) +DBTcmp (DBT* L, DBT* R, value_compare_fn_type cmp_fn) { struct berval Lv; struct berval Rv; - Lv.bv_val = L->dptr; Lv.bv_len = L->dsize; - Rv.bv_val = R->dptr; Rv.bv_len = R->dsize; - return slapi_berval_cmp (&Lv, &Rv); + + if ((L->data && (L->size>1) && (*((char*)L->data) == EQ_PREFIX)) && + (R->data && (R->size>1) && (*((char*)R->data) == EQ_PREFIX))) { + Lv.bv_val = (char*)L->data+1; Lv.bv_len = (ber_len_t)L->size-1; + Rv.bv_val = (char*)R->data+1; Rv.bv_len = (ber_len_t)R->size-1; + /* use specific compare fn, if any */ + cmp_fn = (cmp_fn ? cmp_fn : slapi_berval_cmp); + } else { + Lv.bv_val = (char*)L->data; Lv.bv_len = (ber_len_t)L->size; + Rv.bv_val = (char*)R->data; Rv.bv_len = (ber_len_t)R->size; + /* just compare raw bervals */ + cmp_fn = slapi_berval_cmp; + } + return cmp_fn(&Lv, &Rv); } +/* This only works with normalized keys, which + should be ok because at this point both L and R + should have already been normalized +*/ #define DBT_EQ(L,R) ((L)->dsize == (R)->dsize &&\ ! memcmp ((L)->dptr, (R)->dptr, (L)->dsize)) @@ -1145,7 +1179,7 @@ "index_range_read(%s,%s) seek to end of index file err %i\n", type, prefix, *err ); } - } else if (DBTcmp (&upperkey, &cur_key) > 0) { + } else if (DBTcmp (&upperkey, &cur_key, ai->ai_key_cmp_fn) > 0) { tmpbuf = slapi_ch_realloc (tmpbuf, cur_key.dsize); memcpy (tmpbuf, cur_key.dptr, cur_key.dsize); DBT_FREE_PAYLOAD(upperkey); @@ -1233,8 +1267,8 @@ } while (*err == 0 && (operator == SLAPI_OP_LESS) ? - DBTcmp(&cur_key, &upperkey) < 0 : - DBTcmp(&cur_key, &upperkey) <= 0) { + DBTcmp(&cur_key, &upperkey, ai->ai_key_cmp_fn) < 0 : + DBTcmp(&cur_key, &upperkey, ai->ai_key_cmp_fn) <= 0) { /* exit the loop when we either run off the end of the table, * fail to read a key, or read a key that's out of range. */ From fedora-directory-commits at redhat.com Thu Oct 4 16:27:49 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Thu, 4 Oct 2007 12:27:49 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl acl.c, 1.8, 1.9 Message-ID: <200710041627.l94GRnkY000482@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv434/plugins/acl Modified Files: acl.c Log Message: Resolves: 288321 Summary: Handle poorly formatted DN's when normalizing. Also only check modify values against authenticated DN for DN syntax attributes. Index: acl.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acl.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- acl.c 10 Nov 2006 23:44:49 -0000 1.8 +++ acl.c 4 Oct 2007 16:27:47 -0000 1.9 @@ -235,7 +235,7 @@ Slapi_PBlock *pb, Slapi_Entry *e, /* The Slapi_Entry */ char *attr, /* Attribute of the entry */ - struct berval *val, /* value of attr. NOT USED */ + struct berval *val, /* value of attr */ int access /* requested access rights */ ) { @@ -341,21 +341,32 @@ acl_init_aclpb ( pb, aclpb, clientDn, 0 ); TNF_PROBE_0_DEBUG(acl_aclpbinit_end,"ACL",""); - - /* Here we mean if "I am trying to add/delete "myself" ? " */ - if (val && (access & SLAPI_ACL_WRITE) && (val->bv_len > 0) ) { - /* should use slapi_sdn_compare() but that'a an extra malloc/free */ - - char *dn_val_to_write = - slapi_dn_normalize(slapi_ch_strdup(val->bv_val)); - - if ( aclpb->aclpb_authorization_sdn && - slapi_utf8casecmp((ACLUCHP)dn_val_to_write, (ACLUCHP) - slapi_sdn_get_ndn(aclpb->aclpb_authorization_sdn)) == 0) { - access |= SLAPI_ACL_SELF; - } + /* Here we mean if "I am trying to add/delete "myself" to a group, etc." We + * basically just want to see if the value matches the DN of the user that + * we're checking access for */ + if (val && (access & SLAPI_ACL_WRITE) && (val->bv_len > 0)) { + Slapi_Attr *sa = slapi_attr_new(); + char *oid = NULL; + + slapi_attr_init(sa, attr); + slapi_attr_get_syntax_oid_copy(sa, &oid); + + /* We only want to perform this check if the attribute is + * defined using the DN syntax. */ + if (oid && (strcasecmp(oid, DN_SYNTAX_OID) == 0)) { + /* should use slapi_sdn_compare() but that'a an extra malloc/free */ + char *dn_val_to_write = slapi_dn_normalize(slapi_ch_strdup(val->bv_val)); + if ( aclpb->aclpb_authorization_sdn && + slapi_utf8casecmp((ACLUCHP)dn_val_to_write, (ACLUCHP) + slapi_sdn_get_ndn(aclpb->aclpb_authorization_sdn)) == 0) { + access |= SLAPI_ACL_SELF; + } - slapi_ch_free( (void **)&dn_val_to_write); + slapi_ch_free_string(&dn_val_to_write); + } + + slapi_ch_free_string(&oid); + slapi_attr_free(&sa); } /* Convert access to string of rights eg SLAPI_ACL_ADD->"add". */ From fedora-directory-commits at redhat.com Thu Oct 4 16:27:49 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Thu, 4 Oct 2007 12:27:49 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd attrsyntax.c, 1.5, 1.6 dn.c, 1.9, 1.10 libslapd.def, 1.17, 1.18 slapi-plugin.h, 1.17, 1.18 Message-ID: <200710041627.l94GRn2Z000492@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv434/slapd Modified Files: attrsyntax.c dn.c libslapd.def slapi-plugin.h Log Message: Resolves: 288321 Summary: Handle poorly formatted DN's when normalizing. Also only check modify values against authenticated DN for DN syntax attributes. Index: attrsyntax.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/attrsyntax.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- attrsyntax.c 10 Nov 2006 23:45:40 -0000 1.5 +++ attrsyntax.c 4 Oct 2007 16:27:47 -0000 1.6 @@ -731,6 +731,22 @@ } } +/* Returns the oid of the syntax of the Slapi_Attr that's passed in. + * The caller must dispose of oid by calling slapi_ch_free_string(). */ +int +slapi_attr_get_syntax_oid_copy( const Slapi_Attr *a, char **oidp ) +{ + void *pi = NULL; + + if (a && (slapi_attr_type2plugin(a->a_type, &pi) == 0)) { + *oidp = slapi_ch_strdup(plugin_syntax2oid(pi)); + return( 0 ); + } else { + *oidp = NULL; + return( -1 ); + } +} + #ifdef ATTR_LDAP_DEBUG PRIntn Index: dn.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/dn.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- dn.c 10 Nov 2006 23:45:40 -0000 1.9 +++ dn.c 4 Oct 2007 16:27:47 -0000 1.10 @@ -342,7 +342,13 @@ /* * Track and sort attribute values within multivalued RDNs. */ - if ( rdn_av_count > 0 ) { + /* We may still be in an unexpected state, such as B4TYPE if + * we encountered something odd like a '+' at the end of the + * rdn. If this is the case, we don't want to add this bogus + * rdn to our list to sort. We should only be in the INVALUE + * or B4SEPARATOR state if we have a valid rdn component to + * be added. */ + if ((rdn_av_count > 0) && ((state == INVALUE) || (state == B4SEPARATOR))) { add_rdn_av( typestart, d, &rdn_av_count, &rdn_avs, initial_rdn_av_stack ); } @@ -352,7 +358,6 @@ if ( rdn_av_count > 0 ) { reset_rdn_avs( &rdn_avs, &rdn_av_count ); } - /* Trim trailing spaces */ while ( d != dn && *(d - 1) == ' ' ) d--; /* XXX 518524 */ Index: libslapd.def =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/libslapd.def,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- libslapd.def 13 Oct 2006 01:06:28 -0000 1.17 +++ libslapd.def 4 Oct 2007 16:27:47 -0000 1.18 @@ -1180,6 +1180,7 @@ sasl_map_done @1179 slapd_SECITEM_FreeItem @1180 slapi_op_type_to_string @1181 + slapi_attr_get_syntax_oid_copy @1182 ; password syntax functions config_set_pw_mindigits @1190 config_set_pw_minalphas @1191 Index: slapi-plugin.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-plugin.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- slapi-plugin.h 2 Oct 2007 18:39:50 -0000 1.17 +++ slapi-plugin.h 4 Oct 2007 16:27:47 -0000 1.18 @@ -398,6 +398,7 @@ int slapi_attr_type2plugin( const char *type, void **pi ); int slapi_attr_get_type( Slapi_Attr *attr, char **type ); int slapi_attr_get_oid_copy( const Slapi_Attr *attr, char **oidp ); +int slapi_attr_get_syntax_oid_copy( const Slapi_Attr *a, char **oidp ); int slapi_attr_get_flags( const Slapi_Attr *attr, unsigned long *flags ); int slapi_attr_flag_is_set( const Slapi_Attr *attr, unsigned long flag ); int slapi_attr_value_cmp( const Slapi_Attr *attr, const struct berval *v1, const struct berval *v2 ); From fedora-directory-commits at redhat.com Fri Oct 5 02:30:09 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Thu, 4 Oct 2007 22:30:09 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSMigration.pm.in, 1.17, 1.18 migrate-ds.res, 1.5, 1.6 Message-ID: <200710050230.l952U9LU025377@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25350/ldapserver/ldap/admin/src/scripts Modified Files: DSMigration.pm.in migrate-ds.res Log Message: Resolves: bug 249366 Bug Description: rhds71 - search filters returns too many entries on interger attributes value greater than 2 to the 31 Reviewed by: nhosoi, nkinder (Thanks!) Fix Description: This handles the migration part. The first part is when migrating the schema. Look for all integer syntax attributes. This can be tricky if there are SUP attribute types derived from integer syntax attributes. numSubordinates and hasSubordinates are skipped because they are handled specially by the db code. The next step is to scan all of the index files in the new db directory. If any integer indexes are found, they will be removed and recreated. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: Yes. Will need to document that this happens during migration if not cross platform. QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: Will need to create some integer indexes and do same platform migration to see if this works Index: DSMigration.pm.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSMigration.pm.in,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- DSMigration.pm.in 24 Sep 2007 22:54:47 -0000 1.17 +++ DSMigration.pm.in 5 Oct 2007 02:30:07 -0000 1.18 @@ -311,6 +311,45 @@ return $tmpldiffile; } +sub fixIntegerIndexes { + my $mig = shift; + my $inst_dir = shift; + my $newdbdir = shift; + + if (!$mig->{integerattrs}) { + debug(1, "No integer syntax attributes, no indexes fixed\n"); + return (); + } + + # look at each index file in the db dir + # if it is on our list of integer attributes, + # remove it and re-create it + my $dbname = basename($newdbdir); + for (glob("$newdbdir/*.db4")) { + my $indexname = basename($_, '.db4'); + if ($mig->{integerattrs}->{lc $indexname}) { + $mig->msg($INFO, 'fixing_integer_attr_index', $indexname, $newdbdir); + debug(1, "Removing file $_\n"); + if (! unlink $_) { + debug(1, "Error: could not remove file $_: $!\n"); + return ('error_removing_index_file', $_, $!); + } + my $cmd = "$inst_dir/db2index -n \"$dbname\" -t \"$indexname\""; + debug(1, "Re-creating index file $_: $cmd\n"); + $? = 0; # clear error condition + my $output = `$cmd 2>&1`; + if ($?) { + return ('error_recreating_index_file', $_, $output); + } + debug(1, $output); + } else { + debug(3, "Index $indexname is not for an integer syntax attribute - skipping\n"); + } + } + + return (); +} + # migrate all of the databases in an instance sub migrateDatabases { my $mig = shift; # the Migration object @@ -436,6 +475,15 @@ if (@errs = copyDatabaseDirs($srcdir, "$newdbdir")) { return @errs; } + # fix up the integer indexes + if ($mig->{integerattrs}) { + debug(3, "The schema has some integer attributes\n"); + if (@errs = fixIntegerIndexes($mig, $inst_dir, $newdbdir)) { + return @errs; + } + } else { + debug(3, "No integer attributes to fix for $newdbdir\n"); + } } } } while ($ent = $src->nextEntry()); @@ -680,6 +728,12 @@ '51ns-calendar' => '51ns-calendar.ldif' ); +# these indexes are handled specially by the db code +my %intattrstoskip = ( + 'numsubordinates' => 'numSubordinates', + 'hassubordinates' => 'hasSubordinates' +); + sub migrateSchema { my $mig = shift; # the Migration object my $inst = shift; # the instance name (e.g. slapd-instance) @@ -700,6 +754,39 @@ } } + if (!$mig->{crossplatform}) { + # now, for all of the new schema, we need to get the list of attribute + # types with INTEGER syntax, including derived types (e.g. SUP 'attr') + # not required for cross platform because import of the old ldif file + # will automatically recreate all indexes + my %intattrs = (); + for (glob("$newschemadir/*.ldif")) { + # read in schema entry from LDIF + open( MYSCHEMA, $_ ) || die "Can't open $_: $!"; + my $in = new Mozilla::LDAP::LDIF(*MYSCHEMA); + while (my $ent = readOneEntry $in) { + my @attrs = $ent->getValues('attributeTypes'); + foreach my $attr (@attrs) { + # first see if the attribute definition uses INTEGER syntax + # else see if the super uses INTEGER - note this assumes the attributes + # are listed in the files in SUP order - that is, an attribute does + # not reference a SUP before it is defined + if ($attr =~ / NAME (?:\(\s)?[\']?(\w+)[\']?.* SYNTAX 1.3.6.1.4.1.1466.115.121.1.27[\{\s]/) { + next if ($intattrstoskip{lc $1}); + $intattrs{lc $1} = $1; + } elsif (($attr =~ / NAME (?:\(\s)?[\']?(\w+)[\']?.*SUP [\']?(\w+)[\']?/) && + $intattrs{lc $2}) { + next if ($intattrstoskip{lc $1}); + $intattrs{lc $1} = $1; + } + } + } + close MYSCHEMA; + } + # %intattrs now contains all of the integer valued attributes + $mig->{integerattrs} = \%intattrs; # hashref + } + return (); } Index: migrate-ds.res =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/migrate-ds.res,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- migrate-ds.res 30 Aug 2007 00:06:51 -0000 1.5 +++ migrate-ds.res 5 Oct 2007 02:30:07 -0000 1.6 @@ -22,3 +22,6 @@ database files are not binary compatible, and the new databases must\ be initialized from an LDIF export of the old databases. Please refer\ to the migration instructions for help with how to do this.\n\n +fixing_integer_attr_index = The index for the attribute '%s' in the database directory '%s' will be removed and re-created.\n\n +error_removing_index_file = Could not remove the index file '%s'. Error: %s\n\n +error_recreating_index_file = Could not re-create the index file '%s'. Error: %s\n\n From fedora-directory-commits at redhat.com Fri Oct 5 17:00:06 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 5 Oct 2007 13:00:06 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd log.c, 1.17, 1.18 libglobs.c, 1.21, 1.22 Message-ID: <200710051700.l95H060I001920@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1833 Modified Files: log.c libglobs.c Log Message: Resolves: #173873 Summary: Directory Server should shutdown if it fails to write logs (comment #7) Change Description: 1. introduced a new static function log__error_emergency, which is called at emergency to log to the syslog and at least try to log into the errors log one more time. 2. added an error parameter to the macro LOG_WRITE_NOW to return if the writing to the log was successful or not. 3. if opening an errors log or writing to an errors log failed, call g_set_shutdown to shutdown the server gracefully. 4. log__error_emergency calls writing log function (LDAPDebug --> slapd_log_error_proc_internal) with ERROR_LOCK_WRITE unlocked, if locked. Index: log.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/log.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- log.c 3 Oct 2007 20:17:22 -0000 1.17 +++ log.c 5 Oct 2007 17:00:04 -0000 1.18 @@ -126,7 +126,7 @@ static int log__getfilesize(LOGFD fp); static int log__enough_freespace(char *path); -static int vslapd_log_error(LOGFD fp, char *subsystem, char *fmt, va_list ap ); +static int vslapd_log_error(LOGFD fp, char *subsystem, char *fmt, va_list ap, int locked ); static int vslapd_log_access(char *fmt, va_list ap ); static void log_convert_time (time_t ctime, char *tbuf, int type); static time_t log_reverse_convert_time (char *tbuf); @@ -134,7 +134,7 @@ static void log_append_buffer2(time_t tnl, LogBufferInfo *lbi, char *msg1, size_t size1, char *msg2, size_t size2); static void log_flush_buffer(LogBufferInfo *lbi, int type, int sync_now); static void log_write_title(LOGFD fp); - +static void log__error_emergency(const char *errstr, int reopen, int locked); static int slapd_log_error_proc_internal( @@ -154,8 +154,8 @@ * LOG_OPEN_WRITE(fd, filename, mode) is the same but truncates the file and * starts writing at the beginning of the file. * LOG_WRITE(fd, buffer, size, headersize) writes into a LOGFD - * LOG_WRITE_NOW(fd, buffer, size, headersize) writes into a LOGFD and flushes the - * buffer if necessary + * LOG_WRITE_NOW(fd, buffer, size, headersize, err) writes into a LOGFD and + * flushes the buffer if necessary * LOG_CLOSE(fd) closes the logfile */ #ifdef XP_WIN32 @@ -168,10 +168,12 @@ {\ ReportSlapdEvent(EVENTLOG_INFORMATION_TYPE, MSG_SERVER_FAILED_TO_WRITE_LOG, 1, (buffer)); \ } -#define LOG_WRITE_NOW(fd, buffer, size, headersize) do {\ +#define LOG_WRITE_NOW(fd, buffer, size, headersize, err) do {\ + (err) = 0; \ if ( fwrite((buffer), (size), 1, (fd)) != 1 ) \ { \ ReportSlapdEvent(EVENTLOG_INFORMATION_TYPE, MSG_SERVER_FAILED_TO_WRITE_LOG, 1, (buffer)); \ + (err) = 1; \ }; \ fflush((fd)); \ } while (0) @@ -190,11 +192,13 @@ PRErrorCode prerr = PR_GetError(); \ syslog(LOG_ERR, "Failed to write log, " SLAPI_COMPONENT_NAME_NSPR " error %d (%s): %s\n", prerr, slapd_pr_strerror(prerr), (buffer)+(headersize) ); \ } -#define LOG_WRITE_NOW(fd, buffer, size, headersize) do {\ +#define LOG_WRITE_NOW(fd, buffer, size, headersize, err) do {\ + (err) = 0; \ if ( slapi_write_buffer((fd), (buffer), (size)) != (size) ) \ { \ PRErrorCode prerr = PR_GetError(); \ syslog(LOG_ERR, "Failed to write log, " SLAPI_COMPONENT_NAME_NSPR " error %d (%s): %s\n", prerr, slapd_pr_strerror(prerr), (buffer)+(headersize) ); \ + (err) = prerr; \ } \ /* Should be a flush in here ?? Yes because PR_SYNC doesn't work ! */ \ PR_Sync(fd); \ @@ -528,10 +532,13 @@ /* try to open the file, we may have a incorrect path */ if (! LOG_OPEN_APPEND(fp, pathname, loginfo.log_error_mode)) { - LDAPDebug(LDAP_DEBUG_ANY, "WARNING: can't open file %s. " - "errno %d (%s)\n", - pathname, errno, slapd_system_strerror(errno)); + char buffer[SLAPI_LOG_BUFSIZ]; + PRErrorCode prerr = PR_GetError(); /* stay with the current log file */ + PR_snprintf(buffer, sizeof(buffer), + "Failed to open file %s. error %d (%s). Exiting...", + pathname, prerr, slapd_pr_strerror(prerr)); + log__error_emergency(buffer, 0, 0); return LDAP_UNWILLING_TO_PERFORM; } @@ -1589,11 +1596,12 @@ char *buildnum = config_get_buildnum(); char buff[512]; int bufflen = sizeof(buff); + int err = 0; PR_snprintf(buff, bufflen, "\t%s B%s\n", fe_cfg->versionstring ? fe_cfg->versionstring : "Fedora-Directory", buildnum ? buildnum : ""); - LOG_WRITE_NOW(fp, buff, strlen(buff), 0); + LOG_WRITE_NOW(fp, buff, strlen(buff), 0, err); if (fe_cfg->localhost) { PR_snprintf(buff, bufflen, "\t%s:%d (%s)\n\n", @@ -1608,7 +1616,7 @@ PR_snprintf(buff, bufflen, "\t: (%s)\n\n", fe_cfg->configdir ? fe_cfg->configdir : ""); } - LOG_WRITE_NOW(fp, buff, strlen(buff), 0); + LOG_WRITE_NOW(fp, buff, strlen(buff), 0, err); slapi_ch_free((void **)&buildnum); } @@ -1696,6 +1704,7 @@ char *buffer, int buf_len) { + int err; if ( (loginfo.log_audit_state & LOGGING_ENABLED) && (loginfo.log_audit_file != NULL) ){ LOG_AUDIT_LOCK_WRITE( ); if (log__needrotation(loginfo.log_audit_fdes, @@ -1715,7 +1724,7 @@ log_write_title( loginfo.log_audit_fdes); loginfo.log_audit_state &= ~LOGGING_NEED_TITLE; } - LOG_WRITE_NOW(loginfo.log_audit_fdes, buffer, buf_len, 0); + LOG_WRITE_NOW(loginfo.log_audit_fdes, buffer, buf_len, 0, err); LOG_AUDIT_UNLOCK_WRITE(); return 0; } @@ -1755,6 +1764,8 @@ SLAPD_ERROR_LOG) == LOG_ROTATE) { if (log__open_errorlogfile(LOGFILE_NEW, 1) != LOG_SUCCESS) { LOG_ERROR_UNLOCK_WRITE(); + /* shouldn't continue. error is syslog'ed in open_errorlogfile */ + g_set_shutdown( SLAPI_SHUTDOWN_EXIT ); return 0; } while (loginfo.log_error_rotationsyncclock <= loginfo.log_error_ctime) { @@ -1763,19 +1774,19 @@ } if (!(detached)) { - rc = vslapd_log_error( NULL, subsystem, fmt, ap_err ); + rc = vslapd_log_error( NULL, subsystem, fmt, ap_err, 1 ); } if ( loginfo.log_error_fdes != NULL ) { if (loginfo.log_error_state & LOGGING_NEED_TITLE) { log_write_title(loginfo.log_error_fdes); loginfo.log_error_state &= ~LOGGING_NEED_TITLE; } - rc = vslapd_log_error( loginfo.log_error_fdes, subsystem, fmt, ap_file ); + rc = vslapd_log_error( loginfo.log_error_fdes, subsystem, fmt, ap_file, 1 ); } LOG_ERROR_UNLOCK_WRITE(); } else { /* log the problem in the stderr */ - rc = vslapd_log_error( NULL, subsystem, fmt, ap_err ); + rc = vslapd_log_error( NULL, subsystem, fmt, ap_err, 0 ); } return( rc ); } @@ -1785,17 +1796,19 @@ LOGFD fp, char *subsystem, /* omitted if NULL */ char *fmt, - va_list ap ) + va_list ap, + int locked ) { - time_t tnl; - long tz; - struct tm *tmsp, tms; - char tbuf[ TBUFSIZE ]; - char sign; - char buffer[SLAPI_LOG_BUFSIZ]; - int blen; - char *vbuf; - int header_len = 0; + time_t tnl; + long tz; + struct tm *tmsp, tms; + char tbuf[ TBUFSIZE ]; + char sign; + char buffer[SLAPI_LOG_BUFSIZ]; + int blen; + char *vbuf; + int header_len = 0; + int err = 0; tnl = current_time(); #ifdef _WIN32 @@ -1813,50 +1826,67 @@ #else /* BSD_TIME */ tz = - timezone; if ( tmsp->tm_isdst ) { - tz += 3600; + tz += 3600; } #endif /* BSD_TIME */ sign = ( tz >= 0 ? '+' : '-' ); if ( tz < 0 ) { - tz = -tz; + tz = -tz; } (void)strftime( tbuf, (size_t)TBUFSIZE, "%d/%b/%Y:%H:%M:%S", tmsp); sprintf( buffer, "[%s %c%02d%02d]%s%s - ", tbuf, sign, - (int)( tz / 3600 ), (int)( tz % 3600 ), - subsystem ? " " : "", - subsystem ? subsystem : ""); - - /* Bug 561525: to be able to remove timestamp to not over pollute syslog, we may need - to skip the timestamp part of the message. - The size of the header is: - the size of the time string - + size of space - + size of one char (sign) - + size of 2 char - + size of 2 char - + size of [ - + size of ] - */ + (int)( tz / 3600 ), (int)( tz % 3600 ), + subsystem ? " " : "", + subsystem ? subsystem : ""); + + /* Bug 561525: to be able to remove timestamp to not over pollute syslog, we may need + to skip the timestamp part of the message. + The size of the header is: + the size of the time string + + size of space + + size of one char (sign) + + size of 2 char + + size of 2 char + + size of [ + + size of ] + */ - header_len = strlen(tbuf) + 8; + header_len = strlen(tbuf) + 8; if ((vbuf = PR_vsmprintf(fmt, ap)) == NULL) { - return -1; + return -1; } blen = strlen(buffer); - if ((unsigned int)(SLAPI_LOG_BUFSIZ - blen ) < strlen(vbuf)) { - free (vbuf); - return -1; - } - - sprintf (buffer+blen, "%s", vbuf); + PR_snprintf (buffer+blen, sizeof(buffer)-blen, "%s", vbuf); + buffer[sizeof(buffer)-1] = '\0'; if (fp) - LOG_WRITE_NOW(fp, buffer, strlen(buffer), header_len); - - +#if 0 + LOG_WRITE_NOW(fp, buffer, strlen(buffer), header_len, err); +#else + do { + int size = strlen(buffer); + (err) = 0; + if ( slapi_write_buffer((fp), (buffer), (size)) != (size) ) + { + PRErrorCode prerr = PR_GetError(); + syslog(LOG_ERR, "Failed to write log, " SLAPI_COMPONENT_NAME_NSPR " error %d (%s): %s\n", prerr, slapd_pr_strerror(prerr), (buffer)+(header_len) ); + (err) = prerr; + } + /* Should be a flush in here ?? Yes because PR_SYNC doesn't work ! */ + PR_Sync(fp); + } while (0); +#endif else /* stderr is always unbuffered */ - fprintf(stderr, "%s", buffer); + fprintf(stderr, "%s", buffer); + + if (err) { + PR_snprintf(buffer, sizeof(buffer), + "Writing to the errors log failed. Exiting..."); + log__error_emergency(buffer, 1, locked); + /* failed to write to the errors log. should not continue. */ + g_set_shutdown( SLAPI_SHUTDOWN_EXIT ); + } PR_smprintf_free (vbuf); return( 0 ); @@ -1865,31 +1895,31 @@ int slapi_log_error( int severity, char *subsystem, char *fmt, ... ) { - va_list ap1; - va_list ap2; - int rc; + va_list ap1; + va_list ap2; + int rc; if ( severity < SLAPI_LOG_MIN || severity > SLAPI_LOG_MAX ) { - (void)slapd_log_error_proc( subsystem, - "slapi_log_error: invalid severity %d (message %s)\n", - severity, fmt ); - return( -1 ); + (void)slapd_log_error_proc( subsystem, + "slapi_log_error: invalid severity %d (message %s)\n", + severity, fmt ); + return( -1 ); } - + if ( #ifdef _WIN32 - if ( *module_ldap_debug + *module_ldap_debug #else - if ( slapd_ldap_debug + slapd_ldap_debug #endif - & slapi_log_map[ severity ] ) { - va_start( ap1, fmt ); - va_start( ap2, fmt ); - rc = slapd_log_error_proc_internal( subsystem, fmt, ap1, ap2 ); - va_end( ap1 ); - va_end( ap2 ); + & slapi_log_map[ severity ] ) { + va_start( ap1, fmt ); + va_start( ap2, fmt ); + rc = slapd_log_error_proc_internal( subsystem, fmt, ap1, ap2 ); + va_end( ap1 ); + va_end( ap2 ); } else { - rc = 0; /* nothing to be logged --> always return success */ + rc = 0; /* nothing to be logged --> always return success */ } return( rc ); @@ -1899,13 +1929,13 @@ slapi_is_loglevel_set ( const int loglevel ) { - return ( + return ( #ifdef _WIN32 *module_ldap_debug #else slapd_ldap_debug #endif - & slapi_log_map[ loglevel ] ? 1 : 0); + & slapi_log_map[ loglevel ] ? 1 : 0); } @@ -3474,6 +3504,31 @@ return logfile_type; } +static void +log__error_emergency(const char *errstr, int reopen, int locked) +{ + syslog(LOG_ERR, "%s\n", errstr); + + /* emergency open */ + if (!reopen) { + return; + } + if (NULL != loginfo.log_error_fdes) { + LOG_CLOSE(loginfo.log_error_fdes); + } + if (! LOG_OPEN_APPEND(loginfo.log_error_fdes, + loginfo.log_error_file, loginfo.log_error_mode)) { + PRErrorCode prerr = PR_GetError(); + syslog(LOG_ERR, "Failed to reopen errors log file, " SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n", prerr, slapd_pr_strerror(prerr)); + } else { + /* LDAPDebug locks ERROR_LOCK_WRITE internally */ + if (locked) LOG_ERROR_UNLOCK_WRITE(); + LDAPDebug(LDAP_DEBUG_ANY, "%s\n", errstr, 0, 0); + if (locked) LOG_ERROR_LOCK_WRITE( ); + } + return; +} + /****************************************************************************** * log__open_errorlogfile * @@ -3485,7 +3540,7 @@ { time_t now; - LOGFD fp; + LOGFD fp = NULL; LOGFD fpinfo = NULL; char tbuf[TBUFSIZE]; struct logfileinfo *logp; @@ -3500,6 +3555,9 @@ pw = slapdFrontendConfig->localuserinfo; } else { + PR_snprintf(buffer, sizeof(buffer), + "Invalid nsslapd-localuser. Cannot open the errors log. Exiting..."); + log__error_emergency(buffer, 0, locked); return LOG_UNABLE_TO_OPENFILE; } #endif @@ -3541,6 +3599,14 @@ log_convert_time (log->l_ctime, tbuf, 1/*short */); PR_snprintf(newfile, sizeof(newfile), "%s.%s", loginfo.log_error_file, tbuf); if (PR_Rename (loginfo.log_error_file, newfile) != PR_SUCCESS) { + PRErrorCode prerr = PR_GetError(); + PR_snprintf(buffer, sizeof(buffer), + "Failed to rename errors log file, " + SLAPI_COMPONENT_NAME_NSPR " error %d (%s). Exiting...", + prerr, slapd_pr_strerror(prerr)); + log__error_emergency(buffer, 1, 1); + slapi_ch_free((void **)&log); + if (!locked) LOG_ERROR_UNLOCK_WRITE(); return LOG_UNABLE_TO_OPENFILE; } @@ -3551,15 +3617,17 @@ } } - /* open a new log file */ if (! LOG_OPEN_APPEND(fp, loginfo.log_error_file, loginfo.log_error_mode)) { - LDAPDebug(LDAP_DEBUG_ANY, "WARNING: can't open file %s. " - "errno %d (%s)\n", + PR_snprintf(buffer, sizeof(buffer), + "Failed to open errors log file %s: error %d (%s); Exiting...", loginfo.log_error_file, errno, slapd_system_strerror(errno)); + log__error_emergency(buffer, 1, locked); if (!locked) LOG_ERROR_UNLOCK_WRITE(); + /* failed to write to the errors log. should not continue. */ + g_set_shutdown( SLAPI_SHUTDOWN_EXIT ); /*if I have an old log file -- I should log a message - ** that I can't open the new file. Let the caller worry + ** that I can't open the new file. Let the caller worry ** about logging message. */ return LOG_UNABLE_TO_OPENFILE; @@ -3583,9 +3651,10 @@ loginfo.log_error_state |= LOGGING_NEED_TITLE; if (! LOG_OPEN_WRITE(fpinfo, loginfo.log_errorinfo_file, loginfo.log_error_mode)) { - LDAPDebug(LDAP_DEBUG_ANY, "WARNING: can't open file %s. " - "errno %d (%s)\n", - loginfo.log_errorinfo_file, errno, slapd_system_strerror(errno)); + PR_snprintf(buffer, sizeof(buffer), + "Failed to open/write to errors log file %s: error %d (%s). Exiting...", + loginfo.log_error_file, errno, slapd_system_strerror(errno)); + log__error_emergency(buffer, 1, locked); if (!locked) LOG_ERROR_UNLOCK_WRITE(); return LOG_UNABLE_TO_OPENFILE; } @@ -3597,7 +3666,7 @@ LOG_WRITE(fpinfo, buffer, strlen(buffer), 0); logp = loginfo.log_error_logchain; - while ( logp) { + while (logp) { log_convert_time (logp->l_ctime, tbuf, 1 /*short */); PR_snprintf(buffer, sizeof(buffer), "LOGINFO:%s%s.%s (%lu) (%u)\n", PREVLOGFILE, loginfo.log_error_file, tbuf, logp->l_ctime, logp->l_size); @@ -3607,7 +3676,7 @@ /* Close the info file. We need only when we need to rotate to the ** next log file. */ - if (fpinfo) LOG_CLOSE(fpinfo); + if (fpinfo) LOG_CLOSE(fpinfo); /* This is now the current error log */ loginfo.log_error_ctime = now; @@ -3836,6 +3905,7 @@ static void log_flush_buffer(LogBufferInfo *lbi, int type, int sync_now) { slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + int err = 0; if (type == SLAPD_ACCESS_LOG) { @@ -3868,7 +3938,8 @@ if (!sync_now && slapdFrontendConfig->accesslogbuffering) { LOG_WRITE(loginfo.log_access_fdes, lbi->top, lbi->current - lbi->top, 0); } else { - LOG_WRITE_NOW(loginfo.log_access_fdes, lbi->top, lbi->current - lbi->top, 0); + LOG_WRITE_NOW(loginfo.log_access_fdes, lbi->top, + lbi->current - lbi->top, 0, err); } lbi->current = lbi->top; Index: libglobs.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/libglobs.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- libglobs.c 20 Sep 2007 16:54:38 -0000 1.21 +++ libglobs.c 5 Oct 2007 17:00:04 -0000 1.22 @@ -3034,22 +3034,26 @@ slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); if ( config_value_is_null( attrname, value, errorbuf, 1 )) { - return LDAP_OPERATIONS_ERROR; + return LDAP_OPERATIONS_ERROR; } retVal = log_update_errorlogdir ( value, apply ); if ( retVal != LDAP_SUCCESS ) { - PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, - "Cannot open errorlog directory \"%s\", errors will " - "not be logged.", value ); + PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, + "Cannot open errorlog file \"%s\", errors cannot be logged. Exiting...", + value ); + syslog(LOG_ERR, + "Cannot open errorlog file \"%s\", errors cannot be logged. Exiting...", + value ); + g_set_shutdown( SLAPI_SHUTDOWN_EXIT ); } if ( apply ) { - CFG_LOCK_WRITE(slapdFrontendConfig); - slapi_ch_free ( (void **) &(slapdFrontendConfig->errorlog) ); - slapdFrontendConfig->errorlog = slapi_ch_strdup ( value ); - CFG_UNLOCK_WRITE(slapdFrontendConfig); + CFG_LOCK_WRITE(slapdFrontendConfig); + slapi_ch_free ( (void **) &(slapdFrontendConfig->errorlog) ); + slapdFrontendConfig->errorlog = slapi_ch_strdup ( value ); + CFG_UNLOCK_WRITE(slapdFrontendConfig); } return retVal; } From fedora-directory-commits at redhat.com Fri Oct 5 23:31:10 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Fri, 5 Oct 2007 19:31:10 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd modify.c, 1.14, 1.15 pblock.c, 1.10, 1.11 pw_retry.c, 1.6, 1.7 slapi-plugin.h, 1.18, 1.19 slapi-private.h, 1.16, 1.17 ssl.c, 1.13, 1.14 Message-ID: <200710052331.l95NVAOu028930@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28865 Modified Files: modify.c pblock.c pw_retry.c slapi-plugin.h slapi-private.h ssl.c Log Message: Resolves: 268101 Summary: Added new operation flag to skip writing modifiresname and related attributes. Updated password policy internal operations to use this new flag. Index: modify.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/modify.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- modify.c 10 Nov 2006 23:45:40 -0000 1.14 +++ modify.c 5 Oct 2007 23:31:07 -0000 1.15 @@ -536,7 +536,7 @@ LDAPMod **mods, *pw_mod, **tmpmods = NULL; Slapi_Mods smods; Slapi_Mods unhashed_pw_smod; - int repl_op, internal_op, lastmod; + int repl_op, internal_op, lastmod, skip_modified_attrs; char *unhashed_pw_attr = NULL; Slapi_Operation *operation; char errorbuf[BUFSIZ]; @@ -551,6 +551,7 @@ slapi_pblock_get (pb, SLAPI_IS_REPLICATED_OPERATION, &repl_op); slapi_pblock_get (pb, SLAPI_OPERATION, &operation); internal_op= operation_is_flag_set(operation, OP_FLAG_INTERNAL); + slapi_pblock_get (pb, SLAPI_SKIP_MODIFIED_ATTRS, &skip_modified_attrs); if (dn == NULL) { @@ -667,8 +668,9 @@ /* can get lastmod only after backend is selected */ slapi_pblock_get(pb, SLAPI_BE_LASTMOD, &lastmod); - /* if this is replication session - leave mod attributes alone */ - if (!repl_op && lastmod) + /* if this is replication session or the operation has been + * flagged - leave mod attributes alone */ + if (!repl_op && !skip_modified_attrs && lastmod) { modify_update_last_modified_attr(pb, &smods); } Index: pblock.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pblock.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- pblock.c 7 Sep 2007 19:08:45 -0000 1.10 +++ pblock.c 5 Oct 2007 23:31:07 -0000 1.11 @@ -360,6 +360,16 @@ case SLAPI_REQUESTOR_ISROOT: (*(int *)value) = pblock->pb_requestor_isroot; break; + case SLAPI_SKIP_MODIFIED_ATTRS: + if(pblock->pb_op==NULL) + { + (*(int *)value) = 0; /* No Operation -> No skip */ + } + else + { + (*(int *)value) = (pblock->pb_op->o_flags & OP_FLAG_SKIP_MODIFIED_ATTRS); + } + break; case SLAPI_IS_REPLICATED_OPERATION: if(pblock->pb_op==NULL) { Index: pw_retry.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pw_retry.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- pw_retry.c 10 Nov 2006 23:45:40 -0000 1.6 +++ pw_retry.c 5 Oct 2007 23:31:07 -0000 1.7 @@ -226,12 +226,14 @@ if (mods && (slapi_mods_get_num_mods(mods) > 0)) { pblock_init(&pb); + /* We don't want to overwrite the modifiersname, etc. attributes, + * so we set a flag for this operation */ slapi_modify_internal_set_pb (&pb, dn, - slapi_mods_get_ldapmods_byref(mods), - NULL, /* Controls */ - NULL, /* UniqueID */ - pw_get_componentID(), /* PluginID */ - 0); /* Flags */ + slapi_mods_get_ldapmods_byref(mods), + NULL, /* Controls */ + NULL, /* UniqueID */ + pw_get_componentID(), /* PluginID */ + OP_FLAG_SKIP_MODIFIED_ATTRS); /* Flags */ slapi_modify_internal_pb (&pb); slapi_pblock_get(&pb, SLAPI_PLUGIN_INTOP_RESULT, &res); Index: slapi-plugin.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-plugin.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- slapi-plugin.h 4 Oct 2007 16:27:47 -0000 1.18 +++ slapi-plugin.h 5 Oct 2007 23:31:07 -0000 1.19 @@ -1360,6 +1360,7 @@ #define SLAPI_IS_REPLICATED_OPERATION 142 #define SLAPI_IS_MMR_REPLICATED_OPERATION 153 #define SLAPI_IS_LEGACY_REPLICATED_OPERATION 154 +#define SLAPI_SKIP_MODIFIED_ATTRS 155 /* connection */ #define SLAPI_CONN_DN 143 Index: slapi-private.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-private.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- slapi-private.h 7 Sep 2007 19:08:45 -0000 1.16 +++ slapi-private.h 5 Oct 2007 23:31:07 -0000 1.17 @@ -380,22 +380,27 @@ /* operation.c */ -#define OP_FLAG_PS 0x0001 -#define OP_FLAG_PS_CHANGESONLY 0x0002 -#define OP_FLAG_GET_EFFECTIVE_RIGHTS 0x0004 -#define OP_FLAG_REPLICATED 0x0008 /* A Replicated Operation */ -#define OP_FLAG_REPL_FIXUP 0x0010 /* A Fixup Operation, generated as a consequence of a Replicated Operation. */ -#define OP_FLAG_INTERNAL 0x0020 /* An operation generated by the core server or a plugin. */ -#define OP_FLAG_ACTION_LOG_ACCESS 0x0040 -#define OP_FLAG_ACTION_LOG_AUDIT 0x0080 -#define OP_FLAG_ACTION_SCHEMA_CHECK 0x0100 -#define OP_FLAG_ACTION_LOG_CHANGES 0x0200 -#define OP_FLAG_ACTION_INVOKE_FOR_REPLOP 0x0400 +#define OP_FLAG_PS 0x00001 +#define OP_FLAG_PS_CHANGESONLY 0x00002 +#define OP_FLAG_GET_EFFECTIVE_RIGHTS 0x00004 +#define OP_FLAG_REPLICATED 0x00008 /* A Replicated Operation */ +#define OP_FLAG_REPL_FIXUP 0x00010 /* A Fixup Operation, generated as a + * consequence of a Replicated Operation. */ +#define OP_FLAG_INTERNAL 0x00020 /* An operation generated by the core + * server or a plugin. */ +#define OP_FLAG_ACTION_LOG_ACCESS 0x00040 +#define OP_FLAG_ACTION_LOG_AUDIT 0x00080 +#define OP_FLAG_ACTION_SCHEMA_CHECK 0x00100 +#define OP_FLAG_ACTION_LOG_CHANGES 0x00200 +#define OP_FLAG_ACTION_INVOKE_FOR_REPLOP 0x00400 #define OP_FLAG_NEVER_CHAIN SLAPI_OP_FLAG_NEVER_CHAIN /* 0x0800 */ -#define OP_FLAG_TOMBSTONE_ENTRY 0x1000 -#define OP_FLAG_RESURECT_ENTRY 0x2000 -#define OP_FLAG_LEGACY_REPLICATION_DN 0x4000 /* Operation done by legacy replication DN */ -#define OP_FLAG_ACTION_NOLOG 0x8000 /* Do not log the entry in audit log or change log */ +#define OP_FLAG_TOMBSTONE_ENTRY 0x01000 +#define OP_FLAG_RESURECT_ENTRY 0x02000 +#define OP_FLAG_LEGACY_REPLICATION_DN 0x04000 /* Operation done by legacy replication DN */ +#define OP_FLAG_ACTION_NOLOG 0x08000 /* Do not log the entry in audit log or + * change log */ +#define OP_FLAG_SKIP_MODIFIED_ATTRS 0x10000 /* Do not update the modifiersname, + * modifiedtimestamp, etc. attributes */ CSN *operation_get_csn(Slapi_Operation *op); void operation_set_csn(Slapi_Operation *op,CSN *csn); Index: ssl.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/ssl.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- ssl.c 29 Jan 2007 23:44:49 -0000 1.13 +++ ssl.c 5 Oct 2007 23:31:07 -0000 1.14 @@ -884,7 +884,7 @@ "slapd_ssl_init2", "tmp dir = %s\n", tmpDir); rv = SSL_ConfigServerSessionIDCache(0, stimeout, stimeout, tmpDir); - slapi_ch_free(&tmpDir); + slapi_ch_free_string(&tmpDir); if (rv) { errorCode = PR_GetError(); if (errorCode == ENOSPC) { From fedora-directory-commits at redhat.com Fri Oct 5 23:45:52 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 5 Oct 2007 19:45:52 -0400 Subject: [Fedora-directory-commits] ldapserver Makefile.am, 1.59, 1.60 configure.ac, 1.38, 1.39 aclocal.m4, 1.53, 1.54 configure, 1.68, 1.69 missing, 1.40, 1.41 install-sh, 1.40, 1.41 compile, 1.39, 1.40 depcomp, 1.40, 1.41 Makefile.in, 1.73, 1.74 config.sub, 1.39, 1.40 config.guess, 1.39, 1.40 Message-ID: <200710052345.l95NjqRH029323@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29223/ldapserver Modified Files: Makefile.am configure.ac aclocal.m4 configure missing install-sh compile depcomp Makefile.in config.sub config.guess Log Message: Resolves: bug 248169 Bug Description: init script modification needed for kerberos auth Reviewed by: nhosoi (Thanks!) Fix Description: I just took Simo's initial patch and ran with it. The initconfigdir parameter is the directory containing the config file for the init script. configure will first try to use $(sysconfdir)/sysconfig, then $(sysconfdir)/default (Solaris and Debian, among others), then the package config directory (the default on HP-UX), for this parameter. The init script and startup script will look in the initconfigdir to find the init config file to source. For directory server, an instance specific file can be used, named e.g. dirsrv-localhost which will apply to the slapd-localhost instance only. A default init config file is provided for dirsrv and dirsrv-admin, with some examples of how it could be used. Platforms tested: RHEL5 x86_64 Flag Day: Yes - autotool file changes Doc impact: Yes. We will need to document how the user can supply environment to the servers at startup time without having to edit the init scripts or the startup scripts. QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.am,v retrieving revision 1.59 retrieving revision 1.60 diff -u -r1.59 -r1.60 --- Makefile.am 1 Oct 2007 23:22:37 -0000 1.59 +++ Makefile.am 5 Oct 2007 23:45:49 -0000 1.60 @@ -78,6 +78,7 @@ serverplugindir = $(libdir)@serverplugindir@ taskdir = $(datadir)@scripttemplatedir@ initdir = $(sysconfdir)@initdir@ +initconfigdir = $(sysconfdir)@initconfigdir@ instconfigdir = @instconfigdir@ perldir = $(libdir)@perldir@ infdir = $(datadir)@infdir@ @@ -241,6 +242,8 @@ init_SCRIPTS = wrappers/$(PACKAGE_NAME) +initconfig_SCRIPTS = ldap/admin/src/$(PACKAGE_NAME) + inf_DATA = ldap/admin/src/slapd.inf \ ldap/admin/src/scripts/dscreate.map \ ldap/admin/src/scripts/dsorgentries.map @@ -1039,7 +1042,8 @@ -e 's, at defaultuser\@,$(defaultuser),g' \ -e 's, at defaultgroup\@,$(defaultgroup),g' \ -e 's, at with_fhs_opt\@, at with_fhs_opt@,g' \ - -e 's, at perlexec\@, at perlexec@,g' + -e 's, at perlexec\@, at perlexec@,g' \ + -e 's, at initconfigdir\@,$(initconfigdir),g' else fixupcmd = sed \ -e 's, at bindir\@,$(bindir),g' \ @@ -1086,7 +1090,8 @@ -e 's, at defaultuser\@,$(defaultuser),g' \ -e 's, at defaultgroup\@,$(defaultgroup),g' \ -e 's, at with_fhs_opt\@, at with_fhs_opt@,g' \ - -e 's, at perlexec\@, at perlexec@,g' + -e 's, at perlexec\@, at perlexec@,g' \ + -e 's, at initconfigdir\@,$(initconfigdir),g' endif %: %.in @@ -1094,4 +1099,9 @@ $(fixupcmd) $^ > $@ %/$(PACKAGE_NAME): %/initscript.in + if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi + $(fixupcmd) $^ > $@ + +%/$(PACKAGE_NAME): %/initconfig.in + if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(fixupcmd) $^ > $@ Index: configure.ac =================================================================== RCS file: /cvs/dirsec/ldapserver/configure.ac,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- configure.ac 1 Oct 2007 23:22:38 -0000 1.38 +++ configure.ac 5 Oct 2007 23:45:49 -0000 1.39 @@ -275,6 +275,7 @@ # assume 64 bit perlexec='/opt/perl_64/bin/perl' platform="hpux" + initconfigdir="/$PACKAGE_NAME/config" ;; hppa*-hp-hpux*) AC_DEFINE([XP_UNIX], [1], [UNIX]) @@ -287,6 +288,7 @@ AC_DEFINE([_POSIX_C_SOURCE], [199506L], [POSIX revision]) AC_DEFINE([_HPUX_SOURCE], [1], [Source namespace]) # assume 64 bit + initconfigdir="/$PACKAGE_NAME/config" perlexec='/opt/perl_64/bin/perl' platform="hpux" ;; @@ -327,6 +329,19 @@ AC_SUBST(initdir) AC_SUBST(perlexec) +# set default initconfigdir if not already set +# value will be set so as to be relative to $(sysconfdir) +if test -z "$initconfigdir" ; then + if test -d /etc/sysconfig ; then + initconfigdir=/sysconfig + elif test -d /etc/default ; then + initconfigdir=/default + else + initconfigdir="/$PACKAGE_NAME/config" + fi +fi +AC_SUBST(initconfigdir) + AM_CONDITIONAL(HPUX,test "$platform" = "hpux") AM_CONDITIONAL(SOLARIS,test "$platform" = "solaris") Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- configure 1 Oct 2007 23:22:38 -0000 1.68 +++ configure 5 Oct 2007 23:45:49 -0000 1.69 @@ -465,7 +465,7 @@ #endif" ac_default_prefix=/opt/$PACKAGE_NAME -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 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 MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP! P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir sasl_path svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor 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 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 MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP! P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec initconfigdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir sasl_path svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -23342,6 +23342,7 @@ # assume 64 bit perlexec='/opt/perl_64/bin/perl' platform="hpux" + initconfigdir="/$PACKAGE_NAME/config" ;; hppa*-hp-hpux*) @@ -23390,6 +23391,7 @@ _ACEOF # assume 64 bit + initconfigdir="/$PACKAGE_NAME/config" perlexec='/opt/perl_64/bin/perl' platform="hpux" ;; @@ -23477,6 +23479,19 @@ +# set default initconfigdir if not already set +# value will be set so as to be relative to $(sysconfdir) +if test -z "$initconfigdir" ; then + if test -d /etc/sysconfig ; then + initconfigdir=/sysconfig + elif test -d /etc/default ; then + initconfigdir=/default + else + initconfigdir="/$PACKAGE_NAME/config" + fi +fi + + if test "$platform" = "hpux"; then @@ -26076,6 +26091,7 @@ s, at LIBCRUN@,$LIBCRUN,;t t s, at initdir@,$initdir,;t t s, at perlexec@,$perlexec,;t t +s, at initconfigdir@,$initconfigdir,;t t s, at HPUX_TRUE@,$HPUX_TRUE,;t t s, at HPUX_FALSE@,$HPUX_FALSE,;t t s, at SOLARIS_TRUE@,$SOLARIS_TRUE,;t t Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.73 retrieving revision 1.74 diff -u -r1.73 -r1.74 --- Makefile.in 1 Oct 2007 23:22:37 -0000 1.73 +++ Makefile.in 5 Oct 2007 23:45:49 -0000 1.74 @@ -93,11 +93,12 @@ am__installdirs = "$(DESTDIR)$(serverdir)" \ "$(DESTDIR)$(serverplugindir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(initdir)" "$(DESTDIR)$(perldir)" \ - "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(taskdir)" \ - "$(DESTDIR)$(configdir)" "$(DESTDIR)$(infdir)" \ - "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)" \ - "$(DESTDIR)$(sampledatadir)" "$(DESTDIR)$(schemadir)" + "$(DESTDIR)$(initdir)" "$(DESTDIR)$(initconfigdir)" \ + "$(DESTDIR)$(perldir)" "$(DESTDIR)$(sbindir)" \ + "$(DESTDIR)$(taskdir)" "$(DESTDIR)$(configdir)" \ + "$(DESTDIR)$(infdir)" "$(DESTDIR)$(propertydir)" \ + "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(sampledatadir)" \ + "$(DESTDIR)$(schemadir)" serverLTLIBRARIES_INSTALL = $(INSTALL) serverpluginLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(server_LTLIBRARIES) $(serverplugin_LTLIBRARIES) @@ -690,11 +691,12 @@ $(am__DEPENDENCIES_1) binSCRIPT_INSTALL = $(INSTALL_SCRIPT) initSCRIPT_INSTALL = $(INSTALL_SCRIPT) +initconfigSCRIPT_INSTALL = $(INSTALL_SCRIPT) perlSCRIPT_INSTALL = $(INSTALL_SCRIPT) sbinSCRIPT_INSTALL = $(INSTALL_SCRIPT) taskSCRIPT_INSTALL = $(INSTALL_SCRIPT) -SCRIPTS = $(bin_SCRIPTS) $(init_SCRIPTS) $(perl_SCRIPTS) \ - $(sbin_SCRIPTS) $(task_SCRIPTS) +SCRIPTS = $(bin_SCRIPTS) $(init_SCRIPTS) $(initconfig_SCRIPTS) \ + $(perl_SCRIPTS) $(sbin_SCRIPTS) $(task_SCRIPTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -917,6 +919,7 @@ includedir = @includedir@ infdir = $(datadir)@infdir@ infodir = @infodir@ +initconfigdir = $(sysconfdir)@initconfigdir@ initdir = $(sysconfdir)@initdir@ install_sh = @install_sh@ instconfigdir = @instconfigdir@ @@ -1153,6 +1156,7 @@ ldap/admin/src/scripts/template-dbverify init_SCRIPTS = wrappers/$(PACKAGE_NAME) +initconfig_SCRIPTS = ldap/admin/src/$(PACKAGE_NAME) inf_DATA = ldap/admin/src/slapd.inf \ ldap/admin/src/scripts/dscreate.map \ ldap/admin/src/scripts/dsorgentries.map @@ -1910,7 +1914,8 @@ @BUNDLE_FALSE@ -e 's, at defaultuser\@,$(defaultuser),g' \ @BUNDLE_FALSE@ -e 's, at defaultgroup\@,$(defaultgroup),g' \ @BUNDLE_FALSE@ -e 's, at with_fhs_opt\@, at with_fhs_opt@,g' \ - at BUNDLE_FALSE@ -e 's, at perlexec\@, at perlexec@,g' + at BUNDLE_FALSE@ -e 's, at perlexec\@, at perlexec@,g' \ + at BUNDLE_FALSE@ -e 's, at initconfigdir\@,$(initconfigdir),g' # these are for the config files and scripts that we need to generate and replace @@ -1967,7 +1972,8 @@ @BUNDLE_TRUE@ -e 's, at defaultuser\@,$(defaultuser),g' \ @BUNDLE_TRUE@ -e 's, at defaultgroup\@,$(defaultgroup),g' \ @BUNDLE_TRUE@ -e 's, at with_fhs_opt\@, at with_fhs_opt@,g' \ - at BUNDLE_TRUE@ -e 's, at perlexec\@, at perlexec@,g' + at BUNDLE_TRUE@ -e 's, at perlexec\@, at perlexec@,g' \ + at BUNDLE_TRUE@ -e 's, at initconfigdir\@,$(initconfigdir),g' all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-am @@ -3742,6 +3748,25 @@ echo " rm -f '$(DESTDIR)$(initdir)/$$f'"; \ rm -f "$(DESTDIR)$(initdir)/$$f"; \ done +install-initconfigSCRIPTS: $(initconfig_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(initconfigdir)" || $(mkdir_p) "$(DESTDIR)$(initconfigdir)" + @list='$(initconfig_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(initconfigSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(initconfigdir)/$$f'"; \ + $(initconfigSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(initconfigdir)/$$f"; \ + else :; fi; \ + done + +uninstall-initconfigSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(initconfig_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(initconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(initconfigdir)/$$f"; \ + done install-perlSCRIPTS: $(perl_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(perldir)" || $(mkdir_p) "$(DESTDIR)$(perldir)" @@ -8876,7 +8901,7 @@ all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) \ $(DATA) config.h installdirs: - for dir in "$(DESTDIR)$(serverdir)" "$(DESTDIR)$(serverplugindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(perldir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(taskdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(infdir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(sampledatadir)" "$(DESTDIR)$(schemadir)"; do \ + for dir in "$(DESTDIR)$(serverdir)" "$(DESTDIR)$(serverplugindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(initconfigdir)" "$(DESTDIR)$(perldir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(taskdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(infdir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(sampledatadir)" "$(DESTDIR)$(schemadir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -9001,9 +9026,9 @@ info-am: install-data-am: install-configDATA install-infDATA \ - install-initSCRIPTS install-nodist_propertyDATA \ - install-perlSCRIPTS install-propertyDATA \ - install-sampledataDATA install-schemaDATA \ + install-initSCRIPTS install-initconfigSCRIPTS \ + install-nodist_propertyDATA install-perlSCRIPTS \ + install-propertyDATA install-sampledataDATA install-schemaDATA \ install-serverLTLIBRARIES install-serverpluginLTLIBRARIES \ install-taskSCRIPTS @@ -9038,12 +9063,12 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-configDATA uninstall-infDATA uninstall-info-am \ - uninstall-initSCRIPTS uninstall-nodist_propertyDATA \ - uninstall-perlSCRIPTS uninstall-propertyDATA \ - uninstall-sampledataDATA uninstall-sbinPROGRAMS \ - uninstall-sbinSCRIPTS uninstall-schemaDATA \ - uninstall-serverLTLIBRARIES uninstall-serverpluginLTLIBRARIES \ - uninstall-taskSCRIPTS + uninstall-initSCRIPTS uninstall-initconfigSCRIPTS \ + uninstall-nodist_propertyDATA uninstall-perlSCRIPTS \ + uninstall-propertyDATA uninstall-sampledataDATA \ + uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS \ + uninstall-schemaDATA uninstall-serverLTLIBRARIES \ + uninstall-serverpluginLTLIBRARIES uninstall-taskSCRIPTS .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool \ @@ -9057,10 +9082,10 @@ install-binPROGRAMS install-binSCRIPTS install-configDATA \ install-data install-data-am install-exec install-exec-am \ install-infDATA install-info install-info-am \ - install-initSCRIPTS install-man install-nodist_propertyDATA \ - install-perlSCRIPTS install-propertyDATA \ - install-sampledataDATA install-sbinPROGRAMS \ - install-sbinSCRIPTS install-schemaDATA \ + install-initSCRIPTS install-initconfigSCRIPTS install-man \ + install-nodist_propertyDATA install-perlSCRIPTS \ + install-propertyDATA install-sampledataDATA \ + install-sbinPROGRAMS install-sbinSCRIPTS install-schemaDATA \ install-serverLTLIBRARIES install-serverpluginLTLIBRARIES \ install-strip install-taskSCRIPTS installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ @@ -9068,12 +9093,12 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-configDATA uninstall-infDATA uninstall-info-am \ - uninstall-initSCRIPTS uninstall-nodist_propertyDATA \ - uninstall-perlSCRIPTS uninstall-propertyDATA \ - uninstall-sampledataDATA uninstall-sbinPROGRAMS \ - uninstall-sbinSCRIPTS uninstall-schemaDATA \ - uninstall-serverLTLIBRARIES uninstall-serverpluginLTLIBRARIES \ - uninstall-taskSCRIPTS + uninstall-initSCRIPTS uninstall-initconfigSCRIPTS \ + uninstall-nodist_propertyDATA uninstall-perlSCRIPTS \ + uninstall-propertyDATA uninstall-sampledataDATA \ + uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS \ + uninstall-schemaDATA uninstall-serverLTLIBRARIES \ + uninstall-serverpluginLTLIBRARIES uninstall-taskSCRIPTS dirver.h: Makefile @@ -9093,6 +9118,11 @@ $(fixupcmd) $^ > $@ %/$(PACKAGE_NAME): %/initscript.in + if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi + $(fixupcmd) $^ > $@ + +%/$(PACKAGE_NAME): %/initconfig.in + if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(fixupcmd) $^ > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. From fedora-directory-commits at redhat.com Fri Oct 5 23:45:52 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 5 Oct 2007 19:45:52 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src initconfig.in, NONE, 1.1 Message-ID: <200710052345.l95Njqej029334@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29223/ldapserver/ldap/admin/src Added Files: initconfig.in Log Message: Resolves: bug 248169 Bug Description: init script modification needed for kerberos auth Reviewed by: nhosoi (Thanks!) Fix Description: I just took Simo's initial patch and ran with it. The initconfigdir parameter is the directory containing the config file for the init script. configure will first try to use $(sysconfdir)/sysconfig, then $(sysconfdir)/default (Solaris and Debian, among others), then the package config directory (the default on HP-UX), for this parameter. The init script and startup script will look in the initconfigdir to find the init config file to source. For directory server, an instance specific file can be used, named e.g. dirsrv-localhost which will apply to the slapd-localhost instance only. A default init config file is provided for dirsrv and dirsrv-admin, with some examples of how it could be used. Platforms tested: RHEL5 x86_64 Flag Day: Yes - autotool file changes Doc impact: Yes. We will need to document how the user can supply environment to the servers at startup time without having to edit the init scripts or the startup scripts. QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none --- NEW FILE initconfig.in --- # This file is sourced by @package_name@ upon startup to set # the default environment for all directory server instances. # To set instance specific defaults, make a copy of this # file in the same directory called @package_name at -instance # where "instance" is the name of your directory server # instance e.g. @package_name at -localhost for the # slapd-localhost instance # In order to make more file descriptors available # to the directory server, first make sure the system # hard limits are raised, then use ulimit - uncomment # out the following line and change the value to the # desired value # ulimit -n 8192 # In order to use SASL/GSSAPI the directory # server needs to know where to find its keytab # file - uncomment the following line and set # the path and filename appropriately # KRB5_KTNAME=@instconfigdir@/slapd-instance/keytab ; export KRB5_KTNAME # other environment settings can be added here too From fedora-directory-commits at redhat.com Fri Oct 5 23:45:53 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 5 Oct 2007 19:45:53 -0400 Subject: [Fedora-directory-commits] ldapserver/wrappers initscript.in, 1.6, 1.7 Message-ID: <200710052345.l95NjrH9029349@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/wrappers In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29223/ldapserver/wrappers Modified Files: initscript.in Log Message: Resolves: bug 248169 Bug Description: init script modification needed for kerberos auth Reviewed by: nhosoi (Thanks!) Fix Description: I just took Simo's initial patch and ran with it. The initconfigdir parameter is the directory containing the config file for the init script. configure will first try to use $(sysconfdir)/sysconfig, then $(sysconfdir)/default (Solaris and Debian, among others), then the package config directory (the default on HP-UX), for this parameter. The init script and startup script will look in the initconfigdir to find the init config file to source. For directory server, an instance specific file can be used, named e.g. dirsrv-localhost which will apply to the slapd-localhost instance only. A default init config file is provided for dirsrv and dirsrv-admin, with some examples of how it could be used. Platforms tested: RHEL5 x86_64 Flag Day: Yes - autotool file changes Doc impact: Yes. We will need to document how the user can supply environment to the servers at startup time without having to edit the init scripts or the startup scripts. QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: initscript.in =================================================================== RCS file: /cvs/dirsec/ldapserver/wrappers/initscript.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- initscript.in 13 Aug 2007 15:35:36 -0000 1.6 +++ initscript.in 5 Oct 2007 23:45:50 -0000 1.7 @@ -86,6 +86,8 @@ umask 077 +[ -f @initconfigdir@/@package_name@ ] && . @initconfigdir@/@package_name@ + INSTANCES="" for FILE in `/bin/ls -d $instbase/slapd-* 2>/dev/null`; do @@ -143,7 +145,12 @@ rm -f $pidfile rm -f $startpidfile fix_pid_dir_ownership $instbase/slapd-$instance - $exec -D $instbase/slapd-$instance -i $pidfile -w $startpidfile + # start the directory server in a subshell so that the instance specific + # init config environment will not apply to any other instance + ( + [ -f @initconfigdir@/@package_name at -$instance ] && . @initconfigdir@/@package_name at -$instance + $exec -D $instbase/slapd-$instance -i $pidfile -w $startpidfile + ) if [ $? -eq 0 ]; then server_started=1 # well, perhaps not running, but started ok else From fedora-directory-commits at redhat.com Fri Oct 5 23:45:52 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 5 Oct 2007 19:45:52 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts template-start-slapd.in, 1.7, 1.8 Message-ID: <200710052345.l95Njqh1029343@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29223/ldapserver/ldap/admin/src/scripts Modified Files: template-start-slapd.in Log Message: Resolves: bug 248169 Bug Description: init script modification needed for kerberos auth Reviewed by: nhosoi (Thanks!) Fix Description: I just took Simo's initial patch and ran with it. The initconfigdir parameter is the directory containing the config file for the init script. configure will first try to use $(sysconfdir)/sysconfig, then $(sysconfdir)/default (Solaris and Debian, among others), then the package config directory (the default on HP-UX), for this parameter. The init script and startup script will look in the initconfigdir to find the init config file to source. For directory server, an instance specific file can be used, named e.g. dirsrv-localhost which will apply to the slapd-localhost instance only. A default init config file is provided for dirsrv and dirsrv-admin, with some examples of how it could be used. Platforms tested: RHEL5 x86_64 Flag Day: Yes - autotool file changes Doc impact: Yes. We will need to document how the user can supply environment to the servers at startup time without having to edit the init scripts or the startup scripts. QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: template-start-slapd.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-start-slapd.in,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- template-start-slapd.in 12 Feb 2007 19:55:10 -0000 1.7 +++ template-start-slapd.in 5 Oct 2007 23:45:50 -0000 1.8 @@ -6,6 +6,12 @@ SHLIB_PATH=$prefix{{SERVER-DIR}}:$prefix at nss_libdir@:$prefix at libdir@:@nss_libdir@ export SHLIB_PATH +# source env. for all instances +[ -f @initconfigdir@/@package_name@ ] && . @initconfigdir@/@package_name@ + +# source env. for this instance +[ -f @initconfigdir@/@package_name at -{{SERV-ID}} ] && . @initconfigdir@/@package_name at -{{SERV-ID}} + # Script that starts the ns-slapd server. # Exit status can be: # 0: Server started successfully From fedora-directory-commits at redhat.com Fri Oct 5 23:48:04 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 5 Oct 2007 19:48:04 -0400 Subject: [Fedora-directory-commits] adminserver/admserv/cfgstuff initconfig.in, NONE, 1.1 start-ds-admin.in, 1.3, 1.4 Message-ID: <200710052348.l95Nm4l8029481@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv/cfgstuff In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29402/adminserver/admserv/cfgstuff Modified Files: start-ds-admin.in Added Files: initconfig.in Log Message: Resolves: bug 248169 Bug Description: init script modification needed for kerberos auth Reviewed by: nhosoi (Thanks!) Fix Description: I just took Simo's initial patch and ran with it. The initconfigdir parameter is the directory containing the config file for the init script. configure will first try to use $(sysconfdir)/sysconfig, then $(sysconfdir)/default (Solaris and Debian, among others), then the package config directory (the default on HP-UX), for this parameter. The init script and startup script will look in the initconfigdir to find the init config file to source. For directory server, an instance specific file can be used, named e.g. dirsrv-localhost which will apply to the slapd-localhost instance only. A default init config file is provided for dirsrv and dirsrv-admin, with some examples of how it could be used. Platforms tested: RHEL5 x86_64 Flag Day: Yes - autotool file changes Doc impact: Yes. We will need to document how the user can supply environment to the servers at startup time without having to edit the init scripts or the startup scripts. QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none --- NEW FILE initconfig.in --- # This file is sourced by @package_name@ upon startup to set # the default environment for the admin server. # In order to make more file descriptors available # to the server, first make sure the system # hard limits are raised, then use ulimit - uncomment # out the following line and change the value to the # desired value # ulimit -n 8192 # In order to use SASL/GSSAPI the # server needs to know where to find its keytab # file - uncomment the following line and set # the path and filename appropriately # KRB5_KTNAME=@instconfigdir@/admin-serv/keytab ; export KRB5_KTNAME # other environment settings can be added here too Index: start-ds-admin.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cfgstuff/start-ds-admin.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- start-ds-admin.in 1 Aug 2007 18:14:53 -0000 1.3 +++ start-ds-admin.in 5 Oct 2007 23:48:02 -0000 1.4 @@ -56,4 +56,7 @@ OMIT_DEFLATE="-DOmitDeflate" fi +# source env. for admin server +[ -f @initconfigdir@/@package_name@ ] && . @initconfigdir@/@package_name@ + $HTTPD $OMIT_DEFLATE -k start -f @configdir@/httpd.conf "$@" From fedora-directory-commits at redhat.com Fri Oct 5 23:48:04 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 5 Oct 2007 19:48:04 -0400 Subject: [Fedora-directory-commits] adminserver Makefile.am, 1.33, 1.34 configure.ac, 1.21, 1.22 aclocal.m4, 1.32, 1.33 configure, 1.36, 1.37 missing, 1.22, 1.23 install-sh, 1.22, 1.23 depcomp, 1.22, 1.23 compile, 1.21, 1.22 Makefile.in, 1.39, 1.40 config.sub, 1.22, 1.23 config.guess, 1.22, 1.23 Message-ID: <200710052348.l95Nm4Qm029467@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29402/adminserver Modified Files: Makefile.am configure.ac aclocal.m4 configure missing install-sh depcomp compile Makefile.in config.sub config.guess Log Message: Resolves: bug 248169 Bug Description: init script modification needed for kerberos auth Reviewed by: nhosoi (Thanks!) Fix Description: I just took Simo's initial patch and ran with it. The initconfigdir parameter is the directory containing the config file for the init script. configure will first try to use $(sysconfdir)/sysconfig, then $(sysconfdir)/default (Solaris and Debian, among others), then the package config directory (the default on HP-UX), for this parameter. The init script and startup script will look in the initconfigdir to find the init config file to source. For directory server, an instance specific file can be used, named e.g. dirsrv-localhost which will apply to the slapd-localhost instance only. A default init config file is provided for dirsrv and dirsrv-admin, with some examples of how it could be used. Platforms tested: RHEL5 x86_64 Flag Day: Yes - autotool file changes Doc impact: Yes. We will need to document how the user can supply environment to the servers at startup time without having to edit the init scripts or the startup scripts. QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/adminserver/Makefile.am,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- Makefile.am 5 Sep 2007 16:45:58 -0000 1.33 +++ Makefile.am 5 Oct 2007 23:48:01 -0000 1.34 @@ -68,6 +68,7 @@ manualdir = $(datadir)@manualdir@ helpdir = $(manualdir)/help initdir = $(sysconfdir)@initdir@ +initconfigdir = $(sysconfdir)@initconfigdir@ instconfigdir = @instconfigdir@ instancename = @instancename@ configdir = $(instconfigdir)/$(instancename) @@ -146,6 +147,8 @@ init_SCRIPTS = wrappers/$(PACKAGE_NAME) +initconfig_SCRIPTS = admserv/cfgstuff/$(PACKAGE_NAME) + ldif_DATA = admserv/schema/ldif/00nsroot_backend.ldif.tmpl \ admserv/schema/ldif/01nsroot.ldif.tmpl \ admserv/schema/ldif/02globalpreferences.ldif.tmpl \ @@ -490,7 +493,8 @@ -e 's, at infdir\@,$(infdir),g' \ -e 's, at dslibdir\@,$(dslibdir),g' \ -e 's, at ldifdir\@,$(ldifdir),g' \ - -e 's, at adminutilpath\@,$(adminutilpath),g' + -e 's, at adminutilpath\@,$(adminutilpath),g' \ + -e 's, at initconfigdir\@,$(initconfigdir),g' else fixupcmd = sed \ -e 's, at ECHO_C\@,$(ECHO_C),g' \ @@ -540,7 +544,8 @@ -e 's, at infdir\@,$(infdir),g' \ -e 's, at dslibdir\@,$(dslibdir),g' \ -e 's, at ldifdir\@,$(ldifdir),g' \ - -e 's, at adminutilpath\@,$(adminutilpath),g' + -e 's, at adminutilpath\@,$(adminutilpath),g' \ + -e 's, at initconfigdir\@,$(initconfigdir),g' endif # because the source may be either httpd.conf.in or httpd-2.2.conf.in @@ -555,3 +560,7 @@ %/$(PACKAGE_NAME): %/initscript.in if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(fixupcmd) $^ > $@ + +%/$(PACKAGE_NAME): %/initconfig.in + if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi + $(fixupcmd) $^ > $@ Index: configure.ac =================================================================== RCS file: /cvs/dirsec/adminserver/configure.ac,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- configure.ac 27 Sep 2007 16:57:08 -0000 1.21 +++ configure.ac 5 Oct 2007 23:48:01 -0000 1.22 @@ -141,6 +141,7 @@ CXXLINK_REQUIRED=1 httpdgroup=nogroup platform="hpux" + initconfigdir="/$PACKAGE_NAME/config" ;; hppa*-hp-hpux*) AC_DEFINE([XP_UNIX], [1], [UNIX]) @@ -157,6 +158,7 @@ # assume 64 bit perlexec='/opt/perl_64/bin/perl' platform="hpux" + initconfigdir="/$PACKAGE_NAME/config" ;; sparc-sun-solaris*) AC_DEFINE([XP_UNIX], [1], [UNIX]) @@ -194,6 +196,19 @@ AM_CONDITIONAL([HPUX],test "$platform" = "hpux") AM_CONDITIONAL([SOLARIS],test "$platform" = "solaris") +# set default initconfigdir if not already set +# value will be set so as to be relative to $(sysconfdir) +if test -z "$initconfigdir" ; then + if test -d /etc/sysconfig ; then + initconfigdir=/sysconfig + elif test -d /etc/default ; then + initconfigdir=/default + else + initconfigdir="/$PACKAGE_NAME/config" + fi +fi +AC_SUBST(initconfigdir) + # Check for fortitude m4_include(m4/fortitude.m4) # Check for web server Index: configure =================================================================== RCS file: /cvs/dirsec/adminserver/configure,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- configure 27 Sep 2007 16:57:08 -0000 1.36 +++ configure 5 Oct 2007 23:48:01 -0000 1.37 @@ -468,7 +468,7 @@ ac_default_prefix=/opt/dirsrv ac_subdirs_all="$ac_subdirs_all mod_admserv" ac_subdirs_all="$ac_subdirs_all mod_restartd" -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 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 MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP! P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS PACKAGE_BASE_NAME PACKAGE_BASE_VERSION debug_defs BUNDLE_TRUE BUNDLE_FALSE LIBSOCKET LIBNSL LIBCSTD LIBCRUN initdir perlexec CXXLINK_REQUIRED_TRUE CXXLINK_REQUIRED_FALSE HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE HTTPD APXS APR_CONFIG PKG_CONFIG ICU_CONFIG nsspcache instconfigdir dslibdir nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir sasl_inc sasl_lib sasl_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir adminutil_inc adminutil_lib adminutil_libdir adminutil_ver icu_lib icu_libdir icu_inc icu_bin instancename cgibindir cmdbindir moddir modnssbindir propertydir htmldir icondir manualdir httpdconf httpdconfdir mimemagic httpduser httpdgroup admlogdir piddir pidfile admservport ldifdir admmoddir nssmoddir infdir perldir brand capbrand vendor WINNT_TRUE WINNT_FALSE APACHE22_TRUE APACHE22_FALSE subdirs MOD_ADMSERV_TRUE MOD_ADMSERV_FALSE MOD_RESTARTD_TRUE MOD_RESTARTD_FALSE 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 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 MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP! P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS PACKAGE_BASE_NAME PACKAGE_BASE_VERSION debug_defs BUNDLE_TRUE BUNDLE_FALSE LIBSOCKET LIBNSL LIBCSTD LIBCRUN initdir perlexec CXXLINK_REQUIRED_TRUE CXXLINK_REQUIRED_FALSE HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE initconfigdir HTTPD APXS APR_CONFIG PKG_CONFIG ICU_CONFIG nsspcache instconfigdir dslibdir nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir sasl_inc sasl_lib sasl_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir adminutil_inc adminutil_lib adminutil_libdir adminutil_ver icu_lib icu_libdir icu_inc icu_bin instancename cgibindir cmdbindir moddir modnssbindir propertydir htmldir icondir manualdir httpdconf httpdconfdir mimemagic httpduser httpdgroup admlogdir piddir pidfile admservport ldifdir admmoddir nssmoddir infdir perldir brand capbrand vendor WINNT_TRUE WINNT_FALSE APACHE22_TRUE APACHE22_FALSE subdirs MOD_ADMSERV_TRUE MOD_ADMSERV_FALSE MOD_RESTARTD_TRUE MOD_RESTARTD_FALSE LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -23117,6 +23117,7 @@ CXXLINK_REQUIRED=1 httpdgroup=nogroup platform="hpux" + initconfigdir="/$PACKAGE_NAME/config" ;; hppa*-hp-hpux*) @@ -23169,6 +23170,7 @@ # assume 64 bit perlexec='/opt/perl_64/bin/perl' platform="hpux" + initconfigdir="/$PACKAGE_NAME/config" ;; sparc-sun-solaris*) @@ -23275,6 +23277,19 @@ fi +# set default initconfigdir if not already set +# value will be set so as to be relative to $(sysconfdir) +if test -z "$initconfigdir" ; then + if test -d /etc/sysconfig ; then + initconfigdir=/sysconfig + elif test -d /etc/default ; then + initconfigdir=/default + else + initconfigdir="/$PACKAGE_NAME/config" + fi +fi + + # Check for fortitude # BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. @@ -25940,6 +25955,7 @@ s, at HPUX_FALSE@,$HPUX_FALSE,;t t s, at SOLARIS_TRUE@,$SOLARIS_TRUE,;t t s, at SOLARIS_FALSE@,$SOLARIS_FALSE,;t t +s, at initconfigdir@,$initconfigdir,;t t s, at HTTPD@,$HTTPD,;t t s, at APXS@,$APXS,;t t s, at APR_CONFIG@,$APR_CONFIG,;t t Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/adminserver/Makefile.in,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- Makefile.in 27 Sep 2007 16:57:08 -0000 1.39 +++ Makefile.in 5 Oct 2007 23:48:02 -0000 1.40 @@ -100,12 +100,12 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cgibindir)" \ "$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cmdbindir)" \ - "$(DESTDIR)$(initdir)" "$(DESTDIR)$(cmdbindir)" \ - "$(DESTDIR)$(perldir)" "$(DESTDIR)$(helpdir)" \ - "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(icondir)" \ - "$(DESTDIR)$(infdir)" "$(DESTDIR)$(ldifdir)" \ - "$(DESTDIR)$(configdir)" "$(DESTDIR)$(propertydir)" \ - "$(DESTDIR)$(propertydir)" + "$(DESTDIR)$(initdir)" "$(DESTDIR)$(initconfigdir)" \ + "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(perldir)" \ + "$(DESTDIR)$(helpdir)" "$(DESTDIR)$(htmldir)" \ + "$(DESTDIR)$(icondir)" "$(DESTDIR)$(infdir)" \ + "$(DESTDIR)$(ldifdir)" "$(DESTDIR)$(configdir)" \ + "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libds_admin_serv_la_LIBADD = @@ -241,10 +241,11 @@ cgibinSCRIPT_INSTALL = $(INSTALL_SCRIPT) cmdbinSCRIPT_INSTALL = $(INSTALL_SCRIPT) initSCRIPT_INSTALL = $(INSTALL_SCRIPT) +initconfigSCRIPT_INSTALL = $(INSTALL_SCRIPT) nodist_cmdbinSCRIPT_INSTALL = $(INSTALL_SCRIPT) perlSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(cgibin_SCRIPTS) $(cmdbin_SCRIPTS) $(init_SCRIPTS) \ - $(nodist_cmdbin_SCRIPTS) $(perl_SCRIPTS) + $(initconfig_SCRIPTS) $(nodist_cmdbin_SCRIPTS) $(perl_SCRIPTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -461,6 +462,7 @@ includedir = @includedir@ infdir = $(datadir)@infdir@ infodir = @infodir@ +initconfigdir = $(sysconfdir)@initconfigdir@ initdir = $(sysconfdir)@initdir@ install_sh = @install_sh@ instancename = @instancename@ @@ -585,6 +587,7 @@ @CXXLINK_REQUIRED_FALSE at MYLINK = $(LINK) @CXXLINK_REQUIRED_TRUE at MYLINK = $(CXXLINK) init_SCRIPTS = wrappers/$(PACKAGE_NAME) +initconfig_SCRIPTS = admserv/cfgstuff/$(PACKAGE_NAME) ldif_DATA = admserv/schema/ldif/00nsroot_backend.ldif.tmpl \ admserv/schema/ldif/01nsroot.ldif.tmpl \ admserv/schema/ldif/02globalpreferences.ldif.tmpl \ @@ -875,7 +878,8 @@ @BUNDLE_FALSE@ -e 's, at infdir\@,$(infdir),g' \ @BUNDLE_FALSE@ -e 's, at dslibdir\@,$(dslibdir),g' \ @BUNDLE_FALSE@ -e 's, at ldifdir\@,$(ldifdir),g' \ - at BUNDLE_FALSE@ -e 's, at adminutilpath\@,$(adminutilpath),g' + at BUNDLE_FALSE@ -e 's, at adminutilpath\@,$(adminutilpath),g' \ + at BUNDLE_FALSE@ -e 's, at initconfigdir\@,$(initconfigdir),g' # these are for the config files and scripts that we need to generate and replace @@ -934,7 +938,8 @@ @BUNDLE_TRUE@ -e 's, at infdir\@,$(infdir),g' \ @BUNDLE_TRUE@ -e 's, at dslibdir\@,$(dslibdir),g' \ @BUNDLE_TRUE@ -e 's, at ldifdir\@,$(ldifdir),g' \ - at BUNDLE_TRUE@ -e 's, at adminutilpath\@,$(adminutilpath),g' + at BUNDLE_TRUE@ -e 's, at adminutilpath\@,$(adminutilpath),g' \ + at BUNDLE_TRUE@ -e 's, at initconfigdir\@,$(initconfigdir),g' all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -1429,6 +1434,25 @@ echo " rm -f '$(DESTDIR)$(initdir)/$$f'"; \ rm -f "$(DESTDIR)$(initdir)/$$f"; \ done +install-initconfigSCRIPTS: $(initconfig_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(initconfigdir)" || $(mkdir_p) "$(DESTDIR)$(initconfigdir)" + @list='$(initconfig_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(initconfigSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(initconfigdir)/$$f'"; \ + $(initconfigSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(initconfigdir)/$$f"; \ + else :; fi; \ + done + +uninstall-initconfigSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(initconfig_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(initconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(initconfigdir)/$$f"; \ + done install-nodist_cmdbinSCRIPTS: $(nodist_cmdbin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(cmdbindir)" || $(mkdir_p) "$(DESTDIR)$(cmdbindir)" @@ -2621,7 +2645,7 @@ $(DATA) config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(perldir)" "$(DESTDIR)$(helpdir)" "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(icondir)" "$(DESTDIR)$(infdir)" "$(DESTDIR)$(ldifdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)"; do \ + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(initconfigdir)" "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(perldir)" "$(DESTDIR)$(helpdir)" "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(icondir)" "$(DESTDIR)$(infdir)" "$(DESTDIR)$(ldifdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive @@ -2686,7 +2710,7 @@ install-data-am: install-cgibinPROGRAMS install-cgibinSCRIPTS \ install-cmdbinSCRIPTS install-dist_helpDATA \ install-dist_htmlDATA install-dist_iconDATA install-infDATA \ - install-initSCRIPTS install-ldifDATA \ + install-initSCRIPTS install-initconfigSCRIPTS install-ldifDATA \ install-nodist_cmdbinSCRIPTS install-nodist_configDATA \ install-nodist_propertyDATA install-perlSCRIPTS \ install-propertyDATA @@ -2725,10 +2749,10 @@ uninstall-cmdbinSCRIPTS uninstall-dist_helpDATA \ uninstall-dist_htmlDATA uninstall-dist_iconDATA \ uninstall-infDATA uninstall-info-am uninstall-initSCRIPTS \ - uninstall-ldifDATA uninstall-libLTLIBRARIES \ - uninstall-nodist_cmdbinSCRIPTS uninstall-nodist_configDATA \ - uninstall-nodist_propertyDATA uninstall-perlSCRIPTS \ - uninstall-propertyDATA + uninstall-initconfigSCRIPTS uninstall-ldifDATA \ + uninstall-libLTLIBRARIES uninstall-nodist_cmdbinSCRIPTS \ + uninstall-nodist_configDATA uninstall-nodist_propertyDATA \ + uninstall-perlSCRIPTS uninstall-propertyDATA uninstall-info: uninstall-info-recursive @@ -2745,23 +2769,24 @@ install-data-am install-data-hook install-dist_helpDATA \ install-dist_htmlDATA install-dist_iconDATA install-exec \ install-exec-am install-infDATA install-info install-info-am \ - install-initSCRIPTS install-ldifDATA install-libLTLIBRARIES \ - install-man install-nodist_cmdbinSCRIPTS \ - install-nodist_configDATA install-nodist_propertyDATA \ - install-perlSCRIPTS install-propertyDATA install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + install-initSCRIPTS install-initconfigSCRIPTS install-ldifDATA \ + install-libLTLIBRARIES install-man \ + install-nodist_cmdbinSCRIPTS install-nodist_configDATA \ + install-nodist_propertyDATA install-perlSCRIPTS \ + install-propertyDATA install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ uninstall-cgibinPROGRAMS uninstall-cgibinSCRIPTS \ uninstall-cmdbinSCRIPTS uninstall-dist_helpDATA \ uninstall-dist_htmlDATA uninstall-dist_iconDATA \ uninstall-infDATA uninstall-info-am uninstall-initSCRIPTS \ - uninstall-ldifDATA uninstall-libLTLIBRARIES \ - uninstall-nodist_cmdbinSCRIPTS uninstall-nodist_configDATA \ - uninstall-nodist_propertyDATA uninstall-perlSCRIPTS \ - uninstall-propertyDATA + uninstall-initconfigSCRIPTS uninstall-ldifDATA \ + uninstall-libLTLIBRARIES uninstall-nodist_cmdbinSCRIPTS \ + uninstall-nodist_configDATA uninstall-nodist_propertyDATA \ + uninstall-perlSCRIPTS uninstall-propertyDATA define NL \\n @@ -2806,6 +2831,10 @@ %/$(PACKAGE_NAME): %/initscript.in if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(fixupcmd) $^ > $@ + +%/$(PACKAGE_NAME): %/initconfig.in + if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi + $(fixupcmd) $^ > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: From fedora-directory-commits at redhat.com Fri Oct 5 23:48:04 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 5 Oct 2007 19:48:04 -0400 Subject: [Fedora-directory-commits] adminserver/wrappers initscript.in, 1.1, 1.2 Message-ID: <200710052348.l95Nm4gN029487@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/wrappers In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29402/adminserver/wrappers Modified Files: initscript.in Log Message: Resolves: bug 248169 Bug Description: init script modification needed for kerberos auth Reviewed by: nhosoi (Thanks!) Fix Description: I just took Simo's initial patch and ran with it. The initconfigdir parameter is the directory containing the config file for the init script. configure will first try to use $(sysconfdir)/sysconfig, then $(sysconfdir)/default (Solaris and Debian, among others), then the package config directory (the default on HP-UX), for this parameter. The init script and startup script will look in the initconfigdir to find the init config file to source. For directory server, an instance specific file can be used, named e.g. dirsrv-localhost which will apply to the slapd-localhost instance only. A default init config file is provided for dirsrv and dirsrv-admin, with some examples of how it could be used. Platforms tested: RHEL5 x86_64 Flag Day: Yes - autotool file changes Doc impact: Yes. We will need to document how the user can supply environment to the servers at startup time without having to edit the init scripts or the startup scripts. QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: initscript.in =================================================================== RCS file: /cvs/dirsec/adminserver/wrappers/initscript.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- initscript.in 15 Jun 2007 17:13:02 -0000 1.1 +++ initscript.in 5 Oct 2007 23:48:02 -0000 1.2 @@ -92,6 +92,8 @@ umask 077 +[ -f @initconfigdir@/@package_name@ ] && . @initconfigdir@/@package_name@ + start() { if [ ! -f $start_script ]; then echo_n "*** Error: $start_script does not exist" @@ -99,7 +101,6 @@ exit 1 fi echo "Starting $prog: " - # Start every slapd instance that isn't already running # the server creates pidfile and writes the pid to it when it is fully # started and available to serve clients From fedora-directory-commits at redhat.com Mon Oct 8 14:37:31 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 8 Oct 2007 10:37:31 -0400 Subject: [Fedora-directory-commits] adminserver/wrappers initscript.in, 1.2, 1.3 Message-ID: <200710081437.l98EbVBH030012@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/wrappers In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29995 Modified Files: initscript.in Log Message: since we use the start script to start admin, we source the init config file there, not here in the initscript Index: initscript.in =================================================================== RCS file: /cvs/dirsec/adminserver/wrappers/initscript.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- initscript.in 5 Oct 2007 23:48:02 -0000 1.2 +++ initscript.in 8 Oct 2007 14:37:29 -0000 1.3 @@ -92,7 +92,11 @@ umask 077 -[ -f @initconfigdir@/@package_name@ ] && . @initconfigdir@/@package_name@ +# since we use the start script to start admin, we source the +# init config file there, not here +# if we ever get rid of the start script, we'll have to uncomment +# the following line +#[ -f @initconfigdir@/@package_name@ ] && . @initconfigdir@/@package_name@ start() { if [ ! -f $start_script ]; then From fedora-directory-commits at redhat.com Mon Oct 8 18:45:02 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Mon, 8 Oct 2007 14:45:02 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm archive.c, 1.13, 1.14 Message-ID: <200710081845.l98Ij28P009427@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9399 Modified Files: archive.c Log Message: Resolves: 316281 Summary: Initialize backup directory name properly for all cases. Index: archive.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/archive.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- archive.c 3 Oct 2007 19:14:58 -0000 1.13 +++ archive.c 8 Oct 2007 18:45:00 -0000 1.14 @@ -296,9 +296,11 @@ } } - if (stat(rawdirectory, &sbuf) == 0) { + /* Initialize directory */ + directory = rel2abspath(rawdirectory); + + if (stat(directory, &sbuf) == 0) { int baklen = 0; - directory = rel2abspath(rawdirectory); if (slapd_comp_path(directory, li->li_directory) == 0) { LDAPDebug(LDAP_DEBUG_ANY, From fedora-directory-commits at redhat.com Mon Oct 8 20:49:18 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Mon, 8 Oct 2007 16:49:18 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/passthru ptpreop.c, 1.6, 1.7 Message-ID: <200710082049.l98KnI6M001386@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/passthru In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1354 Modified Files: ptpreop.c Log Message: Resolves: 176302 Summary: Avoid double free of controls in passthrough plugin. Index: ptpreop.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/passthru/ptpreop.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ptpreop.c 10 Nov 2006 23:45:04 -0000 1.6 +++ ptpreop.c 8 Oct 2007 20:49:16 -0000 1.7 @@ -148,7 +148,7 @@ static int passthru_bindpreop( Slapi_PBlock *pb ) { - int rc, method; + int rc, method, freeresctrls=1; char *normbinddn, *matcheddn; char *libldap_errmsg, *pr_errmsg, *errmsg; PassThruConfig *cfg; @@ -259,6 +259,7 @@ */ if ( resctrls != NULL ) { (void)slapi_pblock_set( pb, SLAPI_RESCONTROLS, resctrls ); + freeresctrls=0; } slapi_send_ldap_result( pb, rc, matcheddn, errmsg, 0, urls ); } @@ -275,7 +276,7 @@ if ( pr_errmsg != NULL ) { PR_smprintf_free( pr_errmsg ); } - if ( resctrls != NULL ) { + if ( freeresctrls && (resctrls != NULL) ) { ldap_controls_free( resctrls ); } if ( matcheddn != NULL ) { From fedora-directory-commits at redhat.com Tue Oct 9 17:49:11 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 9 Oct 2007 13:49:11 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src initconfig.in, 1.1, 1.2 Message-ID: <200710091749.l99HnBP7018823@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18806 Modified Files: initconfig.in Log Message: Resolves: bug 190220 Bug Description: Link DS with libumem on Solaris 9 and later Reviewed by: nkinder (Thanks!) Fix Description: See if libumem.so exists, and set the appropriate LD_PRELOAD env. var. if so. Platforms tested: Solaris 9 64-bit Flag Day: no Doc impact: no Index: initconfig.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/initconfig.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- initconfig.in 5 Oct 2007 23:45:50 -0000 1.1 +++ initconfig.in 9 Oct 2007 17:49:09 -0000 1.2 @@ -20,3 +20,14 @@ # KRB5_KTNAME=@instconfigdir@/slapd-instance/keytab ; export KRB5_KTNAME # other environment settings can be added here too +OS=`uname -s` +# use the new mt slab memory allocator on Solaris +# this requires Solaris 9 update 3 or later +if [ "$OS" = "SunOS" -a -f /usr/lib/libumem.so ] ; then + LD_PRELOAD=/usr/lib/libumem.so + export LD_PRELOAD +fi +if [ "$OS" = "SunOS" -a -f /usr/lib/64/libumem.so ] ; then + LD_PRELOAD_64=/usr/lib/64/libumem.so + export LD_PRELOAD_64 +fi From fedora-directory-commits at redhat.com Tue Oct 9 17:51:16 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 9 Oct 2007 13:51:16 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd pw.c, 1.15, 1.16 Message-ID: <200710091751.l99HpGrW018929@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18910 Modified Files: pw.c Log Message: Resolves: bug 305121 Bug Description: Server hangs when adding a group with two password entries Reviewed by: nhosoi (Thanks!) Files: see diff Branch: HEAD Fix Description: The pw_encodevals() was not encoding each value, only the first one, then setting each new value to the same encoded value. The solution is to move char *enc into the loop so that it is allocated anew each time. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no Index: pw.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pw.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- pw.c 5 Dec 2006 21:22:09 -0000 1.15 +++ pw.c 9 Oct 2007 17:51:14 -0000 1.16 @@ -319,7 +319,6 @@ pw_encodevals( Slapi_Value **vals ) { int i; - char *enc = NULL; slapdFrontendConfig_t * slapdFrontendConfig = getFrontendConfig(); @@ -330,6 +329,7 @@ for ( i = 0; vals[ i ] != NULL; ++i ) { struct pw_scheme *pwsp; + char *enc = NULL; if ( (pwsp=pw_val2scheme( (char*)slapi_value_get_string(vals[ i ]), NULL, 0)) != NULL ) { /* JCM Innards */ /* If the value already specifies clear storage, call the * clear storage plug-in */ From fedora-directory-commits at redhat.com Tue Oct 9 18:30:41 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Tue, 9 Oct 2007 14:30:41 -0400 Subject: [Fedora-directory-commits] ldapserver Makefile.am, 1.60, 1.61 Makefile.in, 1.74, 1.75 configure, 1.69, 1.70 configure.ac, 1.39, 1.40 Message-ID: <200710091830.l99IUfA9027561@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27524 Modified Files: Makefile.am Makefile.in configure configure.ac Log Message: Resolves: 325281 Summary: Install SNMP subagent mibs. Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.am,v retrieving revision 1.60 retrieving revision 1.61 diff -u -r1.60 -r1.61 --- Makefile.am 5 Oct 2007 23:45:49 -0000 1.60 +++ Makefile.am 9 Oct 2007 18:30:38 -0000 1.61 @@ -82,6 +82,7 @@ instconfigdir = @instconfigdir@ perldir = $(libdir)@perldir@ infdir = $(datadir)@infdir@ +mibdir = $(datadir)@mibdir@ defaultuser=@defaultuser@ defaultgroup=@defaultgroup@ @@ -248,6 +249,14 @@ ldap/admin/src/scripts/dscreate.map \ ldap/admin/src/scripts/dsorgentries.map +mib_DATA = ldap/servers/snmp/RFC-1215.txt \ + ldap/servers/snmp/SNMPv2-TC.txt \ + ldap/servers/snmp/redhat-directory.mib \ + ldap/servers/snmp/SNMPv2-CONF.txt \ + ldap/servers/snmp/NETWORK-SERVICES-MIB.txt \ + ldap/servers/snmp/RFC1155-SMI.txt \ + ldap/servers/snmp/SNMPv2-SMI.txt + #//////////////////////////////////////////////////////////////// # # Server Strings @@ -1020,6 +1029,7 @@ -e 's, at sysconfdir\@,$(sysconfdir),g' \ -e 's, at localstatedir\@,$(localstatedir),g' \ -e 's, at infdir\@,$(infdir),g' \ + -e 's, at mibdir\@,$(mibdir),g' \ -e 's, at templatedir\@,$(sampledatadir),g' \ -e 's, at package_name\@,$(PACKAGE_NAME),g' \ -e 's, at instconfigdir\@,$(instconfigdir),g' \ @@ -1068,6 +1078,7 @@ -e 's, at sysconfdir\@,$(sysconfdir),g' \ -e 's, at localstatedir\@,$(localstatedir),g' \ -e 's, at infdir\@,$(infdir),g' \ + -e 's, at mibdir\@,$(mibdir),g' \ -e 's, at templatedir\@,$(sampledatadir),g' \ -e 's, at package_name\@,$(PACKAGE_NAME),g' \ -e 's, at instconfigdir\@,$(instconfigdir),g' \ Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.74 retrieving revision 1.75 diff -u -r1.74 -r1.75 --- Makefile.in 5 Oct 2007 23:45:49 -0000 1.74 +++ Makefile.in 9 Oct 2007 18:30:38 -0000 1.75 @@ -96,9 +96,9 @@ "$(DESTDIR)$(initdir)" "$(DESTDIR)$(initconfigdir)" \ "$(DESTDIR)$(perldir)" "$(DESTDIR)$(sbindir)" \ "$(DESTDIR)$(taskdir)" "$(DESTDIR)$(configdir)" \ - "$(DESTDIR)$(infdir)" "$(DESTDIR)$(propertydir)" \ - "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(sampledatadir)" \ - "$(DESTDIR)$(schemadir)" + "$(DESTDIR)$(infdir)" "$(DESTDIR)$(mibdir)" \ + "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)" \ + "$(DESTDIR)$(sampledatadir)" "$(DESTDIR)$(schemadir)" serverLTLIBRARIES_INSTALL = $(INSTALL) serverpluginLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(server_LTLIBRARIES) $(serverplugin_LTLIBRARIES) @@ -768,11 +768,12 @@ $(pwdhash_bin_SOURCES) $(rsearch_bin_SOURCES) configDATA_INSTALL = $(INSTALL_DATA) infDATA_INSTALL = $(INSTALL_DATA) +mibDATA_INSTALL = $(INSTALL_DATA) nodist_propertyDATA_INSTALL = $(INSTALL_DATA) propertyDATA_INSTALL = $(INSTALL_DATA) sampledataDATA_INSTALL = $(INSTALL_DATA) schemaDATA_INSTALL = $(INSTALL_DATA) -DATA = $(config_DATA) $(inf_DATA) $(nodist_property_DATA) \ +DATA = $(config_DATA) $(inf_DATA) $(mib_DATA) $(nodist_property_DATA) \ $(property_DATA) $(sampledata_DATA) $(schema_DATA) ETAGS = etags CTAGS = ctags @@ -931,6 +932,7 @@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ +mibdir = $(datadir)@mibdir@ mkdir_p = @mkdir_p@ netsnmp_inc = @netsnmp_inc@ netsnmp_lib = @netsnmp_lib@ @@ -1161,6 +1163,14 @@ ldap/admin/src/scripts/dscreate.map \ ldap/admin/src/scripts/dsorgentries.map +mib_DATA = ldap/servers/snmp/RFC-1215.txt \ + ldap/servers/snmp/SNMPv2-TC.txt \ + ldap/servers/snmp/redhat-directory.mib \ + ldap/servers/snmp/SNMPv2-CONF.txt \ + ldap/servers/snmp/NETWORK-SERVICES-MIB.txt \ + ldap/servers/snmp/RFC1155-SMI.txt \ + ldap/servers/snmp/SNMPv2-SMI.txt + #//////////////////////////////////////////////////////////////// # @@ -1892,6 +1902,7 @@ @BUNDLE_FALSE@ -e 's, at sysconfdir\@,$(sysconfdir),g' \ @BUNDLE_FALSE@ -e 's, at localstatedir\@,$(localstatedir),g' \ @BUNDLE_FALSE@ -e 's, at infdir\@,$(infdir),g' \ + at BUNDLE_FALSE@ -e 's, at mibdir\@,$(mibdir),g' \ @BUNDLE_FALSE@ -e 's, at templatedir\@,$(sampledatadir),g' \ @BUNDLE_FALSE@ -e 's, at package_name\@,$(PACKAGE_NAME),g' \ @BUNDLE_FALSE@ -e 's, at instconfigdir\@,$(instconfigdir),g' \ @@ -1950,6 +1961,7 @@ @BUNDLE_TRUE@ -e 's, at sysconfdir\@,$(sysconfdir),g' \ @BUNDLE_TRUE@ -e 's, at localstatedir\@,$(localstatedir),g' \ @BUNDLE_TRUE@ -e 's, at infdir\@,$(infdir),g' \ + at BUNDLE_TRUE@ -e 's, at mibdir\@,$(mibdir),g' \ @BUNDLE_TRUE@ -e 's, at templatedir\@,$(sampledatadir),g' \ @BUNDLE_TRUE@ -e 's, at package_name\@,$(PACKAGE_NAME),g' \ @BUNDLE_TRUE@ -e 's, at instconfigdir\@,$(instconfigdir),g' \ @@ -8651,6 +8663,23 @@ echo " rm -f '$(DESTDIR)$(infdir)/$$f'"; \ rm -f "$(DESTDIR)$(infdir)/$$f"; \ done +install-mibDATA: $(mib_DATA) + @$(NORMAL_INSTALL) + test -z "$(mibdir)" || $(mkdir_p) "$(DESTDIR)$(mibdir)" + @list='$(mib_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(mibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(mibdir)/$$f'"; \ + $(mibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(mibdir)/$$f"; \ + done + +uninstall-mibDATA: + @$(NORMAL_UNINSTALL) + @list='$(mib_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(mibdir)/$$f'"; \ + rm -f "$(DESTDIR)$(mibdir)/$$f"; \ + done install-nodist_propertyDATA: $(nodist_property_DATA) @$(NORMAL_INSTALL) test -z "$(propertydir)" || $(mkdir_p) "$(DESTDIR)$(propertydir)" @@ -8901,7 +8930,7 @@ all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) \ $(DATA) config.h installdirs: - for dir in "$(DESTDIR)$(serverdir)" "$(DESTDIR)$(serverplugindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(initconfigdir)" "$(DESTDIR)$(perldir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(taskdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(infdir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(sampledatadir)" "$(DESTDIR)$(schemadir)"; do \ + for dir in "$(DESTDIR)$(serverdir)" "$(DESTDIR)$(serverplugindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(initconfigdir)" "$(DESTDIR)$(perldir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(taskdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(infdir)" "$(DESTDIR)$(mibdir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(sampledatadir)" "$(DESTDIR)$(schemadir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -9026,7 +9055,7 @@ info-am: install-data-am: install-configDATA install-infDATA \ - install-initSCRIPTS install-initconfigSCRIPTS \ + install-initSCRIPTS install-initconfigSCRIPTS install-mibDATA \ install-nodist_propertyDATA install-perlSCRIPTS \ install-propertyDATA install-sampledataDATA install-schemaDATA \ install-serverLTLIBRARIES install-serverpluginLTLIBRARIES \ @@ -9064,11 +9093,12 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-configDATA uninstall-infDATA uninstall-info-am \ uninstall-initSCRIPTS uninstall-initconfigSCRIPTS \ - uninstall-nodist_propertyDATA uninstall-perlSCRIPTS \ - uninstall-propertyDATA uninstall-sampledataDATA \ - uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS \ - uninstall-schemaDATA uninstall-serverLTLIBRARIES \ - uninstall-serverpluginLTLIBRARIES uninstall-taskSCRIPTS + uninstall-mibDATA uninstall-nodist_propertyDATA \ + uninstall-perlSCRIPTS uninstall-propertyDATA \ + uninstall-sampledataDATA uninstall-sbinPROGRAMS \ + uninstall-sbinSCRIPTS uninstall-schemaDATA \ + uninstall-serverLTLIBRARIES uninstall-serverpluginLTLIBRARIES \ + uninstall-taskSCRIPTS .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool \ @@ -9083,9 +9113,10 @@ install-data install-data-am install-exec install-exec-am \ install-infDATA install-info install-info-am \ install-initSCRIPTS install-initconfigSCRIPTS install-man \ - install-nodist_propertyDATA install-perlSCRIPTS \ - install-propertyDATA install-sampledataDATA \ - install-sbinPROGRAMS install-sbinSCRIPTS install-schemaDATA \ + install-mibDATA install-nodist_propertyDATA \ + install-perlSCRIPTS install-propertyDATA \ + install-sampledataDATA install-sbinPROGRAMS \ + install-sbinSCRIPTS install-schemaDATA \ install-serverLTLIBRARIES install-serverpluginLTLIBRARIES \ install-strip install-taskSCRIPTS installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ @@ -9094,11 +9125,12 @@ uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-configDATA uninstall-infDATA uninstall-info-am \ uninstall-initSCRIPTS uninstall-initconfigSCRIPTS \ - uninstall-nodist_propertyDATA uninstall-perlSCRIPTS \ - uninstall-propertyDATA uninstall-sampledataDATA \ - uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS \ - uninstall-schemaDATA uninstall-serverLTLIBRARIES \ - uninstall-serverpluginLTLIBRARIES uninstall-taskSCRIPTS + uninstall-mibDATA uninstall-nodist_propertyDATA \ + uninstall-perlSCRIPTS uninstall-propertyDATA \ + uninstall-sampledataDATA uninstall-sbinPROGRAMS \ + uninstall-sbinSCRIPTS uninstall-schemaDATA \ + uninstall-serverLTLIBRARIES uninstall-serverpluginLTLIBRARIES \ + uninstall-taskSCRIPTS dirver.h: Makefile Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.69 retrieving revision 1.70 diff -u -r1.69 -r1.70 --- configure 5 Oct 2007 23:45:49 -0000 1.69 +++ configure 9 Oct 2007 18:30:39 -0000 1.70 @@ -465,7 +465,7 @@ #endif" ac_default_prefix=/opt/$PACKAGE_NAME -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 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 MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP! P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec initconfigdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir sasl_path svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor 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 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 MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP! P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir mibdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec initconfigdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir sasl_path svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -23160,6 +23160,8 @@ serverplugindir=/plugins # relative to datadir infdir=/inf + # relative to datadir + mibdir=/mibs # location of property/resource files, relative to datadir propertydir=/properties # relative to libdir @@ -23182,6 +23184,8 @@ serverplugindir=/$PACKAGE_NAME/plugins # relative to datadir infdir=/$PACKAGE_NAME/inf + # relative to datadir + mibdir=/$PACKAGE_NAME/mibs # location of property/resource files, relative to datadir propertydir=/$PACKAGE_NAME/properties # relative to libdir @@ -23211,6 +23215,7 @@ + # check for --with-instconfigdir echo "$as_me:$LINENO: checking for --with-instconfigdir" >&5 echo $ECHO_N "checking for --with-instconfigdir... $ECHO_C" >&6 @@ -26079,6 +26084,7 @@ s, at scripttemplatedir@,$scripttemplatedir,;t t s, at perldir@,$perldir,;t t s, at infdir@,$infdir,;t t +s, at mibdir@,$mibdir,;t t s, at defaultuser@,$defaultuser,;t t s, at defaultgroup@,$defaultgroup,;t t s, at instconfigdir@,$instconfigdir,;t t Index: configure.ac =================================================================== RCS file: /cvs/dirsec/ldapserver/configure.ac,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- configure.ac 5 Oct 2007 23:45:49 -0000 1.39 +++ configure.ac 9 Oct 2007 18:30:39 -0000 1.40 @@ -165,6 +165,8 @@ serverplugindir=/plugins # relative to datadir infdir=/inf + # relative to datadir + mibdir=/mibs # location of property/resource files, relative to datadir propertydir=/properties # relative to libdir @@ -189,6 +191,8 @@ serverplugindir=/$PACKAGE_NAME/plugins # relative to datadir infdir=/$PACKAGE_NAME/inf + # relative to datadir + mibdir=/$PACKAGE_NAME/mibs # location of property/resource files, relative to datadir propertydir=/$PACKAGE_NAME/properties # relative to libdir @@ -214,6 +218,7 @@ AC_SUBST(scripttemplatedir) AC_SUBST(perldir) AC_SUBST(infdir) +AC_SUBST(mibdir) AC_SUBST(defaultuser) AC_SUBST(defaultgroup) From fedora-directory-commits at redhat.com Tue Oct 9 22:19:00 2007 From: fedora-directory-commits at redhat.com (Jack Magne (jmagne)) Date: Tue, 9 Oct 2007 18:19:00 -0400 Subject: [Fedora-directory-commits] esc/src/app/xpcom/tray rhTray.cpp, 1.6, 1.7 Message-ID: <200710092219.l99MJ0gJ027539@cvs-int.fedora.redhat.com> Author: jmagne Update of /cvs/dirsec/esc/src/app/xpcom/tray In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27477 Modified Files: rhTray.cpp Log Message: Fix for Vista tray icon issue. #239755. Index: rhTray.cpp =================================================================== RCS file: /cvs/dirsec/esc/src/app/xpcom/tray/rhTray.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- rhTray.cpp 24 Feb 2007 02:05:13 -0000 1.6 +++ rhTray.cpp 9 Oct 2007 22:18:58 -0000 1.7 @@ -192,6 +192,7 @@ /* void settooltipmsg (in string aMessage); */ NS_IMETHODIMP rhTray::Settooltipmsg(const char *aMessage) { + char tBuff[56]; PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::Settooltipmsg %s \n",GetTStamp(tBuff,56),aMessage)); @@ -467,7 +468,7 @@ PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::WindowProc: WM_RBUTTONDOWN \n",GetTStamp(tBuff,56))); - HRESULT res = rhTray::ShowPopupMenu (IDR_MENU1); + HRESULT res = rhTray::ShowPopupMenu (IDR_MENU1); switch(res) @@ -592,8 +593,10 @@ unsigned int menuItemID = 0; int i = 0; + + char buffer[256]; - if(numItems == numMenuItems) + if(numItems == numMenuItems ) { for (i = 0 ;i < numMenuItems; i++) { @@ -618,15 +621,18 @@ if( GetMenuItemInfo(hPopup,menuItemID,FALSE,&mii)) { - char *tmpBuff = NULL; - - tmpBuff = strdup(itemText); + buffer[0] = 0; - mii.cch=strlen(itemText); - mii.dwTypeData=tmpBuff; + if(strlen(itemText) < 256) + { + strcpy(buffer,itemText); + } + + mii.cch=strlen(buffer); + mii.fType = MFT_STRING; + mii.dwTypeData= buffer; SetMenuItemInfo(hPopup,menuItemID,FALSE,&mii); - free(tmpBuff); } else { From fedora-directory-commits at redhat.com Wed Oct 10 01:55:38 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 9 Oct 2007 21:55:38 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd daemon.c, 1.15, 1.16 start_tls_extop.c, 1.9, 1.10 Message-ID: <200710100155.l9A1tcMB022673@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22654/ldapserver/ldap/servers/slapd Modified Files: daemon.c start_tls_extop.c Log Message: Resolves: bug 244475 Bug Description: crash at startup with new ldap sdk on 64-bit platform Reviewed by: nkinder (Thanks!) Fix Description: I went ahead and cleaned up or removed the incorrect ber code. We do not need to use LBER_SOCKBUF_OPT_DESC or LBER_SOCKBUF_OPT_READ_FN or LBER_SOCKBUF_OPT_WRITE_FN. I removed an unnecessary malloc/free and just used the stack as we do everywhere else in the code. It looks as though the start_tls cleanup code is almost never used - the code assumes that when you do a start_tls, that stays in force throughout the lifetime of the connection. Removing this code now should insulate us from future ldap c sdk changes. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no Index: daemon.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/daemon.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- daemon.c 20 Sep 2007 16:54:38 -0000 1.15 +++ daemon.c 10 Oct 2007 01:55:36 -0000 1.16 @@ -2242,13 +2242,9 @@ } PR_Lock( conn->c_mutex ); -#if !defined( XP_WIN32 ) - ber_sockbuf_set_option(conn->c_sb,LBER_SOCKBUF_OPT_DESC,&pr_clonefd); -#else +#if defined( XP_WIN32 ) if( !secure ) ber_sockbuf_set_option(conn->c_sb,LBER_SOCKBUF_OPT_DESC,&ns); - else - ber_sockbuf_set_option(conn->c_sb,LBER_SOCKBUF_OPT_DESC,&pr_clonefd); #endif conn->c_sd = ns; @@ -2288,13 +2284,6 @@ func_pointers.lbextiofn_socket_arg = (struct lextiof_socket_private *) pr_clonefd; ber_sockbuf_set_option( conn->c_sb, LBER_SOCKBUF_OPT_EXT_IO_FNS, &func_pointers); - - /* changed here by Cheston - ber_sockbuf_set_option( conn->c_sb, - LBER_SOCKBUF_OPT_READ_FN, (void *)secure_read_function ); - ber_sockbuf_set_option( conn->c_sb, - LBER_SOCKBUF_OPT_WRITE_FN, (void *)secure_write_function ); - */ } else { struct lber_x_ext_io_fns func_pointers; memset(&func_pointers, 0, sizeof(func_pointers)); @@ -2309,12 +2298,6 @@ #endif ber_sockbuf_set_option( conn->c_sb, LBER_SOCKBUF_OPT_EXT_IO_FNS, &func_pointers); - /* - ber_sockbuf_set_option( conn->c_sb, - LBER_SOCKBUF_OPT_READ_FN, (void *)read_function ); - ber_sockbuf_set_option( conn->c_sb, - LBER_SOCKBUF_OPT_WRITE_FN, (void *)write_function ); - */ } if( secure && config_get_SSLclientAuth() != SLAPD_SSLCLIENTAUTH_OFF ) { Index: start_tls_extop.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/start_tls_extop.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- start_tls_extop.c 27 Feb 2007 02:57:30 -0000 1.9 +++ start_tls_extop.c 10 Oct 2007 01:55:36 -0000 1.10 @@ -277,24 +277,17 @@ secure = 1; ns = configure_pr_socket( &newsocket, secure, 0 /*never local*/ ); - - /* - ber_sockbuf_set_option( conn->c_sb, LBER_SOCKBUF_OPT_DESC, &newsocket ); - ber_sockbuf_set_option( conn->c_sb, LBER_SOCKBUF_OPT_READ_FN, (void *)secure_read_function ); - ber_sockbuf_set_option( conn->c_sb, LBER_SOCKBUF_OPT_WRITE_FN, (void *)secure_write_function ); - */ - /*changed to */ { - struct lber_x_ext_io_fns *func_pointers = malloc(LBER_X_EXTIO_FNS_SIZE); - func_pointers->lbextiofn_size = LBER_X_EXTIO_FNS_SIZE; - func_pointers->lbextiofn_read = secure_read_function; - func_pointers->lbextiofn_write = secure_write_function; - func_pointers->lbextiofn_writev = NULL; - func_pointers->lbextiofn_socket_arg = (struct lextiof_socket_private *) newsocket; + struct lber_x_ext_io_fns func_pointers; + memset(&func_pointers, 0, sizeof(func_pointers)); + func_pointers.lbextiofn_size = LBER_X_EXTIO_FNS_SIZE; + func_pointers.lbextiofn_read = secure_read_function; + func_pointers.lbextiofn_write = secure_write_function; + func_pointers.lbextiofn_writev = NULL; + func_pointers.lbextiofn_socket_arg = (struct lextiof_socket_private *) newsocket; ber_sockbuf_set_option( conn->c_sb, - LBER_SOCKBUF_OPT_EXT_IO_FNS, func_pointers); - free(func_pointers); + LBER_SOCKBUF_OPT_EXT_IO_FNS, &func_pointers); } conn->c_flags |= CONN_FLAG_SSL; conn->c_flags |= CONN_FLAG_START_TLS; @@ -420,26 +413,17 @@ secure = 0; ns = configure_pr_socket( &(c->c_prfd), secure, 0 /*never local*/ ); - ber_sockbuf_set_option( c->c_sb, LBER_SOCKBUF_OPT_DESC, &(c->c_prfd) ); - #else ns = PR_FileDesc2NativeHandle( c->c_prfd ); c->c_prfd = NULL; configure_ns_socket( &ns ); - - ber_sockbuf_set_option( c->c_sb, LBER_SOCKBUF_OPT_DESC, &ns ); - #endif c->c_sd = ns; c->c_flags &= ~CONN_FLAG_SSL; c->c_flags &= ~CONN_FLAG_START_TLS; - ber_sockbuf_set_option( c->c_sb, LBER_SOCKBUF_OPT_READ_FN, (void *)read_function ); - ber_sockbuf_set_option( c->c_sb, LBER_SOCKBUF_OPT_WRITE_FN, (void *)write_function ); - - /* authentication & authorization credentials must be set to "anonymous". */ bind_credentials_clear( c, PR_FALSE, PR_TRUE ); From fedora-directory-commits at redhat.com Wed Oct 10 20:28:31 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 10 Oct 2007 16:28:31 -0400 Subject: [Fedora-directory-commits] adminserver/admserv/cfgstuff start-ds-admin.in, 1.4, 1.5 Message-ID: <200710102028.l9AKSVJh001655@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv/cfgstuff In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1636/adminserver/admserv/cfgstuff Modified Files: start-ds-admin.in Log Message: Resolves: bug 317591 Bug Description: Admin server won't start if SELINUX is enabled Reviewed by: nkinder, nhosoi (Thanks!) Fix Description: Just use the fortitude hack to disable selinux for the admin server (run unconfined). Platforms tested: RHEL4 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: start-ds-admin.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cfgstuff/start-ds-admin.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- start-ds-admin.in 5 Oct 2007 23:48:02 -0000 1.4 +++ start-ds-admin.in 10 Oct 2007 20:28:29 -0000 1.5 @@ -59,4 +59,8 @@ # source env. for admin server [ -f @initconfigdir@/@package_name@ ] && . @initconfigdir@/@package_name@ -$HTTPD $OMIT_DEFLATE -k start -f @configdir@/httpd.conf "$@" +if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then + SELINUX_CMD="runcon -t unconfined_t --" +fi + +$SELINUX_CMD $HTTPD $OMIT_DEFLATE -k start -f @configdir@/httpd.conf "$@" From fedora-directory-commits at redhat.com Wed Oct 10 23:49:39 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 10 Oct 2007 19:49:39 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts Migration.pm.in, 1.7, 1.8 Message-ID: <200710102349.l9ANndA6031725@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31708/ldapserver/ldap/admin/src/scripts Modified Files: Migration.pm.in Log Message: migration starts instances now Index: Migration.pm.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Migration.pm.in,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Migration.pm.in 24 Sep 2007 22:54:47 -0000 1.7 +++ Migration.pm.in 10 Oct 2007 23:49:37 -0000 1.8 @@ -89,8 +89,7 @@ server root directory to their new FHS locations. This script does a copy only - the data in the old instances will be left untouched. The old instances must be shutdown first to ensure that the databases are -copied safely. The new instances will not be started by migration, -but can be started after running migration. +copied safely. During migration your migrated instances will be started. USAGE From fedora-directory-commits at redhat.com Thu Oct 11 02:32:46 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 10 Oct 2007 22:32:46 -0400 Subject: [Fedora-directory-commits] adminutil/m4 fhs.m4,1.1,1.2 Message-ID: <200710110232.l9B2Wkjc022756@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminutil/m4 In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22701/adminutil/m4 Modified Files: fhs.m4 Log Message: Resolves: bug 323381 Bug Description: Solaris: setup-ds-admin.pl fails due to extra ICU links Reviewed by: nhosoi (Thanks!) Fix Description: The problem is that when we link against libadminutil.la, libtool adds more -L paths to the link line, and in this case, it adds the path where libadminutil will be installed, which is /usr/lib/sparcv9. There appears to be no way to fix libtool. So the solution is to just use NSPR_LINK as the first link item and move libadminutil.la to the end. This will make sure that the path to nspr will always be first, which will either be $libdir/dirsec or $libdir. On the platforms where it is $libdir/dirsec, the correct version of ICU will either be in that directory, so it will link against that one first, or it will be installed in libdir, in which case it will be found. Platforms tested: Solaris 9 64-bit Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: fhs.m4 =================================================================== RCS file: /cvs/dirsec/adminutil/m4/fhs.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- fhs.m4 4 Apr 2007 19:37:41 -0000 1.1 +++ fhs.m4 11 Oct 2007 02:32:44 -0000 1.2 @@ -25,6 +25,7 @@ AC_ARG_WITH(fhs, [ --with-fhs Use FHS layout], [ with_fhs=yes + AC_MSG_RESULT(yes) ], AC_MSG_RESULT(no)) From fedora-directory-commits at redhat.com Thu Oct 11 02:32:46 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 10 Oct 2007 22:32:46 -0400 Subject: [Fedora-directory-commits] adminutil Makefile.am, 1.8, 1.9 configure.ac, 1.8, 1.9 aclocal.m4, 1.11, 1.12 configure, 1.11, 1.12 missing, 1.10, 1.11 install-sh, 1.10, 1.11 depcomp, 1.10, 1.11 compile, 1.10, 1.11 Makefile.in, 1.11, 1.12 config.sub, 1.10, 1.11 config.guess, 1.10, 1.11 Message-ID: <200710110232.l9B2WkMZ022743@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminutil In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22701/adminutil Modified Files: Makefile.am configure.ac aclocal.m4 configure missing install-sh depcomp compile Makefile.in config.sub config.guess Log Message: Resolves: bug 323381 Bug Description: Solaris: setup-ds-admin.pl fails due to extra ICU links Reviewed by: nhosoi (Thanks!) Fix Description: The problem is that when we link against libadminutil.la, libtool adds more -L paths to the link line, and in this case, it adds the path where libadminutil will be installed, which is /usr/lib/sparcv9. There appears to be no way to fix libtool. So the solution is to just use NSPR_LINK as the first link item and move libadminutil.la to the end. This will make sure that the path to nspr will always be first, which will either be $libdir/dirsec or $libdir. On the platforms where it is $libdir/dirsec, the correct version of ICU will either be in that directory, so it will link against that one first, or it will be installed in libdir, in which case it will be found. Platforms tested: Solaris 9 64-bit Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/adminutil/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Makefile.am 2 Aug 2007 03:18:03 -0000 1.8 +++ Makefile.am 11 Oct 2007 02:32:43 -0000 1.9 @@ -143,7 +143,7 @@ lib/libadmsslutil/uginfossl.c libadmsslutil_la_CPPFLAGS = $(AM_CPPFLAGS) @nss_inc@ @nspr_inc@ @ldapsdk_inc@ @icu_inc@ -libadmsslutil_la_LIBADD = libadminutil.la $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(ICU_LINK) +libadmsslutil_la_LIBADD = $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(ICU_LINK) libadminutil.la libadmsslutil_la_LDFLAGS = -version-number $(subst .,:,$(PACKAGE_VERSION)) if CXXLINK_REQUIRED libadmsslutil_la_LINK = $(CXXLINK) Index: configure.ac =================================================================== RCS file: /cvs/dirsec/adminutil/configure.ac,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- configure.ac 2 Aug 2007 03:18:03 -0000 1.8 +++ configure.ac 11 Oct 2007 02:32:43 -0000 1.9 @@ -106,6 +106,18 @@ AC_PREFIX_DEFAULT([/opt/$PACKAGE_NAME]) +# libtool automatically adds --rpath $libdir to each executable, and +# there is apparently no standard way to disable this. Also, you cannot +# override rpath with LD_LIBRARY_PATH, so this causes problems if you have +# and old version of nss/nspr installed in the system $libdir, but you +# want to use a different one. So we're disabling this rpath thing by +# default and adding a --enable-rpath flag if you really, really want +# to do this. +AC_MSG_CHECKING(for --enable-rpath) +enable_rpath=no +AC_ARG_ENABLE(rpath, AS_HELP_STRING([--enable-rpath], [Allow libtool to add an rpath to $libdir (default: $enable_rpath)])) +AC_MSG_RESULT($enable_rpath) + m4_include(m4/nspr.m4) m4_include(m4/nss.m4) m4_include(m4/mozldap.m4) @@ -149,6 +161,17 @@ # cygnus, mingw, or the like and using cmd.exe as the shell AM_CONDITIONAL([WINNT], false) +if test "$enable_rpath" != "yes" ; then + AC_MSG_NOTICE([Fixing libtool to remove automatic rpath to $libdir . . .]) + cp -p libtool libtool.orig + cp -p libtool libtool.tmp + sed -e '/^runpath_var/ d' \ + -e '/^hardcode_libdir_flag_spec/ d' \ + libtool > libtool.tmp + cp -p libtool.tmp libtool + rm -f libtool.tmp +fi + AC_CONFIG_FILES([Makefile adminutil.pc]) AC_CONFIG_FILES([lib/libadminutil/genrb_wrapper]) Index: configure =================================================================== RCS file: /cvs/dirsec/adminutil/configure,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- configure 2 Aug 2007 03:18:03 -0000 1.11 +++ configure 11 Oct 2007 02:32:43 -0000 1.12 @@ -1040,6 +1040,8 @@ --disable-libtool-lock avoid locking (might break parallel builds) --enable-debug Enable debug features --enable-tests Enable tests to be built (default: yes) + --enable-rpath Allow libtool to add an rpath to $libdir (default: + $enable_rpath) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -4286,7 +4288,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4289 "configure"' > conftest.$ac_ext + echo '#line 4291 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5421,7 +5423,7 @@ # Provide some information about the compiler. -echo "$as_me:5424:" \ +echo "$as_me:5426:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6484,11 +6486,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:6487: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6489: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6491: \$? = $ac_status" >&5 + echo "$as_me:6493: \$? = $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. @@ -6752,11 +6754,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:6755: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6757: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6759: \$? = $ac_status" >&5 + echo "$as_me:6761: \$? = $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. @@ -6856,11 +6858,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:6859: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6861: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6863: \$? = $ac_status" >&5 + echo "$as_me:6865: \$? = $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 @@ -8325,7 +8327,7 @@ libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 8328 "configure"' > conftest.$ac_ext + echo '#line 8330 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9222,7 +9224,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11670: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11672: \$? = $ac_status" >&5 + echo "$as_me:11674: \$? = $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. @@ -11769,11 +11771,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:11772: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11774: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11776: \$? = $ac_status" >&5 + echo "$as_me:11778: \$? = $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 @@ -12305,7 +12307,7 @@ libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 12308 "configure"' > conftest.$ac_ext + echo '#line 12310 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13363,11 +13365,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:13366: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13368: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13370: \$? = $ac_status" >&5 + echo "$as_me:13372: \$? = $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. @@ -13467,11 +13469,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:13470: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13472: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13474: \$? = $ac_status" >&5 + echo "$as_me:13476: \$? = $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 @@ -14916,7 +14918,7 @@ libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 14919 "configure"' > conftest.$ac_ext + echo '#line 14921 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -15694,11 +15696,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:15697: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15699: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15701: \$? = $ac_status" >&5 + echo "$as_me:15703: \$? = $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. @@ -15962,11 +15964,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:15965: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15967: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15969: \$? = $ac_status" >&5 + echo "$as_me:15971: \$? = $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. @@ -16066,11 +16068,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:16069: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16071: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16073: \$? = $ac_status" >&5 + echo "$as_me:16075: \$? = $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 @@ -17535,7 +17537,7 @@ libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 17538 "configure"' > conftest.$ac_ext + echo '#line 17540 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -22937,6 +22939,24 @@ +# libtool automatically adds --rpath $libdir to each executable, and +# there is apparently no standard way to disable this. Also, you cannot +# override rpath with LD_LIBRARY_PATH, so this causes problems if you have +# and old version of nss/nspr installed in the system $libdir, but you +# want to use a different one. So we're disabling this rpath thing by +# default and adding a --enable-rpath flag if you really, really want +# to do this. +echo "$as_me:$LINENO: checking for --enable-rpath" >&5 +echo $ECHO_N "checking for --enable-rpath... $ECHO_C" >&6 +enable_rpath=no +# Check whether --enable-rpath or --disable-rpath was given. +if test "${enable_rpath+set}" = set; then + enableval="$enable_rpath" + +fi; +echo "$as_me:$LINENO: result: $enable_rpath" >&5 +echo "${ECHO_T}$enable_rpath" >&6 + # BEGIN COPYRIGHT BLOCK # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. @@ -23863,6 +23883,8 @@ withval="$with_fhs" with_fhs=yes + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 @@ -23920,6 +23942,18 @@ fi +if test "$enable_rpath" != "yes" ; then + { echo "$as_me:$LINENO: Fixing libtool to remove automatic rpath to $libdir . . ." >&5 +echo "$as_me: Fixing libtool to remove automatic rpath to $libdir . . ." >&6;} + cp -p libtool libtool.orig + cp -p libtool libtool.tmp + sed -e '/^runpath_var/ d' \ + -e '/^hardcode_libdir_flag_spec/ d' \ + libtool > libtool.tmp + cp -p libtool.tmp libtool + rm -f libtool.tmp +fi + ac_config_files="$ac_config_files Makefile adminutil.pc" ac_config_files="$ac_config_files lib/libadminutil/genrb_wrapper" Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/adminutil/Makefile.in,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Makefile.in 2 Aug 2007 03:18:03 -0000 1.11 +++ Makefile.in 11 Oct 2007 02:32:43 -0000 1.12 @@ -88,9 +88,9 @@ lib/libadminutil/libadminutil_la-strlist.lo \ lib/libadminutil/libadminutil_la-uginfo.lo libadminutil_la_OBJECTS = $(am_libadminutil_la_OBJECTS) -libadmsslutil_la_DEPENDENCIES = libadminutil.la $(am__DEPENDENCIES_1) \ +libadmsslutil_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) libadminutil.la am_libadmsslutil_la_OBJECTS = \ lib/libadmsslutil/libadmsslutil_la-admsslutil.lo \ lib/libadmsslutil/libadmsslutil_la-certmgt.lo \ @@ -417,7 +417,7 @@ lib/libadmsslutil/uginfossl.c libadmsslutil_la_CPPFLAGS = $(AM_CPPFLAGS) @nss_inc@ @nspr_inc@ @ldapsdk_inc@ @icu_inc@ -libadmsslutil_la_LIBADD = libadminutil.la $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(ICU_LINK) +libadmsslutil_la_LIBADD = $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(ICU_LINK) libadminutil.la libadmsslutil_la_LDFLAGS = -version-number $(subst .,:,$(PACKAGE_VERSION)) @CXXLINK_REQUIRED_FALSE at libadmsslutil_la_LINK = $(LINK) @CXXLINK_REQUIRED_TRUE at libadmsslutil_la_LINK = $(CXXLINK) From fedora-directory-commits at redhat.com Thu Oct 11 02:56:32 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 10 Oct 2007 22:56:32 -0400 Subject: [Fedora-directory-commits] adminutil configure.ac, 1.9, 1.10 aclocal.m4, 1.12, 1.13 configure, 1.12, 1.13 missing, 1.11, 1.12 install-sh, 1.11, 1.12 depcomp, 1.11, 1.12 config.sub, 1.11, 1.12 config.guess, 1.11, 1.12 compile, 1.11, 1.12 Makefile.in, 1.12, 1.13 Message-ID: <200710110256.l9B2uXkF023172@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminutil In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23143/adminutil Modified Files: configure.ac aclocal.m4 configure missing install-sh depcomp config.sub config.guess compile Makefile.in Log Message: bump version to 1.1.5 Index: configure.ac =================================================================== RCS file: /cvs/dirsec/adminutil/configure.ac,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- configure.ac 11 Oct 2007 02:32:43 -0000 1.9 +++ configure.ac 11 Oct 2007 02:56:30 -0000 1.10 @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([adminutil], [1.1.4], [http://bugzilla.redhat.com/]) +AC_INIT([adminutil], [1.1.5], [http://bugzilla.redhat.com/]) AM_INIT_AUTOMAKE([1.9 foreign subdir-objects]) AM_MAINTAINER_MODE AC_CANONICAL_HOST Index: configure =================================================================== RCS file: /cvs/dirsec/adminutil/configure,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- configure 11 Oct 2007 02:32:43 -0000 1.12 +++ configure 11 Oct 2007 02:56:30 -0000 1.13 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for adminutil 1.1.4. +# Generated by GNU Autoconf 2.59 for adminutil 1.1.5. # # Report bugs to . # @@ -423,8 +423,8 @@ # Identity of this package. PACKAGE_NAME='adminutil' PACKAGE_TARNAME='adminutil' -PACKAGE_VERSION='1.1.4' -PACKAGE_STRING='adminutil 1.1.4' +PACKAGE_VERSION='1.1.5' +PACKAGE_STRING='adminutil 1.1.5' PACKAGE_BUGREPORT='http://bugzilla.redhat.com/' # Factoring default headers for most tests. @@ -954,7 +954,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures adminutil 1.1.4 to adapt to many kinds of systems. +\`configure' configures adminutil 1.1.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1020,7 +1020,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of adminutil 1.1.4:";; + short | recursive ) echo "Configuration of adminutil 1.1.5:";; esac cat <<\_ACEOF @@ -1182,7 +1182,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -adminutil configure 1.1.4 +adminutil configure 1.1.5 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1196,7 +1196,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by adminutil $as_me 1.1.4, which was +It was created by adminutil $as_me 1.1.5, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1839,7 +1839,7 @@ # Define the identity of the package. PACKAGE='adminutil' - VERSION='1.1.4' + VERSION='1.1.5' cat >>confdefs.h <<_ACEOF @@ -24401,7 +24401,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by adminutil $as_me 1.1.4, which was +This file was extended by adminutil $as_me 1.1.5, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -24459,7 +24459,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -adminutil config.status 1.1.4 +adminutil config.status 1.1.5 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" From fedora-directory-commits at redhat.com Thu Oct 11 14:07:05 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Thu, 11 Oct 2007 10:07:05 -0400 Subject: [Fedora-directory-commits] adminserver/admserv/newinst/src setup-ds-admin.res.in, 1.8, 1.9 Message-ID: <200710111407.l9BE759C029226@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv/newinst/src In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29207 Modified Files: setup-ds-admin.res.in Log Message: Resolves: bug 317651 Description: Clean up setup dialog text Fix Description: Fixed usage of setup as a noun and set up as a verb. Also a few other items. Index: setup-ds-admin.res.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/setup-ds-admin.res.in,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- setup-ds-admin.res.in 20 Sep 2007 21:47:28 -0000 1.8 +++ setup-ds-admin.res.in 11 Oct 2007 14:07:03 -0000 1.9 @@ -1,6 +1,6 @@ # this overrides the default # ------------ Welcome Dialog Resource ------------ -dialog_welcome_text = This program will setup the %s Directory and Administration Servers.\n\nIt is recommended that you have "root" privilege to setup the software.\nTips for using this program:\n - Press "Enter" to choose the default and go to the next screen\n - Type "Control-B" then "Enter" to go back to the previous screen\n - Type "Control-C" to cancel the setup program\n - You can enter multiple items using commas to separate them.\n For example: 1, 2, 3 \n\n +dialog_welcome_text = This program will set up the %s Directory and Administration Servers.\n\nIt is recommended that you have "root" privilege to set up the software.\nTips for using this program:\n - Press "Enter" to choose the default and go to the next screen\n - Type "Control-B" then "Enter" to go back to the previous screen\n - Type "Control-C" to cancel the setup program\n\n # %s -> brand # this overrides the default @@ -8,7 +8,7 @@ dialog_ssuser_text = The servers must run as a specific user in a specific group.\nIt is strongly recommended that this user should have no privileges\non the computer (i.e. a non-root user). The setup procedure\nwill give this user/group some permissions in specific paths/files\nto perform server-specific operations.\n\nIf you have not yet created a user and group for the servers,\ncreate this user and group using your native operating\nsystem utilities.\n\n # ----------- AS port Dialog Resource ---------------- -dialog_asport_text = The Administration Server is separate from any of your web or application\nservers since it listens to a different port and access to it is\nrestricted.\n\nPick a port number between 1024 and 65535 to run your Administration\nServer on. You should NOT use a port number which you plan to\nrun a web or application server on, rather, select a number which you\nwill remember and which will not be used for anything else.\n\nThe default in brackets was randomly selected from the available\nports on your system.\n\n +dialog_asport_text = The Administration Server is separate from any of your web or application\nservers since it listens to a different port and access to it is\nrestricted.\n\nPick a port number between 1024 and 65535 to run your Administration\nServer on. You should NOT use a port number which you plan to\nrun a web or application server on, rather, select a number which you\nwill remember and which will not be used for anything else.\n\n dialog_asport_prompt = Administration port dialog_asport_error = The port %s is in use or not available. Please choose another port.\n\n From fedora-directory-commits at redhat.com Thu Oct 11 14:10:02 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Thu, 11 Oct 2007 10:10:02 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts setup-ds.res.in, 1.10, 1.11 Message-ID: <200710111410.l9BEA2ta029472@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29450 Modified Files: setup-ds.res.in Log Message: Resolves: bug 317651 Description: Clean up setup dialog text Fix Description: Fixed usage of setup as a noun and set up as a verb. Also a few other items. Index: setup-ds.res.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/setup-ds.res.in,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- setup-ds.res.in 6 Aug 2007 18:41:40 -0000 1.10 +++ setup-ds.res.in 11 Oct 2007 14:10:00 -0000 1.11 @@ -7,13 +7,13 @@ dialog_use_different_type = When using Silent or Express mode, some of the\ndialogs are skipped, but validation is still performed\non the default or given answers. You should run this program again and\nchoose Typical or Custom mode in order to provide a valid input\nfor the problem dialog.\n\n # ------------ Welcome Dialog Resource ------------ -dialog_welcome_text = This program will setup the %s Directory Server.\n\nIt is recommended that you have "root" privilege to setup the software.\nTips for using this program:\n - Press "Enter" to choose the default and go to the next screen\n - Type "Control-B" then "Enter" to go back to the previous screen\n - Type "Control-C" to cancel the setup program\n - You can enter multiple items using commas to separate them.\n For example: 1, 2, 3 \n\n +dialog_welcome_text = This program will set up the %s Directory Server.\n\nIt is recommended that you have "root" privilege to set up the software.\nTips for using this program:\n - Press "Enter" to choose the default and go to the next screen\n - Type "Control-B" then "Enter" to go back to the previous screen\n - Type "Control-C" to cancel the setup program\n\n # %s -> brand -dialog_welcome_prompt = Would you like to continue with setup? +dialog_welcome_prompt = Would you like to continue with set up? # ----------- License Dialog Resource ----------- -dialog_license_text = BY SETTING UP AND USING THIS SOFTWARE YOU ARE CONSENTING TO BE BOUND BY\nAND ARE BECOMING A PARTY TO THE AGREEMENT FOUND IN THE\nLICENSE.TXT FILE. IF YOU DO NOT AGREE TO ALL OF THE TERMS\nOF THIS AGREEMENT, PLEASE DO NOT SETUP OR USE THIS SOFTWARE.\n\n +dialog_license_text = BY SETTING UP AND USING THIS SOFTWARE YOU ARE CONSENTING TO BE BOUND BY\nAND ARE BECOMING A PARTY TO THE AGREEMENT FOUND IN THE\nLICENSE.TXT FILE. IF YOU DO NOT AGREE TO ALL OF THE TERMS\nOF THIS AGREEMENT, PLEASE DO NOT SET UP OR USE THIS SOFTWARE.\n\n dialog_license_prompt = Do you agree to the license terms? @@ -25,7 +25,7 @@ dialog_dsktune_prompt = Would you like to continue? # ----------- Setup Type Dialog Resource ---------------- -dialog_setuptype_text = Choose a setup type:\n\n 1. Express\n Allows you to quickly setup the servers using the most\n common options and pre-defined defaults. Useful for quick\n evaluation of the products.\n\n 2. Typical\n Allows you to specify common defaults and options.\n\n 3. Custom\n Allows you to specify more advanced options. This is \n recommended for experienced server administrators only.\n\nTo accept the default shown in brackets, press the Enter key.\n\n +dialog_setuptype_text = Choose a setup type:\n\n 1. Express\n Allows you to quickly set up the servers using the most\n common options and pre-defined defaults. Useful for quick\n evaluation of the products.\n\n 2. Typical\n Allows you to specify common defaults and options.\n\n 3. Custom\n Allows you to specify more advanced options. This is \n recommended for experienced server administrators only.\n\nTo accept the default shown in brackets, press the Enter key.\n\n dialog_setuptype_prompt = Choose a setup type From fedora-directory-commits at redhat.com Thu Oct 11 16:29:51 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Thu, 11 Oct 2007 12:29:51 -0400 Subject: [Fedora-directory-commits] ldapserver Makefile.am, 1.61, 1.62 aclocal.m4, 1.54, 1.55 configure, 1.70, 1.71 missing, 1.41, 1.42 install-sh, 1.41, 1.42 depcomp, 1.41, 1.42 compile, 1.40, 1.41 Makefile.in, 1.75, 1.76 config.sub, 1.40, 1.41 config.guess, 1.40, 1.41 Message-ID: <200710111629.l9BGTp9a021817@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21756/ldapserver Modified Files: Makefile.am aclocal.m4 configure missing install-sh depcomp compile Makefile.in config.sub config.guess Log Message: Resolves: bug 165761 Added rfc2307bis schema, but in the data directory. It is not compatible with the older rfc2307 schema included with the directory server. Users will need to upgrade their database to fix posixGroup entries in order to use this schema Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.am,v retrieving revision 1.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- Makefile.am 9 Oct 2007 18:30:38 -0000 1.61 +++ Makefile.am 11 Oct 2007 16:29:49 -0000 1.62 @@ -157,7 +157,8 @@ ldap/ldif/template-sasl.ldif \ $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-FamilyNames \ $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-GivenNames \ - $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-OrgUnits + $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-OrgUnits \ + $(srcdir)/ldap/schema/10rfc2307bis.ldif schema_DATA = $(srcdir)/ldap/schema/00core.ldif \ $(srcdir)/ldap/schema/01common.ldif \ Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.75 retrieving revision 1.76 diff -u -r1.75 -r1.76 --- Makefile.in 9 Oct 2007 18:30:38 -0000 1.75 +++ Makefile.in 11 Oct 2007 16:29:49 -0000 1.76 @@ -1073,7 +1073,8 @@ ldap/ldif/template-sasl.ldif \ $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-FamilyNames \ $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-GivenNames \ - $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-OrgUnits + $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-OrgUnits \ + $(srcdir)/ldap/schema/10rfc2307bis.ldif schema_DATA = $(srcdir)/ldap/schema/00core.ldif \ $(srcdir)/ldap/schema/01common.ldif \ From fedora-directory-commits at redhat.com Thu Oct 11 16:29:51 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Thu, 11 Oct 2007 12:29:51 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/schema 10rfc2307bis.ldif, NONE, 1.1 Message-ID: <200710111629.l9BGTqJ0021821@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/schema In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21756/ldapserver/ldap/schema Added Files: 10rfc2307bis.ldif Log Message: Resolves: bug 165761 Added rfc2307bis schema, but in the data directory. It is not compatible with the older rfc2307 schema included with the directory server. Users will need to upgrade their database to fix posixGroup entries in order to use this schema --- NEW FILE 10rfc2307bis.ldif --- # New and improved RFC 2307 schema (aka RFC 2307 bis) # "An Approach for Using LDAP as a Network Information Service" # This schema has not yet been approved. # dn: cn=schema attributeTypes: ( 1.3.6.1.1.1.1.0 NAME 'uidNumber' DESC 'An integer uniquely identifying a user in an administrative domain' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.1 NAME 'gidNumber' DESC 'An integer uniquely identifying a group in an administrative domain' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.2 NAME 'gecos' DESC 'The GECOS field; the common name' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.3 NAME 'homeDirectory' DESC 'The absolute path to the home directory' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.4 NAME 'loginShell' DESC 'The path to the login shell' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.5 NAME 'shadowLastChange' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.6 NAME 'shadowMin' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.7 NAME 'shadowMax' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.8 NAME 'shadowWarning' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.9 NAME 'shadowInactive' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.10 NAME 'shadowExpire' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.11 NAME 'shadowFlag' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.12 NAME 'memberUid' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.1.1.1.13 NAME 'memberNisNetgroup' EQUALITY caseExactIA5Match SUBSTR caseExactIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.1.1.1.14 NAME 'nisNetgroupTriple' DESC 'Netgroup triple' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.1.1.1.15 NAME 'ipServicePort' DESC 'Service port number' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.16 NAME 'ipServiceProtocol' DESC 'Service protocol name' SUP name ) attributeTypes: ( 1.3.6.1.1.1.1.17 NAME 'ipProtocolNumber' DESC 'IP protocol number' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.18 NAME 'oncRpcNumber' DESC 'ONC RPC number' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.19 NAME 'ipHostNumber' DESC 'IPv4 addresses as a dotted decimal omitting leading zeros or IPv6 addresses as defined in RFC2373' SUP name ) attributeTypes: ( 1.3.6.1.1.1.1.20 NAME 'ipNetworkNumber' DESC 'IP network as a dotted decimal, eg. 192.168, omitting leading zeros' SUP name SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.21 NAME 'ipNetmaskNumber' DESC 'IP netmask as a dotted decimal, eg. 255.255.255.0, omitting leading zeros' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.22 NAME 'macAddress' DESC 'MAC address in maximal, colon separated hex notation, eg. 00:00:92:90:ee:e2' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.1.1.1.23 NAME 'bootParameter' DESC 'rpc.bootparamd parameter' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.1.1.1.24 NAME 'bootFile' DESC 'Boot image name' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.1.1.1.26 NAME 'nisMapName' DESC 'Name of a A generic NIS map' SUP name ) attributeTypes: ( 1.3.6.1.1.1.1.27 NAME 'nisMapEntry' DESC 'A generic NIS entry' EQUALITY caseExactIA5Match SUBSTR caseExactIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.28 NAME 'nisPublicKey' DESC 'NIS public key' EQUALITY octetStringMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.29 NAME 'nisSecretKey' DESC 'NIS secret key' EQUALITY octetStringMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.30 NAME 'nisDomain' DESC 'NIS domain' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.1.1.1.31 NAME 'automountMapName' DESC 'automount Map Name' EQUALITY caseExactIA5Match SUBSTR caseExactIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.32 NAME 'automountKey' DESC 'Automount Key value' EQUALITY caseExactIA5Match SUBSTR caseExactIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.1.1.1.33 NAME 'automountInformation' DESC 'Automount information' EQUALITY caseExactIA5Match SUBSTR caseExactIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) # end of attribute types - beginning of objectclasses objectClasses: ( 1.3.6.1.1.1.2.0 NAME 'posixAccount' SUP top AUXILIARY DESC 'Abstraction of an account with POSIX attributes' MUST ( cn $ uid $ uidNumber $ gidNumber $ homeDirectory ) MAY ( userPassword $ loginShell $ gecos $ description ) ) objectClasses: ( 1.3.6.1.1.1.2.1 NAME 'shadowAccount' SUP top AUXILIARY DESC 'Additional attributes for shadow passwords' MUST uid MAY ( userPassword $ description $ shadowLastChange $ shadowMin $ shadowMax $ shadowWarning $ shadowInactive $ shadowExpire $ shadowFlag ) ) objectClasses: ( 1.3.6.1.1.1.2.2 NAME 'posixGroup' SUP top AUXILIARY DESC 'Abstraction of a group of accounts' MUST gidNumber MAY ( userPassword $ memberUid $ description ) ) objectClasses: ( 1.3.6.1.1.1.2.3 NAME 'ipService' SUP top STRUCTURAL DESC 'Abstraction an Internet Protocol service. Maps an IP port and protocol (such as tcp or udp) to one or more names; the distinguished value of the cn attribute denotes the services canonical name' MUST ( cn $ ipServicePort $ ipServiceProtocol ) MAY description ) objectClasses: ( 1.3.6.1.1.1.2.4 NAME 'ipProtocol' SUP top STRUCTURAL DESC 'Abstraction of an IP protocol. Maps a protocol number to one or more names. The distinguished value of the cn attribute denotes the protocols canonical name' MUST ( cn $ ipProtocolNumber ) MAY description ) objectClasses: ( 1.3.6.1.1.1.2.5 NAME 'oncRpc' SUP top STRUCTURAL DESC 'Abstraction of an Open Network Computing (ONC) [RFC1057] Remote Procedure Call (RPC) binding. This class maps an ONC RPC number to a name. The distinguished value of the cn attribute denotes the RPC services canonical name' MUST ( cn $ oncRpcNumber ) MAY description ) objectClasses: ( 1.3.6.1.1.1.2.6 NAME 'ipHost' SUP top AUXILIARY DESC 'Abstraction of a host, an IP device. The distinguished value of the cn attribute denotes the hosts canonical name. Device SHOULD be used as a structural class' MUST ( cn $ ipHostNumber ) MAY ( userPassword $ l $ description $ manager ) ) objectClasses: ( 1.3.6.1.1.1.2.7 NAME 'ipNetwork' SUP top STRUCTURAL DESC 'Abstraction of a network. The distinguished value of the cn attribute denotes the networks canonical name' MUST ipNetworkNumber MAY ( cn $ ipNetmaskNumber $ l $ description $ manager ) ) objectClasses: ( 1.3.6.1.1.1.2.8 NAME 'nisNetgroup' SUP top STRUCTURAL DESC 'Abstraction of a netgroup. May refer to other netgroups' MUST cn MAY ( nisNetgroupTriple $ memberNisNetgroup $ description ) ) objectClasses: ( 1.3.6.1.1.1.2.9 NAME 'nisMap' SUP top STRUCTURAL DESC 'A generic abstraction of a NIS map' MUST nisMapName MAY description ) objectClasses: ( 1.3.6.1.1.1.2.10 NAME 'nisObject' SUP top STRUCTURAL DESC 'An entry in a NIS map' MUST ( cn $ nisMapEntry $ nisMapName ) MAY description ) objectClasses: ( 1.3.6.1.1.1.2.11 NAME 'ieee802Device' SUP top AUXILIARY DESC 'A device with a MAC address; device SHOULD be used as a structural class' MAY macAddress ) objectClasses: ( 1.3.6.1.1.1.2.12 NAME 'bootableDevice' SUP top AUXILIARY DESC 'A device with boot parameters; device SHOULD be used as a structural class' MAY ( bootFile $ bootParameter ) ) objectClasses: ( 1.3.6.1.1.1.2.14 NAME 'nisKeyObject' SUP top AUXILIARY DESC 'An object with a public and secret key' MUST ( cn $ nisPublicKey $ nisSecretKey ) MAY ( uidNumber $ description ) ) objectClasses: ( 1.3.6.1.1.1.2.15 NAME 'nisDomainObject' SUP top AUXILIARY DESC 'Associates a NIS domain with a naming context' MUST nisDomain ) objectClasses: ( 1.3.6.1.1.1.2.16 NAME 'automountMap' SUP top STRUCTURAL MUST ( automountMapName ) MAY description ) objectClasses: ( 1.3.6.1.1.1.2.17 NAME 'automount' SUP top STRUCTURAL DESC 'Automount information' MUST ( automountKey $ automountInformation ) MAY description ) ## namedObject is needed for groups without members objectClasses: ( 1.3.6.1.4.1.5322.13.1.1 NAME 'namedObject' SUP top STRUCTURAL MAY cn ) From fedora-directory-commits at redhat.com Thu Oct 11 17:14:33 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Thu, 11 Oct 2007 13:14:33 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/schema 50ns-calendar.ldif, 1.4, NONE 50ns-compass.ldif, 1.4, NONE 50ns-delegated-admin.ldif, 1.4, NONE 50ns-legacy.ldif, 1.4, NONE 50ns-mail.ldif, 1.4, NONE 50ns-mcd-browser.ldif, 1.4, NONE 50ns-mcd-config.ldif, 1.4, NONE 50ns-mcd-li.ldif, 1.4, NONE 50ns-mcd-mail.ldif, 1.4, NONE 50ns-media.ldif, 1.4, NONE 50ns-mlm.ldif, 1.4, NONE 50ns-msg.ldif, 1.4, NONE 50ns-netshare.ldif, 1.4, NONE 50ns-news.ldif, 1.4, NONE 50ns-proxy.ldif, 1.4, NONE 50ns-wcal.ldif, 1.4, NONE 51ns-calendar.ldif, 1.4, NONE Message-ID: <200710111714.l9BHEXEM030195@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/schema In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30180 Removed Files: 50ns-calendar.ldif 50ns-compass.ldif 50ns-delegated-admin.ldif 50ns-legacy.ldif 50ns-mail.ldif 50ns-mcd-browser.ldif 50ns-mcd-config.ldif 50ns-mcd-li.ldif 50ns-mcd-mail.ldif 50ns-media.ldif 50ns-mlm.ldif 50ns-msg.ldif 50ns-netshare.ldif 50ns-news.ldif 50ns-proxy.ldif 50ns-wcal.ldif 51ns-calendar.ldif Log Message: remove obsolete schema --- 50ns-calendar.ldif DELETED --- --- 50ns-compass.ldif DELETED --- --- 50ns-delegated-admin.ldif DELETED --- --- 50ns-legacy.ldif DELETED --- --- 50ns-mail.ldif DELETED --- --- 50ns-mcd-browser.ldif DELETED --- --- 50ns-mcd-config.ldif DELETED --- --- 50ns-mcd-li.ldif DELETED --- --- 50ns-mcd-mail.ldif DELETED --- --- 50ns-media.ldif DELETED --- --- 50ns-mlm.ldif DELETED --- --- 50ns-msg.ldif DELETED --- --- 50ns-netshare.ldif DELETED --- --- 50ns-news.ldif DELETED --- --- 50ns-proxy.ldif DELETED --- --- 50ns-wcal.ldif DELETED --- --- 51ns-calendar.ldif DELETED --- From fedora-directory-commits at redhat.com Thu Oct 11 20:34:29 2007 From: fedora-directory-commits at redhat.com (Jack Magne (jmagne)) Date: Thu, 11 Oct 2007 16:34:29 -0400 Subject: [Fedora-directory-commits] esc/mac mac-build.sh,1.1,1.2 Message-ID: <200710112034.l9BKYTvI025805@cvs-int.fedora.redhat.com> Author: jmagne Update of /cvs/dirsec/esc/mac In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25787 Modified Files: mac-build.sh Log Message: Bump up the version numbers. Index: mac-build.sh =================================================================== RCS file: /cvs/dirsec/esc/mac/mac-build.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- mac-build.sh 2 Aug 2007 18:22:20 -0000 1.1 +++ mac-build.sh 11 Oct 2007 20:34:26 -0000 1.2 @@ -42,12 +42,12 @@ IFD_EGATE_NAME=ifd-egate-0.05 IFD_EGATE_REL=15 -COOLKEY_PKG_NAME=SmartCardManager1.14.pkg +COOLKEY_PKG_NAME=SmartCardManager1.15.pkg COOLKEY_VOL_NAME=SMARTCARDMANAGER COOLKEY_TAG=HEAD -ESC_VERSION=1.0.1-4 +ESC_VERSION=1.1.0-0 COOLKEY_DMG_NAME=SmartCardManager-$ESC_VERSION.OSX4.darwin.dmg From fedora-directory-commits at redhat.com Fri Oct 12 00:10:34 2007 From: fedora-directory-commits at redhat.com (Jack Magne (jmagne)) Date: Thu, 11 Oct 2007 20:10:34 -0400 Subject: [Fedora-directory-commits] esc/win32 build.sh,1.2,1.3 Message-ID: <200710120010.l9C0AY9Q028942@cvs-int.fedora.redhat.com> Author: jmagne Update of /cvs/dirsec/esc/win32 In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28915 Modified Files: build.sh Log Message: Bump up version strings. Index: build.sh =================================================================== RCS file: /cvs/dirsec/esc/win32/build.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- build.sh 25 Jul 2007 23:12:15 -0000 1.2 +++ build.sh 12 Oct 2007 00:10:32 -0000 1.3 @@ -57,7 +57,7 @@ #CoolKey values COOLKEY_NAME=coolkey -COOLKEY_TAG=COOLKEY_1_1_0 +COOLKEY_TAG=HEAD #Fedora repo for CoolKey and ESC @@ -76,7 +76,7 @@ #ESC values ESC_NAME=esc -ESC_VERSION_NO=1.0.1-5 +ESC_VERSION_NO=1.1.0-0 #Cygwin values From fedora-directory-commits at redhat.com Fri Oct 12 16:53:05 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 12 Oct 2007 12:53:05 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/views views.c, 1.9, 1.10 Message-ID: <200710121653.l9CGr5RF011933@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/views In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11904/ldapserver/ldap/servers/plugins/views Modified Files: views.c Log Message: Resolves: bug 288291 Bug Description: add an view object inside a view object that has an improper nsviewfilter crashes the server Reviewed by: nhosoi (Thanks!) Fix Description: I could not reproduce the problem by simply adding the bogus nsviewfilter. The server seemed to run fine, but I didn't stress it. However, if I restarted the server, the server would core during startup. The last message in the error log would say something about recovering the database, which is probably why the bug reporter said that it will not recover the database. The problem doesn't appear to be with views specifically, but with any internal search which uses the search_internal_callback_pb() (as opposed to the non callback internal search) and there are search base rewriters (such as the views code). The aci code uses this type of search at startup to find the acis, and that's where I saw the crash. I could crash the server at startup regardless of whether the view filter was bogus or not. The problem is that we are not passing in the address of new_base to slapi_ch_free. The fix is to use slapi_ch_free_string and pass in the address of the st! ring. That fixes the crash. I also cleaned up a few places in the views code which was not checking to see if slapi_str2filter returned NULL, which would happen in the case of the bogus search filter. I also added an error message which will tell the user that filter X in entry Y is bogus. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no Index: views.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/views/views.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- views.c 10 Nov 2006 23:45:33 -0000 1.9 +++ views.c 12 Oct 2007 16:53:02 -0000 1.10 @@ -764,6 +764,12 @@ buf = slapi_ch_strdup(current->viewfilter); pCurrentFilter = slapi_str2filter( buf ); + if (!pCurrentFilter) { + char ebuf[BUFSIZ]; + slapi_log_error(SLAPI_LOG_FATAL, VIEWS_PLUGIN_SUBSYSTEM, + "Error: the view filter [%s] in entry [%s] is not valid\n", + buf, escape_string(current->pDn, ebuf)); + } if(pBuiltFilter && pCurrentFilter) pBuiltFilter = slapi_filter_join_ex( LDAP_FILTER_AND, pBuiltFilter, pCurrentFilter, 0 ); else @@ -935,7 +941,13 @@ if(buf) { pCurrentFilter = slapi_str2filter( buf ); - if(pOrSubFilter) + if (!pCurrentFilter) { + char ebuf[BUFSIZ]; + slapi_log_error(SLAPI_LOG_FATAL, VIEWS_PLUGIN_SUBSYSTEM, + "Error: the view filter [%s] in entry [%s] is not valid\n", + buf, escape_string(currentChild->pDn, ebuf)); + } + if(pOrSubFilter && pCurrentFilter) pOrSubFilter = slapi_filter_join_ex( LDAP_FILTER_OR, pOrSubFilter, pCurrentFilter, 0 ); else pOrSubFilter = pCurrentFilter; @@ -994,8 +1006,14 @@ buf = slapi_ch_calloc(1, strlen(viewRDNstr) + 11 ); /* 3 for filter */ sprintf(buf, "(%s)", viewRDNstr ); viewSubFilter = slapi_str2filter( buf ); - - if(pView->includeChildViewsFilter) + if (!viewSubFilter) { + char ebuf[BUFSIZ]; + slapi_log_error(SLAPI_LOG_FATAL, VIEWS_PLUGIN_SUBSYSTEM, + "Error: the view filter [%s] in entry [%s] is not valid\n", + buf, escape_string(current->pDn, ebuf)); + } + + if(pView->includeChildViewsFilter && viewSubFilter) pView->includeChildViewsFilter = slapi_filter_join_ex( LDAP_FILTER_OR, pView->includeChildViewsFilter, viewSubFilter, 0 ); else pView->includeChildViewsFilter = viewSubFilter; From fedora-directory-commits at redhat.com Fri Oct 12 16:53:05 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 12 Oct 2007 12:53:05 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd plugin_internal_op.c, 1.7, 1.8 Message-ID: <200710121653.l9CGr50F011939@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11904/ldapserver/ldap/servers/slapd Modified Files: plugin_internal_op.c Log Message: Resolves: bug 288291 Bug Description: add an view object inside a view object that has an improper nsviewfilter crashes the server Reviewed by: nhosoi (Thanks!) Fix Description: I could not reproduce the problem by simply adding the bogus nsviewfilter. The server seemed to run fine, but I didn't stress it. However, if I restarted the server, the server would core during startup. The last message in the error log would say something about recovering the database, which is probably why the bug reporter said that it will not recover the database. The problem doesn't appear to be with views specifically, but with any internal search which uses the search_internal_callback_pb() (as opposed to the non callback internal search) and there are search base rewriters (such as the views code). The aci code uses this type of search at startup to find the acis, and that's where I saw the crash. I could crash the server at startup regardless of whether the view filter was bogus or not. The problem is that we are not passing in the address of new_base to slapi_ch_free. The fix is to use slapi_ch_free_string and pass in the address of the st! ring. That fixes the crash. I also cleaned up a few places in the views code which was not checking to see if slapi_str2filter returned NULL, which would happen in the case of the bogus search filter. I also added an error message which will tell the user that filter X in entry Y is bogus. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no Index: plugin_internal_op.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/plugin_internal_op.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- plugin_internal_op.c 10 Nov 2006 23:45:40 -0000 1.7 +++ plugin_internal_op.c 12 Oct 2007 16:53:03 -0000 1.8 @@ -768,7 +768,7 @@ } if(original_base != new_base) - slapi_ch_free((void**)new_base); + slapi_ch_free_string(&new_base); /* we strdup'd this above - need to free */ slapi_pblock_get(pb, SLAPI_ORIGINAL_TARGET_DN, &original_base); From fedora-directory-commits at redhat.com Fri Oct 12 17:22:56 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Fri, 12 Oct 2007 13:22:56 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication cl5_api.c, 1.16, 1.17 repl5_replica_config.c, 1.7, 1.8 Message-ID: <200710121722.l9CHMuAC018738@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18707 Modified Files: cl5_api.c repl5_replica_config.c Log Message: Resolves: 238630 Summary: Remove changelog db file when replica config is removed. Index: cl5_api.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/cl5_api.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- cl5_api.c 24 Sep 2007 23:39:22 -0000 1.16 +++ cl5_api.c 12 Oct 2007 17:22:54 -0000 1.17 @@ -6391,20 +6391,24 @@ _cl5WriteRUV (file, PR_FALSE); } - /* close file */ + /* close the db */ if (file->db) file->db->close(file->db, 0); if (file->flags & DB_FILE_DELETED) - { - PR_snprintf(fullpathname, MAXPATHLEN, "%s/%s", s_cl5Desc.dbDir, file->name); - if (PR_Delete(fullpathname) != PR_SUCCESS) + { + int rc = 0; + /* We need to use the libdb API to delete the files, otherwise we'll + * run into problems when we try to checkpoint transactions later. */ + PR_snprintf(fullpathname, MAXPATHLEN, "%s/%s", s_cl5Desc.dbDir, file->name); + rc = s_cl5Desc.dbEnv->dbremove(s_cl5Desc.dbEnv, 0, fullpathname, 0, 0); + if (rc != 0) { - slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBCloseFile: " - "failed to remove (%s) file; NSPR error - %d\n", file->name, PR_GetError ()); - - } - } + slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBCloseFile: " + "failed to remove (%s) file; libdb error - %d (%s)\n", file->name, + rc, dblayer_strerror(rc)); + } + } /* slapi_ch_free accepts NULL pointer */ slapi_ch_free ((void**)&file->name); Index: repl5_replica_config.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_replica_config.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- repl5_replica_config.c 10 Nov 2006 23:45:17 -0000 1.7 +++ repl5_replica_config.c 12 Oct 2007 17:22:54 -0000 1.8 @@ -460,9 +460,17 @@ if (mtnode_ext->replica) { + char ebuf[BUFSIZ]; + /* remove object from the hash */ r = (Replica*)object_get_data (mtnode_ext->replica); PR_ASSERT (r); + /* The changelog for this replica is no longer valid, so we should remove it. */ + slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_delete: " + "Warning: The changelog for replica %s is no longer valid since " + "the replica config is being deleted. Removing the changelog.\n", + escape_string(slapi_sdn_get_dn(replica_get_root(r)),ebuf)); + cl5DeleteDBSync(mtnode_ext->replica); replica_delete_by_name (replica_get_name (r)); object_release (mtnode_ext->replica); mtnode_ext->replica = NULL; From fedora-directory-commits at redhat.com Fri Oct 12 18:03:44 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 12 Oct 2007 14:03:44 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd slap.h, 1.27, 1.28 slapi-private.h, 1.17, 1.18 vattr_spi.h, 1.5, 1.6 filterentry.c, 1.5, 1.6 vattr.c, 1.6, 1.7 Message-ID: <200710121803.l9CI3ijg027755@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27588/slapd Modified Files: slap.h slapi-private.h vattr_spi.h filterentry.c vattr.c Log Message: Resolves: #193724 Summary: "nested" filtered roles result in deadlock (Comment #12) Description: 1. Changed cache_lock to the read-write lock. 2. Instead of using the local vattr_context in vattr_test_filter, use the one set in pblock as much as possible. To achieve the goal, introduced pb_vattr_context to pblock. 3. Increased VATTR_LOOP_COUNT_MAX from 50 to 256. 4. When the loop count hit VATTR_LOOP_COUNT_MAX, it sets LDAP_UNWILLING_TO_PERFORM and returns it to the client. Index: slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slap.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- slap.h 2 Oct 2007 18:39:50 -0000 1.27 +++ slap.h 12 Oct 2007 18:03:42 -0000 1.28 @@ -1418,6 +1418,7 @@ /* For password policy control */ int pb_pwpolicy_ctrl; + void *pb_vattr_context; /* hold the vattr_context for roles/cos */ } slapi_pblock; /* The referral element */ Index: slapi-private.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-private.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- slapi-private.h 5 Oct 2007 23:31:07 -0000 1.17 +++ slapi-private.h 12 Oct 2007 18:03:42 -0000 1.18 @@ -475,7 +475,8 @@ void slapi_vattrcache_cache_all(); void slapi_vattrcache_cache_none(); -int vattr_test_filter(/* Entry we're interested in */ Slapi_Entry *e, +int vattr_test_filter( Slapi_PBlock *pb, + /* Entry we're interested in */ Slapi_Entry *e, Slapi_Filter *f, filter_type_t filter_type, char *type); Index: vattr_spi.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/vattr_spi.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- vattr_spi.h 10 Nov 2006 23:45:40 -0000 1.5 +++ vattr_spi.h 12 Oct 2007 18:03:42 -0000 1.6 @@ -88,4 +88,6 @@ int slapi_vattr_namespace_values_get_sp(vattr_context *c, /* Entry we're interested in */ Slapi_Entry *e, /* backend namespace dn */ Slapi_DN *namespace_dn, /* attr type name */ char *type, /* pointer to result set */ Slapi_ValueSet*** results,int **type_name_disposition, char ***actual_type_name, int flags, int *free_flags, int *subtype_count); int slapi_vattr_value_compare_sp(vattr_context *c, Slapi_Entry *e,char *type, Slapi_Value *test_this, int *result, int flags); int slapi_vattr_namespace_value_compare_sp(vattr_context *c,/* Entry we're interested in */ Slapi_Entry *e, /* backend namespace dn*/Slapi_DN *namespace_dn, /* attr type name */ const char *type, Slapi_Value *test_this,/* pointer to result */ int *result, int flags); +Slapi_PBlock *slapi_vattr_get_pblock_from_context( vattr_context *c ); + Index: filterentry.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/filterentry.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- filterentry.c 10 Nov 2006 23:45:40 -0000 1.5 +++ filterentry.c 12 Oct 2007 18:03:42 -0000 1.6 @@ -861,7 +861,7 @@ if ( only_check_access || rc != LDAP_SUCCESS ) { return( rc ); } - rc = vattr_test_filter( e, f, FILTER_TYPE_AVA, f->f_ava.ava_type ); + rc = vattr_test_filter( pb, e, f, FILTER_TYPE_AVA, f->f_ava.ava_type ); break; case LDAP_FILTER_SUBSTRINGS: @@ -873,7 +873,7 @@ if ( only_check_access || rc != LDAP_SUCCESS ) { return( rc ); } - rc = vattr_test_filter( e, f, FILTER_TYPE_SUBSTRING, f->f_sub_type); + rc = vattr_test_filter( pb, e, f, FILTER_TYPE_SUBSTRING, f->f_sub_type); break; case LDAP_FILTER_GE: @@ -886,7 +886,7 @@ if ( only_check_access || rc != LDAP_SUCCESS ) { return( rc ); } - rc = vattr_test_filter( e, f, FILTER_TYPE_AVA, f->f_ava.ava_type); + rc = vattr_test_filter( pb, e, f, FILTER_TYPE_AVA, f->f_ava.ava_type); break; case LDAP_FILTER_LE: @@ -899,7 +899,7 @@ if ( only_check_access || rc != LDAP_SUCCESS ) { return( rc ); } - rc = vattr_test_filter( e, f, FILTER_TYPE_AVA, f->f_ava.ava_type); + rc = vattr_test_filter( pb, e, f, FILTER_TYPE_AVA, f->f_ava.ava_type); break; case LDAP_FILTER_PRESENT: @@ -911,7 +911,7 @@ if ( only_check_access || rc != LDAP_SUCCESS ) { return( rc ); } - rc = vattr_test_filter( e, f, FILTER_TYPE_PRES, f->f_type); + rc = vattr_test_filter( pb, e, f, FILTER_TYPE_PRES, f->f_type); break; case LDAP_FILTER_APPROX: @@ -924,7 +924,7 @@ if ( only_check_access || rc != LDAP_SUCCESS ) { return( rc ); } - rc = vattr_test_filter( e, f, FILTER_TYPE_AVA, f->f_ava.ava_type); + rc = vattr_test_filter( pb, e, f, FILTER_TYPE_AVA, f->f_ava.ava_type); break; case LDAP_FILTER_EXTENDED: Index: vattr.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/vattr.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- vattr.c 10 Nov 2006 23:45:40 -0000 1.6 +++ vattr.c 12 Oct 2007 18:03:42 -0000 1.7 @@ -102,7 +102,7 @@ unsigned int vattr_context_loop_count; unsigned int error_displayed; }; -#define VATTR_LOOP_COUNT_MAX 50 +#define VATTR_LOOP_COUNT_MAX 256 typedef vattr_sp_handle vattr_sp_handle_list; @@ -300,11 +300,19 @@ vattr_context *vattr_context_new( Slapi_PBlock *pb ) { - vattr_context *c = (vattr_context *)slapi_ch_calloc(1, sizeof(vattr_context)); + vattr_context *c = NULL; + if (pb && pb->pb_vattr_context) { + c = (vattr_context *)pb->pb_vattr_context; + } else { + c = (vattr_context *)slapi_ch_calloc(1, sizeof(vattr_context)); + } /* The payload is zero, which is what we want */ if ( c ) { c->pb = pb; } + if ( pb && c != (vattr_context *)pb->pb_vattr_context ) { + pb->pb_vattr_context = (void *)c; + } return c; } @@ -333,15 +341,33 @@ /* Decrement the loop count */ if (0 == vattr_context_unmark(*c)) { /* If necessary, delete the structure */ + if ((*c)->pb) { + (*c)->pb->pb_vattr_context = NULL; + } slapi_ch_free((void **)c); } } +static int vattr_context_grok_pb( Slapi_PBlock *pb, vattr_context **c ) +{ + int rc = -1; + if (NULL == c) { + return rc; + } + *c = vattr_context_new( pb ); + if (NULL == *c) { + return ENOMEM; + } + rc = vattr_context_check(*c); + vattr_context_mark(*c); /* increment loop count */ + return rc; +} + /* Check and mess with the context structure on entry to a vattr sp function */ static int vattr_context_grok(vattr_context **c) { int rc = 0; - /* First check that we've not got into an infinite loop. + /* First check that we've not got into an infinite loop. We do so by means of the vattr_context structure. */ @@ -388,10 +414,12 @@ * >0 an ldap error code * */ -int vattr_test_filter( /* Entry we're interested in */ Slapi_Entry *e, +int vattr_test_filter( Slapi_PBlock *pb, + /* Entry we're interested in */ Slapi_Entry *e, Slapi_Filter *f, filter_type_t filter_type, - char * type) { + char * type) +{ int rc = -1; int sp_bit = 0; /* Set if an SP supplied an answer */ vattr_sp_handle_list *list = NULL; @@ -445,26 +473,23 @@ char **actual_type_name; int buffer_flags; vattr_get_thang my_get = {0}; - vattr_context ctx; /* bit cacky, but need to make a null terminated lists for now * for the (unimplemented and so fake) batch attribute request */ char *types[2]; void *hint_list[2]; + vattr_context *ctx; + vattr_context_grok_pb( pb, &ctx ); /* get or new context */ types[0] = type; types[1] = 0; hint_list[1] = 0; - /* set up some local context */ - ctx.vattr_context_loop_count=1; - ctx.error_displayed = 0; - for (current_handle = vattr_map_sp_first(list,&hint); current_handle; current_handle = vattr_map_sp_next(current_handle,&hint)) { hint_list[0] = hint; - rc = vattr_call_sp_get_batch_values(current_handle,&ctx,e, + rc = vattr_call_sp_get_batch_values(current_handle,ctx,e, &my_get,types,&results,&type_name_disposition, &actual_type_name,flags,&buffer_flags, hint_list); @@ -474,6 +499,7 @@ break; } } + vattr_context_ungrok(&ctx); if(!sp_bit) { @@ -483,7 +509,6 @@ * but first lets cache the no result */ slapi_entry_vattrcache_merge_sv(e, type, NULL ); - } else { @@ -491,7 +516,7 @@ * A vattr sp supplied an answer. * so turn the value into a Slapi_Attr, pass * to the syntax plugin for comparison. - */ + */ if ( filter_type == FILTER_TYPE_AVA || filter_type == FILTER_TYPE_SUBSTRING ) { @@ -566,14 +591,13 @@ slapi_ch_free((void**)&type_name_disposition); } } - break; - } + } }/* switch */ } /* If no SP supplied the answer, take it from the entry */ - if (!sp_bit) - { + if (rc <= 1 && !sp_bit) /* if LDAP ERROR is set, skip further testing */ + { int acl_test_done; if ( filter_type == FILTER_TYPE_AVA ) { @@ -597,7 +621,7 @@ 0 /* do test filter */, &acl_test_done); } - } + } return rc; } /* @@ -1690,7 +1714,7 @@ *actual_type_name = (char**)slapi_ch_calloc(2, sizeof(*actual_type_name)); ret =((handle->sp->sp_get_fn)(handle,c,e,*type,*results,*type_name_disposition,*actual_type_name,flags,buffer_flags, hint)); - if(ret) + if (ret) { slapi_ch_free((void**)results ); slapi_ch_free((void**)type_name_disposition ); @@ -2332,6 +2356,16 @@ PR_RWLock_Unlock(e->e_virtual_lock); } +Slapi_PBlock * +slapi_vattr_get_pblock_from_context(vattr_context *c) +{ + if (c) { + return c->pb; + } else { + return NULL; + } +} + #ifdef VATTR_TEST_CODE /* Prototype SP begins here */ From fedora-directory-commits at redhat.com Fri Oct 12 18:03:45 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 12 Oct 2007 14:03:45 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/roles roles_cache.c, 1.6, 1.7 roles_cache.h, 1.5, 1.6 roles_plugin.c, 1.7, 1.8 Message-ID: <200710121803.l9CI3jSL027768@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/roles In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27588/plugins/roles Modified Files: roles_cache.c roles_cache.h roles_plugin.c Log Message: Resolves: #193724 Summary: "nested" filtered roles result in deadlock (Comment #12) Description: 1. Changed cache_lock to the read-write lock. 2. Instead of using the local vattr_context in vattr_test_filter, use the one set in pblock as much as possible. To achieve the goal, introduced pb_vattr_context to pblock. 3. Increased VATTR_LOOP_COUNT_MAX from 50 to 256. 4. When the loop count hit VATTR_LOOP_COUNT_MAX, it sets LDAP_UNWILLING_TO_PERFORM and returns it to the client. Index: roles_cache.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/roles/roles_cache.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- roles_cache.c 10 Nov 2006 23:45:24 -0000 1.6 +++ roles_cache.c 12 Oct 2007 18:03:43 -0000 1.7 @@ -105,7 +105,7 @@ PRThread *roles_tid; int keeprunning; - Slapi_Mutex *cache_lock; + PRRWLock *cache_lock; Slapi_Mutex *stop_lock; Slapi_Mutex *change_lock; @@ -143,6 +143,7 @@ Slapi_Entry *requested_entry; /* entry to get nsrole from */ int has_value; /* flag to determine if a new value has been added to the result */ int need_value; /* flag to determine if we need the result */ + vattr_context *context; /* vattr context */ } roles_cache_build_result; /* Structure used to check if is_entry_member_of is part of a role defined in its suffix */ @@ -178,8 +179,9 @@ static int roles_cache_find_node( caddr_t d1, caddr_t d2 ); static int roles_cache_find_roles_in_suffix(Slapi_DN *target_entry_dn, roles_cache_def **list_of_roles); static int roles_is_entry_member_of_object(caddr_t data, caddr_t arg ); +static int roles_is_entry_member_of_object_ext(vattr_context *c, caddr_t data, caddr_t arg ); static int roles_check_managed(Slapi_Entry *entry_to_check, role_object *role, int *present); -static int roles_check_filtered(Slapi_Entry *entry_to_check, role_object *role, int *present); +static int roles_check_filtered(vattr_context *c, Slapi_Entry *entry_to_check, role_object *role, int *present); static int roles_check_nested(caddr_t data, caddr_t arg); static int roles_is_inscope(Slapi_Entry *entry_to_check, Slapi_DN *role_dn); static void berval_set_string(struct berval *bv, const char* string); @@ -303,7 +305,7 @@ return(NULL); } - new_suffix->cache_lock = slapi_new_mutex(); + new_suffix->cache_lock = PR_NewRWLock(PR_RWLOCK_RANK_NONE, "roles_def_lock"); new_suffix->change_lock = slapi_new_mutex(); new_suffix->stop_lock = slapi_new_mutex(); new_suffix->create_lock = slapi_new_mutex(); @@ -610,7 +612,7 @@ slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_update \n"); - slapi_lock_mutex(suffix_to_update->cache_lock); + PR_RWLock_Wlock(suffix_to_update->cache_lock); operation = suffix_to_update->notified_operation; entry = suffix_to_update->notified_entry; @@ -646,7 +648,7 @@ suffix_to_update->notified_entry = NULL; } - slapi_unlock_mutex(suffix_to_update->cache_lock); + PR_RWLock_Unlock(suffix_to_update->cache_lock); if ( dn != NULL ) { @@ -1426,6 +1428,11 @@ */ int roles_cache_listroles(Slapi_Entry *entry, int return_values, Slapi_ValueSet **valueset_out) { + return roles_cache_listroles_ext(NULL, entry, return_values, valueset_out); +} + +int roles_cache_listroles_ext(vattr_context *c, Slapi_Entry *entry, int return_values, Slapi_ValueSet **valueset_out) +{ roles_cache_def *roles_cache = NULL; int rc = 0; roles_cache_build_result arg; @@ -1464,13 +1471,14 @@ arg.need_value = return_values; arg.requested_entry = entry; arg.has_value = 0; + arg.context = c; /* XXX really need a mutex for this read operation ? */ - slapi_lock_mutex(roles_cache->cache_lock); + PR_RWLock_Rlock(roles_cache->cache_lock); avl_apply(roles_cache->avl_tree, (IFP)roles_cache_build_nsrole, &arg, -1, AVL_INORDER); - slapi_unlock_mutex(roles_cache->cache_lock); + PR_RWLock_Unlock(roles_cache->cache_lock); if( !arg.has_value ) { @@ -1507,53 +1515,59 @@ ------------------------ Traverse the tree containing roles definitions for a suffix and for each one of them, check wether the entry is a member of it or not - For ones which check out positive, we add their DN to the value - always return 0 to allow to trverse all the tree + For ones which check out positive, we add their DN to the value + always return 0 to allow to trverse all the tree */ static int roles_cache_build_nsrole( caddr_t data, caddr_t arg ) { Slapi_Value *value = NULL; roles_cache_build_result *result = (roles_cache_build_result*)arg; role_object *this_role = (role_object*)data; - roles_cache_search_in_nested get_nsrole; + roles_cache_search_in_nested get_nsrole; /* Return a value different from the stop flag to be able to go through all the tree */ - int rc = 0; + int rc = 0; + int tmprc = 0; - slapi_log_error(SLAPI_LOG_PLUGIN, - ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_build_nsrole: role %s\n", - (char*) slapi_sdn_get_ndn(this_role->dn)); + slapi_log_error(SLAPI_LOG_PLUGIN, + ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_build_nsrole: role %s\n", + (char*) slapi_sdn_get_ndn(this_role->dn)); value = slapi_value_new_string(""); - get_nsrole.is_entry_member_of = result->requested_entry; - get_nsrole.present = 0; - get_nsrole.hint = 0; + get_nsrole.is_entry_member_of = result->requested_entry; + get_nsrole.present = 0; + get_nsrole.hint = 0; - roles_is_entry_member_of_object((caddr_t)this_role, (caddr_t)&get_nsrole); + tmprc = roles_is_entry_member_of_object_ext(result->context, (caddr_t)this_role, (caddr_t)&get_nsrole); + if (SLAPI_VIRTUALATTRS_LOOP_DETECTED == tmprc) + { + /* all we want to detect and return is loop/stack overflow */ + rc = tmprc; + } /* If so, add its DN to the attribute */ if (get_nsrole.present) { result->has_value = 1; - if ( result->need_value ) - { - slapi_value_set_string(value,(char*) slapi_sdn_get_ndn(this_role->dn)); - slapi_valueset_add_value(*(result->nsrole_values),value); - } - else - { - /* we don't need the value but we already know there is one nsrole. - stop the traversal - */ - rc = -1; - } + if ( result->need_value ) + { + slapi_value_set_string(value,(char*) slapi_sdn_get_ndn(this_role->dn)); + slapi_valueset_add_value(*(result->nsrole_values),value); + } + else + { + /* we don't need the value but we already know there is one nsrole. + stop the traversal + */ + rc = -1; + } } slapi_value_free(&value); - slapi_log_error(SLAPI_LOG_PLUGIN, - ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_build_nsrole\n"); + slapi_log_error(SLAPI_LOG_PLUGIN, + ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_build_nsrole\n"); return rc; } @@ -1564,54 +1578,54 @@ Checks if an entry has a presented role, assuming that we've already verified that the role both exists and is in scope - return 0: no processing error - return -1: error + return 0: no processing error + return -1: error */ int roles_check(Slapi_Entry *entry_to_check, Slapi_DN *role_dn, int *present) { roles_cache_def *roles_cache = NULL; role_object *this_role = NULL; - roles_cache_search_in_nested get_nsrole; + roles_cache_search_in_nested get_nsrole; int rc = 0; - slapi_log_error(SLAPI_LOG_PLUGIN, - ROLES_PLUGIN_SUBSYSTEM, "--> roles_check\n"); + slapi_log_error(SLAPI_LOG_PLUGIN, + ROLES_PLUGIN_SUBSYSTEM, "--> roles_check\n"); - *present = 0; + *present = 0; - PR_RWLock_Rlock(global_lock); + PR_RWLock_Rlock(global_lock); if ( roles_cache_find_roles_in_suffix(slapi_entry_get_sdn(entry_to_check), &roles_cache) != 0 ) { - PR_RWLock_Unlock(global_lock); + PR_RWLock_Unlock(global_lock); return -1; } - PR_RWLock_Unlock(global_lock); + PR_RWLock_Unlock(global_lock); this_role = (role_object *)avl_find(roles_cache->avl_tree, role_dn, (IFP)roles_cache_find_node); - /* MAB: For some reason the assumption made by this function (the role exists and is in scope) - * does not seem to be true... this_role might be NULL after the avl_find call (is the avl_tree - * broken? Anyway, this is crashing the 5.1 server on 29-Aug-01, so I am applying the following patch - * to avoid the crash inside roles_is_entry_member_of_object */ - /* Begin patch */ - if (!this_role) { - /* Assume that the entry is not member of the role (*present=0) and leave... */ - return rc; - } - /* End patch */ + /* MAB: For some reason the assumption made by this function (the role exists and is in scope) + * does not seem to be true... this_role might be NULL after the avl_find call (is the avl_tree + * broken? Anyway, this is crashing the 5.1 server on 29-Aug-01, so I am applying the following patch + * to avoid the crash inside roles_is_entry_member_of_object */ + /* Begin patch */ + if (!this_role) { + /* Assume that the entry is not member of the role (*present=0) and leave... */ + return rc; + } + /* End patch */ - get_nsrole.is_entry_member_of = entry_to_check; - get_nsrole.present = 0; - get_nsrole.hint = 0; + get_nsrole.is_entry_member_of = entry_to_check; + get_nsrole.present = 0; + get_nsrole.hint = 0; roles_is_entry_member_of_object((caddr_t)this_role, (caddr_t)&get_nsrole); - *present = get_nsrole.present; + *present = get_nsrole.present; - slapi_log_error(SLAPI_LOG_PLUGIN, - ROLES_PLUGIN_SUBSYSTEM, "<-- roles_check\n"); + slapi_log_error(SLAPI_LOG_PLUGIN, + ROLES_PLUGIN_SUBSYSTEM, "<-- roles_check\n"); return rc; } @@ -1691,6 +1705,11 @@ */ static int roles_is_entry_member_of_object(caddr_t data, caddr_t argument ) { + return roles_is_entry_member_of_object_ext(NULL, data, argument ); +} + +static int roles_is_entry_member_of_object_ext(vattr_context *c, caddr_t data, caddr_t argument ) +{ int rc = -1; roles_cache_search_in_nested *get_nsrole = (roles_cache_search_in_nested*)argument; @@ -1717,7 +1736,7 @@ rc = roles_check_managed(entry_to_check,this_role,&get_nsrole->present); break; case ROLE_TYPE_FILTERED: - rc = roles_check_filtered(entry_to_check,this_role,&get_nsrole->present); + rc = roles_check_filtered(c, entry_to_check,this_role,&get_nsrole->present); break; case ROLE_TYPE_NESTED: { @@ -1789,13 +1808,14 @@ return 1: fail -> to check the presence, see present */ -static int roles_check_filtered(Slapi_Entry *entry_to_check, role_object *role, int *present) +static int roles_check_filtered(vattr_context *c, Slapi_Entry *entry_to_check, role_object *role, int *present) { int rc = 0; slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "--> roles_check_filtered\n"); - rc = slapi_filter_test_simple(entry_to_check,role->filter); + rc = slapi_vattr_filter_test_ext(slapi_vattr_get_pblock_from_context(c), + entry_to_check, role->filter, 0, 0); if ( rc == 0 ) { *present = 1; @@ -1991,7 +2011,7 @@ avl_free(role_def->avl_tree, (IFP)roles_cache_role_object_free); slapi_sdn_free(&(role_def->suffix_dn)); - slapi_destroy_mutex(role_def->cache_lock); + PR_DestroyRWLock(role_def->cache_lock); role_def->cache_lock = NULL; slapi_destroy_mutex(role_def->change_lock); role_def->change_lock = NULL; Index: roles_cache.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/roles/roles_cache.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- roles_cache.h 10 Nov 2006 23:45:24 -0000 1.5 +++ roles_cache.h 12 Oct 2007 18:03:43 -0000 1.6 @@ -73,6 +73,7 @@ void roles_cache_stop(); void roles_cache_change_notify(Slapi_PBlock *pb); int roles_cache_listroles(Slapi_Entry *entry, int return_value, Slapi_ValueSet **valueset_out); +int roles_cache_listroles_ext(vattr_context *c, Slapi_Entry *entry, int return_value, Slapi_ValueSet **valueset_out); int roles_check(Slapi_Entry *entry_to_check, Slapi_DN *role_dn, int *present); Index: roles_plugin.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/roles/roles_plugin.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- roles_plugin.c 8 Dec 2006 18:11:09 -0000 1.7 +++ roles_plugin.c 12 Oct 2007 18:03:43 -0000 1.8 @@ -248,7 +248,7 @@ { int rc = -1; - rc = roles_cache_listroles(e, 1, results); + rc = roles_cache_listroles_ext(c, e, 1, results); if (rc == 0) { *free_flags = SLAPI_VIRTUALATTRS_RETURNED_COPIES; From fedora-directory-commits at redhat.com Fri Oct 12 18:03:45 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 12 Oct 2007 14:03:45 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm ldbm_search.c, 1.11, 1.12 Message-ID: <200710121803.l9CI3jhO027761@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27588/slapd/back-ldbm Modified Files: ldbm_search.c Log Message: Resolves: #193724 Summary: "nested" filtered roles result in deadlock (Comment #12) Description: 1. Changed cache_lock to the read-write lock. 2. Instead of using the local vattr_context in vattr_test_filter, use the one set in pblock as much as possible. To achieve the goal, introduced pb_vattr_context to pblock. 3. Increased VATTR_LOOP_COUNT_MAX from 50 to 256. 4. When the loop count hit VATTR_LOOP_COUNT_MAX, it sets LDAP_UNWILLING_TO_PERFORM and returns it to the client. Index: ldbm_search.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_search.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- ldbm_search.c 27 Sep 2007 21:33:37 -0000 1.11 +++ ldbm_search.c 12 Oct 2007 18:03:42 -0000 1.12 @@ -48,14 +48,14 @@ /* prototypes */ static int build_candidate_list( Slapi_PBlock *pb, backend *be, - struct backentry *e, const char * base, int scope, - int *lookup_returned_allidsp, IDList** candidates); + struct backentry *e, const char * base, int scope, + int *lookup_returned_allidsp, IDList** candidates); static IDList *base_candidates( Slapi_PBlock *pb, struct backentry *e ); static IDList *onelevel_candidates( Slapi_PBlock *pb, backend *be, const char *base, struct backentry *e, Slapi_Filter *filter, int managedsait, int *lookup_returned_allidsp, int *err ); static back_search_result_set* new_search_result_set(IDList* idl,int vlv, int lookthroughlimit); static void delete_search_result_set( back_search_result_set **sr ); static int can_skip_filter_test( Slapi_PBlock *pb, struct slapi_filter *f, - int scope, IDList *idl ); + int scope, IDList *idl ); /* This is for performance testing, allows us to disable ACL checking altogether */ #if defined(DISABLE_ACL_CHECK) @@ -69,38 +69,38 @@ static int compute_lookthrough_limit( Slapi_PBlock *pb, struct ldbminfo *li ) { - Slapi_Connection *conn = NULL; - int limit; + Slapi_Connection *conn = NULL; + int limit; - slapi_pblock_get( pb, SLAPI_CONNECTION, &conn); + slapi_pblock_get( pb, SLAPI_CONNECTION, &conn); - if ( slapi_reslimit_get_integer_limit( conn, - li->li_reslimit_lookthrough_handle, &limit ) - != SLAPI_RESLIMIT_STATUS_SUCCESS ) { - /* - * no limit associated with binder/connection or some other error - * occurred. use the default. - */ - int isroot = 0; - - slapi_pblock_get( pb, SLAPI_REQUESTOR_ISROOT, &isroot ); - if (isroot) { - limit = -1; - } else { - PR_Lock(li->li_config_mutex); - limit = li->li_lookthroughlimit; - PR_Unlock(li->li_config_mutex); - } - } + if ( slapi_reslimit_get_integer_limit( conn, + li->li_reslimit_lookthrough_handle, &limit ) + != SLAPI_RESLIMIT_STATUS_SUCCESS ) { + /* + * no limit associated with binder/connection or some other error + * occurred. use the default. + */ + int isroot = 0; + + slapi_pblock_get( pb, SLAPI_REQUESTOR_ISROOT, &isroot ); + if (isroot) { + limit = -1; + } else { + PR_Lock(li->li_config_mutex); + limit = li->li_lookthroughlimit; + PR_Unlock(li->li_config_mutex); + } + } - return( limit ); + return( limit ); } /* don't free the berval, just clean it */ static void berval_done(struct berval *val) { - slapi_ch_free_string(&val->bv_val); + slapi_ch_free_string(&val->bv_val); } /* @@ -116,20 +116,20 @@ { slapi_send_ldap_result( pb, ldap_result, NULL, ldap_result_description, 0, NULL ); } - { - /* hack hack --- code to free the result set if we don't need it */ - /* We get it and check to see if the structure was ever used */ - back_search_result_set *sr = NULL; - slapi_pblock_get( pb, SLAPI_SEARCH_RESULT_SET, &sr ); - if ( (NULL != sr) && (function_result != 0) ) { - delete_search_result_set(&sr); - } - } - slapi_sdn_done(sdn); - if (vlv_request_control) - { - berval_done(&vlv_request_control->value); - } + { + /* hack hack --- code to free the result set if we don't need it */ + /* We get it and check to see if the structure was ever used */ + back_search_result_set *sr = NULL; + slapi_pblock_get( pb, SLAPI_SEARCH_RESULT_SET, &sr ); + if ( (NULL != sr) && (function_result != 0) ) { + delete_search_result_set(&sr); + } + } + slapi_sdn_done(sdn); + if (vlv_request_control) + { + berval_done(&vlv_request_control->value); + } return function_result; } @@ -630,8 +630,8 @@ */ static int build_candidate_list( Slapi_PBlock *pb, backend *be, struct backentry *e, - const char * base, int scope, int *lookup_returned_allidsp, - IDList** candidates) + const char * base, int scope, int *lookup_returned_allidsp, + IDList** candidates) { struct ldbminfo *li = (struct ldbminfo *) be->be_database->plg_private; int managedsait= 0; @@ -875,123 +875,123 @@ return( candidates ); } -static int grok_filter(struct slapi_filter *f); +static int grok_filter(struct slapi_filter *f); #if 0 /* Helper for grok_filter() */ static int -grok_filter_list(struct slapi_filter *flist) +grok_filter_list(struct slapi_filter *flist) { - struct slapi_filter *f; + struct slapi_filter *f; - /* Scan the clauses of the AND filter, if any of them fails the grok, then we fail */ - for ( f = flist; f != NULL; f = f->f_next ) { - if ( !grok_filter(f) ) { - return( 0 ); - } - } - return( 1 ); + /* Scan the clauses of the AND filter, if any of them fails the grok, then we fail */ + for ( f = flist; f != NULL; f = f->f_next ) { + if ( !grok_filter(f) ) { + return( 0 ); + } + } + return( 1 ); } #endif /* Helper function for can_skip_filter_test() */ -static int grok_filter(struct slapi_filter *f) +static int grok_filter(struct slapi_filter *f) { - switch ( f->f_choice ) { - case LDAP_FILTER_EQUALITY: - return 1; /* If there's an ID list and an equality filter, we can skip the filter test */ - case LDAP_FILTER_SUBSTRINGS: - return 0; - - case LDAP_FILTER_GE: - return 1; - - case LDAP_FILTER_LE: - return 1; - - case LDAP_FILTER_PRESENT: - return 1; /* If there's an ID list, and a presence filter, we can skip the filter test */ - - case LDAP_FILTER_APPROX: - return 0; - - case LDAP_FILTER_EXTENDED: - return 0; - - case LDAP_FILTER_AND: - return 0; /* Unless we check to see whether the presence and equality branches - of the search filter were all indexed, we get things wrong here, - so let's punt for now */ - /* return grok_filter_list(f->f_and); AND clauses are potentially OK */ - - case LDAP_FILTER_OR: - return 0; - - case LDAP_FILTER_NOT: - return 0; - - default: - return 0; - } + switch ( f->f_choice ) { + case LDAP_FILTER_EQUALITY: + return 1; /* If there's an ID list and an equality filter, we can skip the filter test */ + case LDAP_FILTER_SUBSTRINGS: + return 0; + + case LDAP_FILTER_GE: + return 1; + + case LDAP_FILTER_LE: + return 1; + + case LDAP_FILTER_PRESENT: + return 1; /* If there's an ID list, and a presence filter, we can skip the filter test */ + + case LDAP_FILTER_APPROX: + return 0; + + case LDAP_FILTER_EXTENDED: + return 0; + + case LDAP_FILTER_AND: + return 0; /* Unless we check to see whether the presence and equality branches + of the search filter were all indexed, we get things wrong here, + so let's punt for now */ + /* return grok_filter_list(f->f_and); AND clauses are potentially OK */ + + case LDAP_FILTER_OR: + return 0; + + case LDAP_FILTER_NOT: + return 0; + + default: + return 0; + } } /* Routine which says whether or not the indices produced a "correct" answer */ static int can_skip_filter_test( - Slapi_PBlock *pb, - struct slapi_filter *f, - int scope, - IDList *idl + Slapi_PBlock *pb, + struct slapi_filter *f, + int scope, + IDList *idl ) { - int rc = 0; + int rc = 0; + + /* Is the ID list ALLIDS ? */ + if ( ALLIDS(idl)) { + /* If so, then can't optimize */ + return rc; + } + + /* Is this a base scope search? */ + if ( scope == LDAP_SCOPE_BASE ) { + /* + * If so, then we can't optimize. Why not? Because we only consult + * the entrydn index in producing our 1 candidate, and that means + * we have not used the filter to produce the candidate list. + */ + return rc; + } - /* Is the ID list ALLIDS ? */ - if ( ALLIDS(idl)) { - /* If so, then can't optimize */ - return rc; - } - - /* Is this a base scope search? */ - if ( scope == LDAP_SCOPE_BASE ) { - /* - * If so, then we can't optimize. Why not? Because we only consult - * the entrydn index in producing our 1 candidate, and that means - * we have not used the filter to produce the candidate list. - */ - return rc; - } - - /* Grok the filter and tell me if it has only equality components in it */ - rc = grok_filter(f); - - /* If we haven't determined that we can't skip the filter test already, - * do one last check for attribute subtypes. We don't need to worry - * about any complex filters here since grok_filter() will have already - * assumed that we can't skip the filter test in those cases. */ - if (rc != 0) { - char *type = NULL; - char *basetype = NULL; - - /* We don't need to free type since that's taken - * care of when the filter is free'd later. We - * do need to free basetype when we are done. */ - slapi_filter_get_attribute_type(f, &type); - basetype = slapi_attr_basetype(type, NULL, 0); - - /* Is the filter using an attribute subtype? */ - if (strcasecmp(type, basetype) != 0) { - /* If so, we can't optimize since attribute subtypes - * are simply indexed under their basetype attribute. - * The basetype index has no knowledge of the subtype - * itself. In the future, we should add support for - * indexing the subtypes so we can optimize this type - * of search. */ - rc = 0; - } - slapi_ch_free_string(&basetype); - } + /* Grok the filter and tell me if it has only equality components in it */ + rc = grok_filter(f); - return rc; + /* If we haven't determined that we can't skip the filter test already, + * do one last check for attribute subtypes. We don't need to worry + * about any complex filters here since grok_filter() will have already + * assumed that we can't skip the filter test in those cases. */ + if (rc != 0) { + char *type = NULL; + char *basetype = NULL; + + /* We don't need to free type since that's taken + * care of when the filter is free'd later. We + * do need to free basetype when we are done. */ + slapi_filter_get_attribute_type(f, &type); + basetype = slapi_attr_basetype(type, NULL, 0); + + /* Is the filter using an attribute subtype? */ + if (strcasecmp(type, basetype) != 0) { + /* If so, we can't optimize since attribute subtypes + * are simply indexed under their basetype attribute. + * The basetype index has no knowledge of the subtype + * itself. In the future, we should add support for + * indexing the subtypes so we can optimize this type + * of search. */ + rc = 0; + } + slapi_ch_free_string(&basetype); + } + + return rc; } @@ -1014,24 +1014,25 @@ int ldbm_back_next_search_entry_ext( Slapi_PBlock *pb, int use_extension ) { - backend *be; - ldbm_instance *inst; + backend *be; + ldbm_instance *inst; struct ldbminfo *li; - int scope; - int managedsait; - Slapi_Attr *attr; - Slapi_Filter *filter; - char *base; - back_search_result_set *sr; - ID id; - struct backentry *e; - int nentries; - time_t curtime, stoptime, optime; - int tlimit, llimit, slimit, isroot; - struct berval **urls = NULL; - int err; - Slapi_DN basesdn; - char *target_uniqueid; + int scope; + int managedsait; + Slapi_Attr *attr; + Slapi_Filter *filter; + char *base; + back_search_result_set *sr; + ID id; + struct backentry *e; + int nentries; + time_t curtime, stoptime, optime; + int tlimit, llimit, slimit, isroot; + struct berval **urls = NULL; + int err; + Slapi_DN basesdn; + char *target_uniqueid; + int rc = 0; slapi_pblock_get( pb, SLAPI_BACKEND, &be ); slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li ); @@ -1083,8 +1084,8 @@ slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY_EXT, NULL ); } slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY, NULL ); - slapi_sdn_done(&basesdn); - return -1; + rc = SLAPI_FAIL_GENERAL; + goto bail; } /* check time limit */ @@ -1097,8 +1098,8 @@ slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY_EXT, NULL ); } slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY, NULL ); - slapi_sdn_done(&basesdn); - return -1; + rc = SLAPI_FAIL_GENERAL; + goto bail; } /* check lookthrough limit */ @@ -1110,8 +1111,8 @@ slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY_EXT, NULL ); } slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY, NULL ); - slapi_sdn_done(&basesdn); - return -1; + rc = SLAPI_FAIL_GENERAL; + goto bail; } /* get the entry */ @@ -1124,8 +1125,8 @@ slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY_EXT, NULL ); } slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY, NULL ); - slapi_sdn_done(&basesdn); - return 0; + rc = 0; + goto bail; } ++sr->sr_lookthroughcount; /* checked above */ @@ -1142,8 +1143,8 @@ * is gonna be traumatic. unavoidable. */ slapi_send_ldap_result(pb, LDAP_OPERATIONS_ERROR, NULL, NULL, 0, NULL); - slapi_sdn_done(&basesdn); - return return_on_disk_full(li); + rc = return_on_disk_full(li); + goto bail; } } LDAPDebug( LDAP_DEBUG_ARGS, "candidate %lu not found\n", (u_long)id, 0, 0 ); @@ -1182,8 +1183,8 @@ slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY_EXT, e ); } slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY, e->ep_entry ); - slapi_sdn_done(&basesdn); - return 0; + rc = 0; + goto bail; } } else @@ -1253,8 +1254,8 @@ cache_return( &inst->inst_cache, &e ); delete_search_result_set( &sr ); slapi_send_ldap_result( pb, LDAP_SIZELIMIT_EXCEEDED, NULL, NULL, nentries, urls ); - slapi_sdn_done(&basesdn); - return -1; + rc = SLAPI_FAIL_GENERAL; + goto bail; } slapi_pblock_set( pb, SLAPI_SEARCH_SIZELIMIT, &slimit ); } @@ -1277,8 +1278,8 @@ } slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY, e->ep_entry ); } - slapi_sdn_done(&basesdn); - return 0; + rc = 0; + goto bail; } else { @@ -1289,11 +1290,19 @@ { /* Failed the filter test, and this isn't a VLV Search */ cache_return( &inst->inst_cache, &(sr->sr_entry) ); + if (LDAP_UNWILLING_TO_PERFORM == filter_test) { + /* Need to catch this error to detect the vattr loop */ + slapi_send_ldap_result( pb, filter_test, NULL, + "Failed the filter test", 0, NULL ); + rc = SLAPI_FAIL_GENERAL; + goto bail; + } } } } - /*NOTREACHED*/ +bail: slapi_sdn_done(&basesdn); + return rc; } @@ -1333,19 +1342,19 @@ ldbm_instance *inst; if ( backend_info_ptr == NULL ) - return 1; + return 1; slapi_pblock_get( pb, SLAPI_BACKEND, &be ); - inst = (ldbm_instance *) be->be_instance_info; + inst = (ldbm_instance *) be->be_instance_info; cache_return( &inst->inst_cache, (struct backentry **)&backend_info_ptr ); if( ((struct backentry *) backend_info_ptr)->ep_vlventry != NULL ) { - /* This entry was created during a vlv search whose acl check failed. It needs to be - * freed here */ + /* This entry was created during a vlv search whose acl check failed. It needs to be + * freed here */ slapi_entry_free( ((struct backentry *) backend_info_ptr)->ep_vlventry ); - ((struct backentry *) backend_info_ptr)->ep_vlventry = NULL; + ((struct backentry *) backend_info_ptr)->ep_vlventry = NULL; } return 0; } From fedora-directory-commits at redhat.com Fri Oct 12 18:03:45 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 12 Oct 2007 14:03:45 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/cos cos_cache.c, 1.7, 1.8 Message-ID: <200710121803.l9CI3jg9027775@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/cos In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27588/plugins/cos Modified Files: cos_cache.c Log Message: Resolves: #193724 Summary: "nested" filtered roles result in deadlock (Comment #12) Description: 1. Changed cache_lock to the read-write lock. 2. Instead of using the local vattr_context in vattr_test_filter, use the one set in pblock as much as possible. To achieve the goal, introduced pb_vattr_context to pblock. 3. Increased VATTR_LOOP_COUNT_MAX from 50 to 256. 4. When the loop count hit VATTR_LOOP_COUNT_MAX, it sets LDAP_UNWILLING_TO_PERFORM and returns it to the client. Index: cos_cache.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/cos/cos_cache.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- cos_cache.c 10 Nov 2006 23:44:56 -0000 1.7 +++ cos_cache.c 12 Oct 2007 18:03:43 -0000 1.8 @@ -2222,6 +2222,7 @@ returns 0 on success, we added a computed attribute 1 on outright failure + > LDAP ERROR CODE -1 when doesn't know about attribute {PARPAR} must also check the attribute does not exist if we are not @@ -2392,10 +2393,14 @@ int free_flags = 0; if(pSpec && pSpec->val) { - slapi_vattr_values_get_sp(context, e, pSpec->val, &pAttrSpecs, &type_name_disposition, &actual_type_name, 0, &free_flags); + ret = slapi_vattr_values_get_sp(context, e, pSpec->val, &pAttrSpecs, &type_name_disposition, &actual_type_name, 0, &free_flags); /* MAB: We need to free actual_type_name here !!! XXX BAD--should use slapi_vattr_values_free() */ slapi_ch_free((void **) &actual_type_name); + if (SLAPI_VIRTUALATTRS_LOOP_DETECTED == ret) { + ret = LDAP_UNWILLING_TO_PERFORM; + goto bail; + } } if(pAttrSpecs || pDef->cosType == COSTYPE_POINTER) @@ -2548,6 +2553,8 @@ ret = 1; else if(hit == 1) ret = 0; + else + ret = -1; if(props) *props = 0; From fedora-directory-commits at redhat.com Sat Oct 13 01:47:17 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 12 Oct 2007 21:47:17 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd uuid.c, 1.9, 1.10 Message-ID: <200710130147.l9D1lHQh028148@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28130/ldapserver/ldap/servers/slapd Modified Files: uuid.c Log Message: Resolves: bug 330121 Bug Description: uuid generator truncates clock_seq_hi_and_reserved field Reviewed by: nkinder (Thanks!) Fix Description: The uuid code has this code (where clock_seq is unsigned16 - 2 bytes and uuid->clock_seq_hi_and_reserved is unsigned8 - 1 byte): uuid->clock_seq_hi_and_reserved = (unsigned8)(clock_seq & 0x3F00) >> 8; In this code, the cast to unsigned8 takes precedence over over the shift. So what happens is that (clock_seq & 0x3F00) is first cast to an 8 bit quantity, then shifted by 8 bits. The result is that the value is _always 0_. The code also does this: uuid->clock_seq_hi_and_reserved |= 0x80; You can see this because every nsUniqueID looks like this: XXXXXXXX-XXXXXXXX-80XXXXXXXX-XXXXXXXX The first byte of the 3rd octet is always 80. This may also be related to https://bugzilla.redhat.com/show_bug.cgi?id=197886 and may explain why the sequence numbers were exhausted so quickly. Without this fix, we only have 256 sequence numbers available. This fix adds another 6 bits. The fix is to mask and shift as an unsigned16 quantity, then cast to unsigned8. Platforms tested: RHEL5 x86_64 Flag Day: no - I think this will only impact new unique IDs that are generated. It will not affect existing unique IDs. Doc impact: no Index: uuid.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/uuid.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- uuid.c 24 Sep 2007 22:54:55 -0000 1.9 +++ uuid.c 13 Oct 2007 01:47:15 -0000 1.10 @@ -842,7 +842,7 @@ ((timestamp >> 48) & 0x0FFF); uuid->time_hi_and_version |= (1 << 12); uuid->clock_seq_low = clock_seq & 0xFF; - uuid->clock_seq_hi_and_reserved = (unsigned8)(clock_seq & 0x3F00) >> 8; + uuid->clock_seq_hi_and_reserved = (unsigned8)((clock_seq & 0x3F00) >> 8); uuid->clock_seq_hi_and_reserved |= 0x80; memcpy(&uuid->node, &_state.genstate.node, sizeof (uuid->node)); } From fedora-directory-commits at redhat.com Sat Oct 13 01:49:35 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 12 Oct 2007 21:49:35 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm ldif2ldbm.c, 1.14, 1.15 Message-ID: <200710130149.l9D1nZCv028222@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28205/ldapserver/ldap/servers/slapd/back-ldbm Modified Files: ldif2ldbm.c Log Message: Resolves: bug 330141 Bug Description: uuid generator not initialized by import from command line Reviewed by: nkinder (Thanks!) Fix Description: The unique ID generator is not initialized if import is run from the command line. The bad effect of this is that the clock sequence and node fields are all zeros. This could lead to duplicate unique IDs being assigned by two different servers. What happens is that the uuid values all look like this: XXXXXXXX-XXXXXXXX-80000000-00000000 So the time based part is generally ok, but the clock seq and node ID part are never initialized, hence 0's for those fields. The fix is to initialize the unique id generator in the same manner as we do for the server when it starts up in regular mode, except that we tell the generator to use the single threaded (st) mode rather than the multi threaded (mt) mode. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no Index: ldif2ldbm.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldif2ldbm.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- ldif2ldbm.c 24 Sep 2007 18:27:15 -0000 1.14 +++ ldif2ldbm.c 13 Oct 2007 01:49:32 -0000 1.15 @@ -569,6 +569,18 @@ slapi_pblock_get(pb, SLAPI_TASK_FLAGS, &task_flags); if (task_flags & TASK_RUNNING_FROM_COMMANDLINE) { + /* initialize UniqueID generator - must be done once backends are started + and event queue is initialized but before plugins are started */ + Slapi_DN *sdn = slapi_sdn_new_dn_byval ("cn=uniqueid generator,cn=config"); + int rc = uniqueIDGenInit (NULL, sdn, 0 /* use single thread mode */); + slapi_sdn_free (&sdn); + if (rc != UID_SUCCESS) { + LDAPDebug( LDAP_DEBUG_ANY, + "Fatal Error---Failed to initialize uniqueid generator; error = %d. " + "Exiting now.\n", rc, 0, 0 ); + return -1; + } + li->li_flags |= TASK_RUNNING_FROM_COMMANDLINE; ldbm_config_load_dse_info(li); autosize_import_cache(li); From fedora-directory-commits at redhat.com Mon Oct 15 19:19:35 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Mon, 15 Oct 2007 15:19:35 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/snmp main.c, 1.11, 1.12 Message-ID: <200710151919.l9FJJZI0028745@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/snmp In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28340 Modified Files: main.c Log Message: Resolves: 328741 Summary: Ensure that we NULL terminate strings properly when processing config file settings. Index: main.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/main.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- main.c 8 Aug 2007 16:50:00 -0000 1.11 +++ main.c 15 Oct 2007 19:19:32 -0000 1.12 @@ -264,6 +264,10 @@ if ((pidfile = malloc((p - conf_path) + strlen(LDAP_AGENT_PIDFILE) + 2)) != NULL) { strncpy(pidfile, conf_path, (p - conf_path + 1)); + /* The above will likely not be NULL terminated, but we need to + * be sure that we're properly NULL terminated for the below + * strcat() to work properly. */ + pidfile[(p - conf_path + 2)] = (char)0; strcat(pidfile, LDAP_AGENT_PIDFILE); pidfile[((p - conf_path) + strlen(LDAP_AGENT_PIDFILE) + 1)] = (char)0; } else { From fedora-directory-commits at redhat.com Tue Oct 16 00:05:33 2007 From: fedora-directory-commits at redhat.com (Jack Magne (jmagne)) Date: Mon, 15 Oct 2007 20:05:33 -0400 Subject: [Fedora-directory-commits] coolkey/src/coolkey slot.cpp, 1.8, 1.9 slot.h, 1.1, 1.2 Message-ID: <200710160005.l9G05Xk0015091@cvs-int.fedora.redhat.com> Author: jmagne Update of /cvs/dirsec/coolkey/src/coolkey In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15061 Modified Files: slot.cpp slot.h Log Message: Address Gemalto USBKey 64K detection issues. Bug #285441, r. rrelyea. Index: slot.cpp =================================================================== RCS file: /cvs/dirsec/coolkey/src/coolkey/slot.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- slot.cpp 25 Jul 2007 23:49:56 -0000 1.8 +++ slot.cpp 16 Oct 2007 00:05:31 -0000 1.9 @@ -205,6 +205,29 @@ return FALSE; } +bool +SlotList::readerNameExistsInList(const char *readerName,CKYReaderNameList *readerNameList) +{ + if( !readerName || !readerNameList) { + return FALSE; + } + + int i = 0; + int readerNameCnt = CKYReaderNameList_GetCount(*readerNameList); + + const char *curReaderName = NULL; + for(i=0; i < readerNameCnt; i++) { + curReaderName = CKYReaderNameList_GetValue(*readerNameList,i); + + if(!strcmp(curReaderName,readerName)) { + return TRUE; + } + + } + + return FALSE; +} + /* * you need to hold the ReaderList Lock before you can update the ReaderList */ @@ -258,6 +281,27 @@ * don't recognize. */ + /* first though, let's check to see if any previously removed readers have + * come back from the dead. If the ignored bit has been set, we do not need + * it any more. + */ + + const char *curReaderName = NULL; + unsigned long knownState = 0; + for(int ri = 0 ; ri < numReaders; ri ++) { + + knownState = CKYReader_GetKnownState(&readerStates[ri]); + if( !(knownState & SCARD_STATE_IGNORE)) { + continue; + } + + curReaderName = CKYReader_GetReaderName(&readerStates[ri]); + if(readerNameExistsInList(curReaderName,&readerNames)) { + CKYReader_SetKnownState(&readerStates[ri], knownState & ~SCARD_STATE_IGNORE); + + } + } + const char *newReadersData[MAX_READER_DELTA]; const char **newReaders = &newReadersData[0]; unsigned int newReaderCount = 0; @@ -539,13 +583,31 @@ // try to connect to the card if( ! CKYCardConnection_IsConnected(conn) ) { - status = CKYCardConnection_Connect(conn, readerName); - if( status != CKYSUCCESS ) { - log->log("Unable to connect to token\n"); + int i = 0; + //for cranky readers try again a few more times + while( i++ < 5 && status != CKYSUCCESS ) + { + status = CKYCardConnection_Connect(conn, readerName); + if( status != CKYSUCCESS && + CKYCardConnection_GetLastError(conn) == SCARD_E_PROTO_MISMATCH ) + { + log->log("Unable to connect to token status %d ConnGetGetLastError %x .\n",status,CKYCardConnection_GetLastError(conn)); + + } + else + { + break; + } + OSSleep(100000); + } + + if( status != CKYSUCCESS) + { state = UNKNOWN; return; } } + log->log("time connect: Connect Time %d ms\n", OSTimeNow() - time); if (!slotInfoFound) { readSlotInfo(); @@ -1074,6 +1136,7 @@ } throw; } + if (myNumReaders != numReaders) { if (myReaderStates) { delete [] myReaderStates; @@ -1100,6 +1163,7 @@ } } } + if (found || (flag == CKF_DONT_BLOCK) || shuttingDown) { break; } Index: slot.h =================================================================== RCS file: /cvs/dirsec/coolkey/src/coolkey/slot.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- slot.h 9 Jun 2006 18:39:11 -0000 1.1 +++ slot.h 16 Oct 2007 00:05:31 -0000 1.2 @@ -527,6 +527,8 @@ * has called 'C_GetSlotList' with a NULL parameter */ void updateReaderList(); + /* see if a reader name exists in a caller provided reader name list. */ + bool readerNameExistsInList(const char *readerName,CKYReaderNameList *readerNameList ); bool readerExists(const char *readerName, unsigned int *hint = 0); public: SlotList(Log *log); From fedora-directory-commits at redhat.com Tue Oct 16 15:43:50 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Tue, 16 Oct 2007 11:43:50 -0400 Subject: [Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv/panel PluginPanel.java, 1.2, 1.3 Message-ID: <200710161543.l9GFhoU2023020@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22998 Modified Files: PluginPanel.java Log Message: Resolves: 308221 Summary: Don't try to verify plugin path validity. Index: PluginPanel.java =================================================================== RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/PluginPanel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- PluginPanel.java 13 Jan 2006 22:53:13 -0000 1.2 +++ PluginPanel.java 16 Oct 2007 15:43:48 -0000 1.3 @@ -485,20 +485,6 @@ } } - /* In the case we are in a local machine we check if the path provided is correct */ - if (isLocal()) { - String path = ((JTextComponent)_fields.get(PATH)).getText().trim(); - - File file = new File(path); - - if (!file.isFile()) { - setChangeState( (JLabel)_htLabels.get(PATH), CHANGE_STATE_ERROR ); - } - } - - - - int i = 0; while ((dsEntryText = (DSEntryTextStrict)_dsEntryFields.get(ARG+i))!=null) { JComponent view = dsEntryText.getView(dsEntryText.getViewCount() - 1 ); @@ -1137,16 +1123,6 @@ return false; } - /* In the case we are in a local machine we check if the path provided is correct */ - if (isLocal()) { - String path = ((JTextComponent)_fields.get(PATH)).getText().trim(); - - File file = new File(path); - - if (!file.isFile()) - return false; - } - DSEntryTextStrict dsEntryText; From fedora-directory-commits at redhat.com Tue Oct 16 16:41:46 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Tue, 16 Oct 2007 12:41:46 -0400 Subject: [Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv/panel/replication WindowsAgreementDestinationPanel.java, 1.1.1.1, 1.2 Message-ID: <200710161641.l9GGfk1m000404@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32690 Modified Files: WindowsAgreementDestinationPanel.java Log Message: Resolves: 333171 Summary: Deal with illegal input for port field when setting up sync agreement. Index: WindowsAgreementDestinationPanel.java =================================================================== RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/replication/WindowsAgreementDestinationPanel.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- WindowsAgreementDestinationPanel.java 18 Jul 2005 00:56:11 -0000 1.1.1.1 +++ WindowsAgreementDestinationPanel.java 16 Oct 2007 16:41:44 -0000 1.2 @@ -1174,10 +1174,15 @@ private boolean domainControllerPortIsValid() { - if(_domainControllerPort.getText().length() > 0 - && Integer.parseInt(_domainControllerPort.getText()) > 0) - { - return true; + if(_domainControllerPort.getText().length() > 0) { + try { + if (Integer.parseInt(_domainControllerPort.getText()) > 0) { + return true; + } + } catch (NumberFormatException e) { + /* Someone likely entered some non-numeric text. Just + * do nothing here so we fall through and return false. */ + } } return false; } From fedora-directory-commits at redhat.com Tue Oct 16 17:31:00 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 16 Oct 2007 13:31:00 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm back-ldbm.h, 1.10, 1.11 dblayer.c, 1.23, 1.24 upgrade.c, 1.7, 1.8 Message-ID: <200710161731.l9GHV0u7012695@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12547 Modified Files: back-ldbm.h dblayer.c upgrade.c Log Message: Resolves: #327091 Summary: Migration/Upgrade fails when it's from 6.21 to 8.0 on the same OS/architecture Description: back-ldbm.h: added LDBM_VERSION_62 dblayer.c: fixed a bug to check the instance dir name upgrade.c: added LDBM_VERSION_62 Index: back-ldbm.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/back-ldbm.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- back-ldbm.h 2 Oct 2007 18:39:51 -0000 1.10 +++ back-ldbm.h 16 Oct 2007 17:30:58 -0000 1.11 @@ -157,8 +157,8 @@ #define LDBM_VERSION "Netscape-ldbm/7.0" /* db42: new idl -> old */ #define LDBM_VERSION_NEW "Netscape-ldbm/7.0_NEW" /* db42: new idl */ #define LDBM_VERSION_OLD "Netscape-ldbm/7.0_CLASSIC" /* db42: old idl */ -#define LDBM_VERSION_62 "Netscape-ldbm/6.2" /* db33: new idl */ -#define LDBM_VERSION_61 "Netscape-ldbm/6.1" /* db33: new idl */ +#define LDBM_VERSION_62 "Netscape-ldbm/6.2" /* db42: old idl */ +#define LDBM_VERSION_61 "Netscape-ldbm/6.1" /* db33: old idl */ #define LDBM_VERSION_60 "Netscape-ldbm/6.0" /* db33: old idl */ #define LDBM_VERSION_50 "Netscape-ldbm/5.0" Index: dblayer.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- dblayer.c 4 Oct 2007 03:28:19 -0000 1.23 +++ dblayer.c 16 Oct 2007 17:30:58 -0000 1.24 @@ -5848,7 +5848,7 @@ li = inst->inst_li; priv = (dblayer_private*)li->li_dblayer_private; inst_dirp = dblayer_get_full_inst_dir(li, inst, inst_dir, MAXPATHLEN); - if (!inst_dirp || *inst_dirp) { + if (NULL == inst_dirp || '\0' == *inst_dirp) { LDAPDebug(LDAP_DEBUG_ANY, "update_db_ext: instance dir is NULL\n", 0, 0, 0); return -1; /* non zero */ Index: upgrade.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/upgrade.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- upgrade.c 15 Mar 2007 21:34:32 -0000 1.7 +++ upgrade.c 16 Oct 2007 17:30:58 -0000 1.8 @@ -58,7 +58,8 @@ {BDB_IMPL, 0, 0, DBVERSION_NEW_IDL, DBVERSION_NO_UPGRADE}, {LDBM_VERSION, 4, 2, DBVERSION_NEW_IDL, DBVERSION_NO_UPGRADE}, {LDBM_VERSION_OLD, 4, 2, DBVERSION_OLD_IDL, DBVERSION_NO_UPGRADE}, - {LDBM_VERSION_61, 3, 3, DBVERSION_NEW_IDL, DBVERSION_UPGRADE_3_4}, + {LDBM_VERSION_62, 4, 2, DBVERSION_OLD_IDL, DBVERSION_NO_UPGRADE}, + {LDBM_VERSION_61, 3, 3, DBVERSION_OLD_IDL, DBVERSION_UPGRADE_3_4}, {LDBM_VERSION_60, 3, 3, DBVERSION_OLD_IDL, DBVERSION_UPGRADE_3_4}, {NULL,0,0} }; @@ -274,8 +275,7 @@ li->li_flags |= LI_FORCE_MOD_CONFIG; if ((0 == PL_strncasecmp(ldbmversion, BDB_IMPL, strlen(BDB_IMPL))) || - (0 == PL_strcmp(ldbmversion, LDBM_VERSION)) || - (0 == PL_strcmp(ldbmversion, LDBM_VERSION_61))) /* db: new idl */ + (0 == PL_strcmp(ldbmversion, LDBM_VERSION))) /* db: new idl */ { if (!idl_get_idl_new()) /* config: old idl */ { @@ -288,6 +288,8 @@ } } else if ((0 == strcmp(ldbmversion, LDBM_VERSION_OLD)) || + (0 == PL_strcmp(ldbmversion, LDBM_VERSION_61)) || + (0 == PL_strcmp(ldbmversion, LDBM_VERSION_62)) || (0 == strcmp(ldbmversion, LDBM_VERSION_60))) /* db: old */ { if (idl_get_idl_new()) /* config: new */ From fedora-directory-commits at redhat.com Tue Oct 16 20:17:39 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Tue, 16 Oct 2007 16:17:39 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication windows_protocol_util.c, 1.35, 1.36 Message-ID: <200710162017.l9GKHd7G019909@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19497 Modified Files: windows_protocol_util.c Log Message: Resolves: 335081 Summary: Don't add mailGroup objectclass when sync'ing new group entries from AD. Index: windows_protocol_util.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_protocol_util.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- windows_protocol_util.c 27 Sep 2007 18:33:30 -0000 1.35 +++ windows_protocol_util.c 16 Oct 2007 20:17:37 -0000 1.36 @@ -2851,7 +2851,6 @@ "objectclass:top\n" "objectclass:groupofuniquenames\n" "objectclass:ntGroup\n" - "objectclass:mailGroup\n" "ntGroupDeleteGroup:true\n" "cn:%s\n"; From fedora-directory-commits at redhat.com Tue Oct 16 21:22:49 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 16 Oct 2007 17:22:49 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication cl5_api.c, 1.17, 1.18 cl5_api.h, 1.7, 1.8 cl5_config.c, 1.6, 1.7 Message-ID: <200710162122.l9GLMntV003341@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3313/ldapserver/ldap/servers/plugins/replication Modified Files: cl5_api.c cl5_api.h cl5_config.c Log Message: Resolves: bug 185602 Bug Description: Netscape Console allows instance directory to be set as change log Reviewed by: nkinder (Thanks!) Fix Description: 1) When removing the changelog files and directories, only remove the actual db related files - version, guardian, *db4, log.*, and __db.* - This should take care of the cases where the changelog was already created in an existing directory. 2) Disallow adding/changing a changelog db directory if it already exists and is not empty Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: cl5_api.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/cl5_api.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- cl5_api.c 12 Oct 2007 17:22:54 -0000 1.17 +++ cl5_api.c 16 Oct 2007 21:22:47 -0000 1.18 @@ -3835,6 +3835,39 @@ } } +/* see if the given file is a changelog db file */ +static int +_cl5IsDbFile(const char *fname) +{ + char *ptr = NULL; + if (!fname || !*fname) { + return 0; + } + + if (!strcmp(fname, GUARDIAN_FILE)) { + return 1; + } + + if (!strcmp(fname, VERSION_FILE)) { + return 1; + } + + if (_cl5FileEndsWith(fname, DB_EXTENSION)) { + return 1; + } + + if (_cl5IsLogFile(fname)) { + return 1; + } + + ptr = strstr(fname, "__db."); + if (ptr == fname) { /* begins with __db. */ + return 1; + } + + return 0; /* not a filename we recognize as being associated with the db */ +} + /* state lock must be locked */ static int _cl5Delete (const char *clDir, int rmDir) { @@ -3842,6 +3875,7 @@ char filename[MAXPATHLEN + 1]; PRDirEntry *entry = NULL; int rc; + int dirisempty = 1; /* remove all files in the directory and the directory */ dir = PR_OpenDir(clDir); @@ -3860,6 +3894,13 @@ { break; } + if (!_cl5IsDbFile(entry->name)) { + slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, + "_cl5Delete: Skipping file [%s/%s] because it is not a changelogdb file.\n", + clDir, entry->name); + dirisempty = 0; /* skipped at least one file - dir not empty */ + continue; + } PR_snprintf(filename, MAXPATHLEN, "%s/%s", clDir, entry->name); rc = PR_Delete(filename); if (rc != PR_SUCCESS) @@ -3879,7 +3920,7 @@ return CL5_SYSTEM_ERROR; } - if (rmDir) + if (rmDir && dirisempty) { rc = PR_RmDir (clDir); if (rc != 0) @@ -3889,6 +3930,10 @@ clDir, errno); return CL5_SYSTEM_ERROR; } + } else if (rmDir && !dirisempty) { + slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, + "_cl5Delete: changelog dir (%s) is not empty - cannot remove\n", + clDir); } return CL5_SUCCESS; @@ -6770,3 +6815,35 @@ #endif return rval; } + +int +cl5DbDirIsEmpty(const char *dir) +{ + PRDir *prDir; + PRDirEntry *prDirEntry; + int isempty = 1; + + if (!dir || !*dir) { + return isempty; + } + /* assume failure means it does not exist - other failure + cases will be handled by code which attempts to create the + db in this directory */ + if (PR_Access(dir, PR_ACCESS_EXISTS)) { + return isempty; + } + prDir = PR_OpenDir(dir); + if (prDir == NULL) { + return isempty; /* assume failure means does not exist */ + } + while (NULL != (prDirEntry = PR_ReadDir(prDir, PR_SKIP_DOT | PR_SKIP_DOT_DOT))) { + if (NULL == prDirEntry->name) { /* NSPR doesn't behave like the docs say it should */ + break; + } + isempty = 0; /* found at least one "real" file */ + break; + } + PR_CloseDir(prDir); + + return isempty; +} Index: cl5_api.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/cl5_api.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- cl5_api.h 15 Mar 2007 21:40:34 -0000 1.7 +++ cl5_api.h 16 Oct 2007 21:22:47 -0000 1.8 @@ -519,4 +519,13 @@ int cl5_is_diskfull(); int cl5_diskspace_is_available(); +/* Name: cl5DbDirIsEmpty + Description: See if the given cldb directory is empty or doesn't yet exist. + Parameters: dir - Contains the name of the directory. + Return: TRUE - directory does not exist or is empty, is NULL, or is + an empty string + FALSE - otherwise +*/ +int cl5DbDirIsEmpty(const char *dir); + #endif Index: cl5_config.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/cl5_config.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- cl5_config.c 10 Nov 2006 23:45:17 -0000 1.6 +++ cl5_config.c 16 Oct 2007 21:22:47 -0000 1.7 @@ -205,6 +205,20 @@ goto done; } + if (!cl5DbDirIsEmpty(config.dir)) + { + *returncode = 1; + if (returntext) + { + PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, + "The changelog directory [%s] already exists and is not empty. " + "Please choose a directory that does not exist or is empty.\n", + config.dir); + } + + goto done; + } + /* start the changelog */ rc = cl5Open (config.dir, &config.dbconfig); if (rc != CL5_SUCCESS) @@ -450,6 +464,20 @@ if (strcmp (currentDir, config.dir) != 0) #endif { + if (!cl5DbDirIsEmpty(config.dir)) + { + *returncode = 1; + if (returntext) + { + PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, + "The changelog directory [%s] already exists and is not empty. " + "Please choose a directory that does not exist or is empty.\n", + config.dir); + } + + goto done; + } + if (!_is_absolutepath(config.dir) || (CL5_SUCCESS != cl5CreateDirIfNeeded(config.dir))) { *returncode = 1; From fedora-directory-commits at redhat.com Tue Oct 16 23:24:21 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Tue, 16 Oct 2007 19:24:21 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd start_tls_extop.c, 1.10, 1.11 Message-ID: <200710162324.l9GNOLrw027009@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26991 Modified Files: start_tls_extop.c Log Message: Resolves: 219587 Summary: Fixed small non-recurring memory leak at startup. Index: start_tls_extop.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/start_tls_extop.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- start_tls_extop.c 10 Oct 2007 01:55:36 -0000 1.10 +++ start_tls_extop.c 16 Oct 2007 23:24:18 -0000 1.11 @@ -482,6 +482,7 @@ oid = slapi_ch_strdup( argv[0] ); slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls_init", "Registering plug-in for Start TLS extended op %s.\n", oid ); + slapi_ch_free_string( &oid ); } /* Register the plug-in function as an extended operation From fedora-directory-commits at redhat.com Wed Oct 17 15:56:56 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 17 Oct 2007 11:56:56 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSMigration.pm.in, 1.18, 1.19 migrate-ds.res, 1.6, 1.7 Message-ID: <200710171556.l9HFuuho020131@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20110/ldapserver/ldap/admin/src/scripts Modified Files: DSMigration.pm.in migrate-ds.res Log Message: Resolves: bug 333291 Bug Description: Do not allow direct migration if the source db index has old IDL format Reviewed by: nkinder (Thanks!) Fix Description: Just before the attempt to copy the database directories, look at the DBVERSION file from the source. If it is determined that the source version is too old, just exit migration and output a helpful error message. Platforms tested: RHEL4 i386 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: DSMigration.pm.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSMigration.pm.in,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- DSMigration.pm.in 5 Oct 2007 02:30:07 -0000 1.18 +++ DSMigration.pm.in 17 Oct 2007 15:56:53 -0000 1.19 @@ -241,10 +241,37 @@ 'nsslapd-idl-switch' => \&migIdlSwitch ); +sub getDBVERSION { + my $olddbdir = shift; + my $data = shift; + + open DBVERSION, "$olddbdir/DBVERSION" or + return ('error_reading_dbversion', $olddbdir, $!); + my $line = ; + close DBVERSION; + chomp($line); + my @foo = split("/", $line); + $data = \@foo; + return (); +} + sub copyDatabaseDirs { my $srcdir = shift; my $destdir = shift; my $filesonly = shift; + my @errs; + + # check old DBVERSION file + my @verinfo; + if (@errs = getDBVERSION($srcdir, \@verinfo)) { + return @errs; + } + + if ((($verinfo[0] =~ /^netscape/i) or ($verinfo[0] =~ /^iplanet/i)) and + (($verinfo[1] =~ /^6/) or ($verinfo[1] =~ /^5/) or ($verinfo[1] =~ /^4/))) { + return ('error_database_too_old', $srcdir, @verinfo); + } + if (-d $srcdir && ! -d $destdir && !$filesonly) { debug(1, "Copying database directory $srcdir to $destdir\n"); if (system ("cp -p -r $srcdir $destdir")) { Index: migrate-ds.res =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/migrate-ds.res,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- migrate-ds.res 5 Oct 2007 02:30:07 -0000 1.6 +++ migrate-ds.res 17 Oct 2007 15:56:53 -0000 1.7 @@ -25,3 +25,9 @@ fixing_integer_attr_index = The index for the attribute '%s' in the database directory '%s' will be removed and re-created.\n\n error_removing_index_file = Could not remove the index file '%s'. Error: %s\n\n error_recreating_index_file = Could not re-create the index file '%s'. Error: %s\n\n +error_reading_dbversion = Could not read the old database version information from '%s'. Error: %s\n\n +error_database_too_old = The database at '%s' is version '%s/%s'.\ +This version cannot be migrated using the database binaries. You must\ +first convert the databases to LDIF format and use the cross platform\ +migration procedure. This procedure is documented in the migration\ +guide and in the help for this script.\n\n From fedora-directory-commits at redhat.com Wed Oct 17 18:04:36 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Wed, 17 Oct 2007 14:04:36 -0400 Subject: [Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv dirserv.properties, 1.7, 1.8 Message-ID: <200710171804.l9HI4at6017085@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17046 Modified Files: dirserv.properties Log Message: Resolves: 178247 Summary: Removed disabled cachesize field from Database Settings tab. Index: dirserv.properties =================================================================== RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/dirserv.properties,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- dirserv.properties 30 Jul 2007 17:16:40 -0000 1.7 +++ dirserv.properties 17 Oct 2007 18:04:33 -0000 1.8 @@ -1504,11 +1504,6 @@ dbsettings-suffix-label=Suffix: dbsettings-suffix-ttip=Suffix maintained by this database. -# cachesize is deprecated - use cachememsize instead -dbsettings-cachesize-enable=false -dbsettings-cachesize-label=Maximum entries in cache -dbsettings-cachesize-unit-label=entries -dbsettings-cachesize-ttip=Maximum number of entries stored in the database cache for processing client requests ( -1 indicates no limit ) dbsettings-cachememsize-label=Memory available for cache dbsettings-cachememsize-unit-label=bytes dbsettings-cachememsize-ttip=Maximum memory available to the database for storing cached entries From fedora-directory-commits at redhat.com Wed Oct 17 18:04:36 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Wed, 17 Oct 2007 14:04:36 -0400 Subject: [Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv/panel LDBMSettingsPanel.java, 1.1.1.1, 1.2 Message-ID: <200710171804.l9HI4arx017091@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17046/panel Modified Files: LDBMSettingsPanel.java Log Message: Resolves: 178247 Summary: Removed disabled cachesize field from Database Settings tab. Index: LDBMSettingsPanel.java =================================================================== RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/LDBMSettingsPanel.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- LDBMSettingsPanel.java 18 Jul 2005 00:55:58 -0000 1.1.1.1 +++ LDBMSettingsPanel.java 17 Oct 2007 18:04:34 -0000 1.2 @@ -156,25 +156,7 @@ roDSEntry); setComponentTable(_cbIsReadOnly, roDSEntry); - /* Cache info */ - boolean enablecachesize = DSUtil.getBoolean(_section, "cachesize-enable"); - _tfcachesize = makeNumericalJTextField( _section, "cachesize" ); - _lcachesize = makeJLabel(_section, "cachesize"); - _lcachesize.setLabelFor(_tfcachesize); - _tfcachesize.setEnabled(enablecachesize); - - JLabel lcachesizeUnit = makeJLabel(_section, "cachesize-unit"); - lcachesizeUnit.setLabelFor(_tfcachesize); - - DSEntryLong cachesizeDSEntry = new DSEntryLong(null, - _tfcachesize, _lcachesize, - CACHE_SIZE_NUM_MIN_VAL, CACHE_SIZE_NUM_MAX_VAL, 1); - entries.add(_dnEntry, DB_CACHESIZE_ATTR_NAM, - cachesizeDSEntry); - setComponentTable(_tfcachesize, cachesizeDSEntry); - - _tfcachememsize = makeNumericalJTextField( _section, "cachememsize" ); _lcachememsize = makeJLabel(_section, "cachememsize"); _lcachememsize.setLabelFor(_tfcachememsize); @@ -230,22 +212,6 @@ gbc.gridx = 0; gbc.fill = gbc.NONE; gbc.anchor = gbc.EAST; - grid.add( _lcachesize, gbc); - - gbc.gridx = 1; - gbc.anchor = gbc.CENTER; - gbc.fill = gbc.HORIZONTAL; - grid.add( _tfcachesize, gbc); - - gbc.gridx = 2; - gbc.fill = gbc.NONE; - gbc.anchor = gbc.WEST; - grid.add( lcachesizeUnit, gbc); - gbc.gridy++; - - gbc.gridx = 0; - gbc.fill = gbc.NONE; - gbc.anchor = gbc.EAST; grid.add( _lcachememsize, gbc); gbc.gridx = 1; @@ -301,16 +267,11 @@ private JLabel _lSuffixText; private JLabel _lSuffixLabel; - private JTextField _tfcachememsize; - private JLabel _lcachememsize; - private JTextField _tfcachesize; - private JLabel _lcachesize; + private JTextField _tfcachememsize; + private JLabel _lcachememsize; - private static final long CACHE_SIZE_NUM_MIN_VAL = -1; - private static final long CACHE_SIZE_NUM_MAX_VAL = Long.MAX_VALUE; private static final long CACHEMEM_SIZE_NUM_MIN_VAL = 200000; - private static final long CACHEMEM_SIZE_NUM_MAX_VAL = CACHE_SIZE_NUM_MAX_VAL; - private static final String DB_CACHESIZE_ATTR_NAM = "nsslapd-cachesize"; + private static final long CACHEMEM_SIZE_NUM_MAX_VAL = Long.MAX_VALUE; private static final String DB_CACHEMEMSIZE_ATTR_NAM = "nsslapd-cachememsize"; private static final String _section = "dbsettings"; From fedora-directory-commits at redhat.com Wed Oct 17 22:19:47 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Wed, 17 Oct 2007 18:19:47 -0400 Subject: [Fedora-directory-commits] fedora-idm-console fedora-idm-console, 1.1.1.1, 1.2 Message-ID: <200710172219.l9HMJlA6006304@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/fedora-idm-console In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6283 Modified Files: fedora-idm-console Log Message: Resolves: 183962 Summary: Remove -ms and -mx options from console start script. Index: fedora-idm-console =================================================================== RCS file: /cvs/dirsec/fedora-idm-console/fedora-idm-console,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- fedora-idm-console 1 Aug 2007 23:08:51 -0000 1.1.1.1 +++ fedora-idm-console 17 Oct 2007 22:19:44 -0000 1.2 @@ -31,4 +31,4 @@ # # Launch the Console # -java -ms8m -mx64m -cp @jssjar@:@ldapjdkjar@:$CLASSDEST/@basejar@:$CLASSDEST/@mccjar@:$CLASSDEST/@mcclangjar@:$CLASSDEST/@nmclfjar@:$CLASSDEST/@nmclflangjar@:$CLASSDEST/@themejar@ -Djava.library.path=@libdir@ -Djava.util.prefs.systemRoot="$HOME/. at prefsdir@" -Djava.util.prefs.userRoot="$HOME/. at prefsdir@" com.netscape.management.client.console.Console $* +java -cp @jssjar@:@ldapjdkjar@:$CLASSDEST/@basejar@:$CLASSDEST/@mccjar@:$CLASSDEST/@mcclangjar@:$CLASSDEST/@nmclfjar@:$CLASSDEST/@nmclflangjar@:$CLASSDEST/@themejar@ -Djava.library.path=@libdir@ -Djava.util.prefs.systemRoot="$HOME/. at prefsdir@" -Djava.util.prefs.userRoot="$HOME/. at prefsdir@" com.netscape.management.client.console.Console $* From fedora-directory-commits at redhat.com Thu Oct 18 00:08:38 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:38 -0400 Subject: [Fedora-directory-commits] ldapserver/lib/base crit.cpp, 1.6, 1.7 file.cpp, 1.8, 1.9 Message-ID: <200710180008.l9I08cOa026458@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/lib/base In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/lib/base Modified Files: crit.cpp file.cpp Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: crit.cpp =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/base/crit.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- crit.cpp 10 Nov 2006 23:45:59 -0000 1.6 +++ crit.cpp 18 Oct 2007 00:08:36 -0000 1.7 @@ -150,7 +150,6 @@ crit->owner = 0; PR_Unlock(crit->lock); } - PR_ASSERT(crit->count >= 0); #endif } @@ -346,9 +345,9 @@ cs_wait(COUNTING_SEMAPHORE csp) { counting_sem_t *cs = (counting_sem_t *)csp; +#if defined(SOLARIS) && defined(HW_THREADS) int ret; -#if defined(SOLARIS) && defined(HW_THREADS) if ( (ret = sema_wait(cs)) < 0 ) { ereport(LOG_FAILURE, XP_GetAdminStr(DBT_csWaitFailureS_), system_errmsg()); return -1; @@ -366,7 +365,7 @@ crit_exit(cs->cv_lock); crit_enter(cs->lock); } - ret = --(cs->count); + --(cs->count); crit_exit(cs->lock); return 0; @@ -377,18 +376,19 @@ cs_trywait(COUNTING_SEMAPHORE csp) { counting_sem_t *cs = (counting_sem_t *)csp; - int ret; #if defined(SOLARIS) && defined(HW_THREADS) + int ret; ret = sema_trywait(cs)?-1:0; return ret; #elif defined(IRIX) && defined(HW_THREADS) + int ret; ret = uscpsema(cs); return (ret == 1)?0:-1; #else crit_enter(cs->lock); if (cs->count > 0) { - ret = --(cs->count); + --(cs->count); crit_exit(cs->lock); return 0; } @@ -402,9 +402,9 @@ cs_release(COUNTING_SEMAPHORE csp) { counting_sem_t *cs = (counting_sem_t *)csp; - int ret; #if defined(SOLARIS) && defined(HW_THREADS) + int ret; if ( (ret = sema_post(cs)) < 0 ) { ereport(LOG_FAILURE, XP_GetAdminStr(DBT_csPostFailureS_), system_errmsg()); return -1; @@ -415,7 +415,7 @@ return 0; #else crit_enter(cs->lock); - ret = ++(cs->count); + ++(cs->count); if (cs->count == 1) { crit_enter(cs->cv_lock); condvar_notify(cs->cv); Index: file.cpp =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/base/file.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- file.cpp 10 Nov 2006 23:45:59 -0000 1.8 +++ file.cpp 18 Oct 2007 00:08:36 -0000 1.9 @@ -565,19 +565,11 @@ char static_error[128]; char *lmsg = 0; /* Local message pointer */ size_t msglen = 0; - int sys_error = 0; PRErrorCode nscp_error; #ifdef XP_WIN32 LPTSTR sysmsg = 0; #endif - - /* Grab the OS error message */ -#ifdef XP_WIN32 - sys_error = GetLastError(); -#else - sys_error = errno; -#endif nscp_error = PR_GetError(); /* If there is a NSPR error, but it is "unknown", try to get the OSError From fedora-directory-commits at redhat.com Thu Oct 18 00:08:38 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:38 -0400 Subject: [Fedora-directory-commits] ldapserver/lib/ldaputil cert.c, 1.5, 1.6 certmap.c, 1.7, 1.8 vtable.c, 1.5, 1.6 Message-ID: <200710180008.l9I08cSY026466@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/lib/ldaputil In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/lib/ldaputil Modified Files: cert.c certmap.c vtable.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: cert.c =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/ldaputil/cert.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- cert.c 10 Nov 2006 23:46:00 -0000 1.5 +++ cert.c 18 Oct 2007 00:08:36 -0000 1.6 @@ -259,9 +259,9 @@ { auto size_t count = 0; auto char*** rdn; - for (rdn = rdns; *rdns; ++rdns) { + for (rdn = rdns; *rdn; ++rdn) { auto char** ava; - for (ava = *rdns; *ava; ++ava) { + for (ava = *rdn; *ava; ++ava) { ++count; } } Index: certmap.c =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/ldaputil/certmap.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- certmap.c 10 Nov 2006 23:46:00 -0000 1.7 +++ certmap.c 18 Oct 2007 00:08:36 -0000 1.8 @@ -1051,12 +1051,10 @@ else if (certmap_listinfo) { char *n_issuerDN = ldapu_dn_normalize (ldapu_strdup(issuerDN)); LDAPUListNode_t *cur = certmap_listinfo->head; - int rv = LDAPU_FAILED; while(cur) { if (!ldapu_strcasecmp(n_issuerDN, ((LDAPUCertMapInfo_t *)cur->info)->issuerDN)) { *certmap_info = cur->info; - rv = LDAPU_SUCCESS; break; } cur = cur->next; @@ -1302,10 +1300,9 @@ NSAPI_PUBLIC CertMapFn_t ldapu_get_cert_mapfn (const char *issuerDN) { LDAPUCertMapInfo_t *certmap_info = 0; - int rv; /* don't free the certmap_info -- its a pointer to an internal structure */ - rv = ldapu_issuer_certinfo(issuerDN, (void **)&certmap_info); + ldapu_issuer_certinfo(issuerDN, (void **)&certmap_info); /* certmap_info may be NULL -- use the default */ return ldapu_get_cert_mapfn_sub(certmap_info); @@ -1344,10 +1341,9 @@ NSAPI_PUBLIC CertSearchFn_t ldapu_get_cert_searchfn (const char *issuerDN) { LDAPUCertMapInfo_t *certmap_info = 0; - int rv; /* don't free the certmap_info -- its a pointer to an internal structure */ - rv = ldapu_issuer_certinfo(issuerDN, (void **)&certmap_info); + ldapu_issuer_certinfo(issuerDN, (void **)&certmap_info); /* certmap_info may be NULL -- use the default */ return ldapu_get_cert_searchfn_sub(certmap_info); @@ -1386,10 +1382,9 @@ NSAPI_PUBLIC CertVerifyFn_t ldapu_get_cert_verifyfn (const char *issuerDN) { LDAPUCertMapInfo_t *certmap_info = 0; - int rv; /* don't free the certmap_info -- its a pointer to an internal structure */ - rv = ldapu_issuer_certinfo(issuerDN, (void **)&certmap_info); + ldapu_issuer_certinfo(issuerDN, (void **)&certmap_info); /* certmap_info may be NULL -- use the default */ return ldapu_get_cert_verifyfn_sub(certmap_info); Index: vtable.c =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/ldaputil/vtable.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- vtable.c 10 Nov 2006 23:46:00 -0000 1.5 +++ vtable.c 18 Oct 2007 00:08:36 -0000 1.6 @@ -68,7 +68,7 @@ #endif static LDAP_CALL LDAP_CALLBACK int -ldapuVd_set_option( LDAP *ld, int opt, void *val ) +ldapuVd_set_option( LDAP *ld, int opt, const void *val ) { return ldap_set_option (ld, opt, val); } @@ -150,7 +150,6 @@ #define ldapuVd_set_option ldap_set_option #define ldapuVd_simple_bind_s ldap_simple_bind_s #define ldapuVd_unbind ldap_unbind -#define ldapuVd_set_option ldap_set_option #define ldapuVd_simple_bind_s ldap_simple_bind_s #define ldapuVd_unbind ldap_unbind #define ldapuVd_search_s ldap_search_s From fedora-directory-commits at redhat.com Thu Oct 18 00:08:40 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:40 -0400 Subject: [Fedora-directory-commits] ldapserver/lib/libaccess acltools.cpp, 1.7, 1.8 oneeval.cpp, 1.7, 1.8 symbols.cpp, 1.5, 1.6 Message-ID: <200710180008.l9I08eWi026474@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/lib/libaccess In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/lib/libaccess Modified Files: acltools.cpp oneeval.cpp symbols.cpp Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: acltools.cpp =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/libaccess/acltools.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- acltools.cpp 10 Nov 2006 23:46:02 -0000 1.7 +++ acltools.cpp 18 Oct 2007 00:08:36 -0000 1.8 @@ -2505,7 +2505,6 @@ int rename_acl_in_file(char * filename, char * aclname, char * newname) { - ACLListHandle_t * racllist=NULL; char * pattern=NULL; char header[] = "version 3.0;\n"; int headerlen = strlen(header); @@ -2565,7 +2564,7 @@ memcpy(&text[headerlen], aclhead, len); text[headerlen + len] = 0; - if ((racllist=ACL_ParseString(NULL, text))==NULL) { + if (ACL_ParseString(NULL, text)==NULL) { rv = ACLERRPARSE; goto rename_cleanup; } Index: oneeval.cpp =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/libaccess/oneeval.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- oneeval.cpp 10 Nov 2006 23:46:02 -0000 1.7 +++ oneeval.cpp 18 Oct 2007 00:08:36 -0000 1.8 @@ -292,7 +292,6 @@ { ACLAceEntry_t *cur_ace, *next_ace; ACLAceNumEntry_t *cur_num_p, *next_num_p; - ACLExprHandle_t *acep; if (!cache) return 0; @@ -309,7 +308,6 @@ (cur_ace->acep->expr_type == ACL_EXPR_TYPE_AUTH)) PListDestroy(cur_ace->global_auth); next_ace = cur_ace->next; - acep = cur_ace->acep; /* The ACE structure itself */ PERM_FREE(cur_ace); cur_ace = next_ace; } Index: symbols.cpp =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/libaccess/symbols.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- symbols.cpp 10 Nov 2006 23:46:02 -0000 1.5 +++ symbols.cpp 18 Oct 2007 00:08:36 -0000 1.6 @@ -181,7 +181,6 @@ int symTableAddSym(void * table, Symbol_t * newsym, void * symref) { SymTable_t * st = (SymTable_t *)table; - PLHashEntry * he; PLHashEntry **hep; PLHashNumber keyhash; int rv = 0; @@ -196,7 +195,7 @@ if (*hep == 0) { /* Expand the hash table if necessary and allocate an entry */ - he = PL_HashTableRawAdd(st->stb_ht, + PL_HashTableRawAdd(st->stb_ht, hep, keyhash, (void *)newsym, symref); } else { From fedora-directory-commits at redhat.com Thu Oct 18 00:08:40 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:40 -0400 Subject: [Fedora-directory-commits] ldapserver/lib/libadmin authdb.c, 1.7, NONE Message-ID: <200710180008.l9I08e1L026479@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/lib/libadmin In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/lib/libadmin Removed Files: authdb.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler --- authdb.c DELETED --- From fedora-directory-commits at redhat.com Thu Oct 18 00:08:29 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:29 -0400 Subject: [Fedora-directory-commits] ldapserver/include/base systems.h, 1.8, 1.9 Message-ID: <200710180008.l9I08xrR026494@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/include/base In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/include/base Modified Files: systems.h Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: systems.h =================================================================== RCS file: /cvs/dirsec/ldapserver/include/base/systems.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- systems.h 10 Nov 2006 23:44:24 -0000 1.8 +++ systems.h 18 Oct 2007 00:08:27 -0000 1.9 @@ -142,7 +142,6 @@ #define FILE_MMAP_FLAGS MAP_PRIVATE #define HAS_STATFS #define HAVE_ATEXIT -#define HAVE_STRFTIME #define JAVA_STATIC_LINK #undef NEED_CRYPT_H #define NET_SOCKETS From fedora-directory-commits at redhat.com Thu Oct 18 00:08:29 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:29 -0400 Subject: [Fedora-directory-commits] ldapserver Makefile.am, 1.62, 1.63 Makefile.in, 1.76, 1.77 aclocal.m4, 1.55, 1.56 config.h.in, 1.9, 1.10 configure, 1.71, 1.72 ltmain.sh, 1.21, 1.22 configure.ac, 1.40, 1.41 Message-ID: <200710180008.l9I08x7A026489@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950 Modified Files: Makefile.am Makefile.in aclocal.m4 config.h.in configure ltmain.sh configure.ac Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.am,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- Makefile.am 11 Oct 2007 16:29:49 -0000 1.62 +++ Makefile.am 18 Oct 2007 00:08:26 -0000 1.63 @@ -337,7 +337,6 @@ lib/libaccess/symbols.cpp \ lib/libaccess/usi.cpp \ lib/libaccess/usrcache.cpp \ - lib/libadmin/authdb.c \ lib/libadmin/error.c \ lib/libadmin/template.c \ lib/libadmin/util.c \ Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.76 retrieving revision 1.77 diff -u -r1.76 -r1.77 --- Makefile.in 11 Oct 2007 16:29:49 -0000 1.76 +++ Makefile.in 18 Oct 2007 00:08:26 -0000 1.77 @@ -290,7 +290,6 @@ lib/libaccess/libns_dshttpd_la-symbols.lo \ lib/libaccess/libns_dshttpd_la-usi.lo \ lib/libaccess/libns_dshttpd_la-usrcache.lo \ - lib/libadmin/libns_dshttpd_la-authdb.lo \ lib/libadmin/libns_dshttpd_la-error.lo \ lib/libadmin/libns_dshttpd_la-template.lo \ lib/libadmin/libns_dshttpd_la-util.lo \ @@ -853,7 +852,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ -SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOLARIS_FALSE = @SOLARIS_FALSE@ @@ -1243,7 +1241,6 @@ lib/libaccess/symbols.cpp \ lib/libaccess/usi.cpp \ lib/libaccess/usrcache.cpp \ - lib/libadmin/authdb.c \ lib/libadmin/error.c \ lib/libadmin/template.c \ lib/libadmin/util.c \ @@ -2663,8 +2660,6 @@ lib/libadmin/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) lib/libadmin/$(DEPDIR) @: > lib/libadmin/$(DEPDIR)/$(am__dirstamp) -lib/libadmin/libns_dshttpd_la-authdb.lo: lib/libadmin/$(am__dirstamp) \ - lib/libadmin/$(DEPDIR)/$(am__dirstamp) lib/libadmin/libns_dshttpd_la-error.lo: lib/libadmin/$(am__dirstamp) \ lib/libadmin/$(DEPDIR)/$(am__dirstamp) lib/libadmin/libns_dshttpd_la-template.lo: \ @@ -4602,8 +4597,6 @@ -rm -f lib/libaccess/libns_dshttpd_la-usi.lo -rm -f lib/libaccess/libns_dshttpd_la-usrcache.$(OBJEXT) -rm -f lib/libaccess/libns_dshttpd_la-usrcache.lo - -rm -f lib/libadmin/libns_dshttpd_la-authdb.$(OBJEXT) - -rm -f lib/libadmin/libns_dshttpd_la-authdb.lo -rm -f lib/libadmin/libns_dshttpd_la-error.$(OBJEXT) -rm -f lib/libadmin/libns_dshttpd_la-error.lo -rm -f lib/libadmin/libns_dshttpd_la-template.$(OBJEXT) @@ -5045,7 +5038,6 @@ @AMDEP_TRUE@@am__include@ @am__quote at lib/libaccess/$(DEPDIR)/libns_dshttpd_la-symbols.Plo at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at lib/libaccess/$(DEPDIR)/libns_dshttpd_la-usi.Plo at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at lib/libaccess/$(DEPDIR)/libns_dshttpd_la-usrcache.Plo at am__quote@ - at AMDEP_TRUE@@am__include@ @am__quote at lib/libadmin/$(DEPDIR)/libns_dshttpd_la-authdb.Plo at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at lib/libadmin/$(DEPDIR)/libns_dshttpd_la-error.Plo at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at lib/libadmin/$(DEPDIR)/libns_dshttpd_la-template.Plo at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at lib/libadmin/$(DEPDIR)/libns_dshttpd_la-util.Plo at am__quote@ @@ -5984,13 +5976,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhttp_client_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ldap/servers/plugins/http/libhttp_client_plugin_la-http_impl.lo `test -f 'ldap/servers/plugins/http/http_impl.c' || echo '$(srcdir)/'`ldap/servers/plugins/http/http_impl.c -lib/libadmin/libns_dshttpd_la-authdb.lo: lib/libadmin/authdb.c - at am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libns_dshttpd_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libadmin/libns_dshttpd_la-authdb.lo -MD -MP -MF "lib/libadmin/$(DEPDIR)/libns_dshttpd_la-authdb.Tpo" -c -o lib/libadmin/libns_dshttpd_la-authdb.lo `test -f 'lib/libadmin/authdb.c' || echo '$(srcdir)/'`lib/libadmin/authdb.c; \ - at am__fastdepCC_TRUE@ then mv -f "lib/libadmin/$(DEPDIR)/libns_dshttpd_la-authdb.Tpo" "lib/libadmin/$(DEPDIR)/libns_dshttpd_la-authdb.Plo"; else rm -f "lib/libadmin/$(DEPDIR)/libns_dshttpd_la-authdb.Tpo"; exit 1; fi - at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libadmin/authdb.c' object='lib/libadmin/libns_dshttpd_la-authdb.lo' libtool=yes @AMDEPBACKSLASH@ - at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - at am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libns_dshttpd_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/libadmin/libns_dshttpd_la-authdb.lo `test -f 'lib/libadmin/authdb.c' || echo '$(srcdir)/'`lib/libadmin/authdb.c - lib/libadmin/libns_dshttpd_la-error.lo: lib/libadmin/error.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libns_dshttpd_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libadmin/libns_dshttpd_la-error.lo -MD -MP -MF "lib/libadmin/$(DEPDIR)/libns_dshttpd_la-error.Tpo" -c -o lib/libadmin/libns_dshttpd_la-error.lo `test -f 'lib/libadmin/error.c' || echo '$(srcdir)/'`lib/libadmin/error.c; \ @am__fastdepCC_TRUE@ then mv -f "lib/libadmin/$(DEPDIR)/libns_dshttpd_la-error.Tpo" "lib/libadmin/$(DEPDIR)/libns_dshttpd_la-error.Plo"; else rm -f "lib/libadmin/$(DEPDIR)/libns_dshttpd_la-error.Tpo"; exit 1; fi Index: aclocal.m4 =================================================================== RCS file: /cvs/dirsec/ldapserver/aclocal.m4,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- aclocal.m4 11 Oct 2007 16:29:49 -0000 1.55 +++ aclocal.m4 18 Oct 2007 00:08:26 -0000 1.56 @@ -1578,27 +1578,10 @@ # before this can be enabled. hardcode_into_libs=yes - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -4305,9 +4288,6 @@ # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - # An ERE matcher. EGREP=$lt_EGREP @@ -4441,11 +4421,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. @@ -4457,7 +4437,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -4537,7 +4517,7 @@ link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -6373,7 +6353,6 @@ done done done -IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -6406,7 +6385,6 @@ done ]) SED=$lt_cv_path_SED -AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) Index: config.h.in =================================================================== RCS file: /cvs/dirsec/ldapserver/config.h.in,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- config.h.in 9 Aug 2007 00:10:32 -0000 1.9 +++ config.h.in 18 Oct 2007 00:08:26 -0000 1.10 @@ -344,6 +344,9 @@ /* SVID_GETTOD */ #undef _SVID_GETTOD +/* To use XOPEN getpeername */ +#undef _XOPEN_SOURCE_EXTENDED + /* SVR4 */ #undef __svr4 Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.71 retrieving revision 1.72 diff -u -r1.71 -r1.72 --- configure 11 Oct 2007 16:29:49 -0000 1.71 +++ configure 18 Oct 2007 00:08:26 -0000 1.72 @@ -465,7 +465,7 @@ #endif" ac_default_prefix=/opt/$PACKAGE_NAME -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 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 MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP! P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir mibdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec initconfigdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir sasl_path svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor 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 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 MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CX! XCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir mibdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec initconfigdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir sasl_path svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -3836,7 +3836,6 @@ done done done -IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -3871,7 +3870,6 @@ fi SED=$lt_cv_path_SED - echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 @@ -4312,7 +4310,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4315 "configure"' > conftest.$ac_ext + echo '#line 4313 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5447,7 +5445,7 @@ # Provide some information about the compiler. -echo "$as_me:5450:" \ +echo "$as_me:5448:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6510,11 +6508,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:6513: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6511: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6517: \$? = $ac_status" >&5 + echo "$as_me:6515: \$? = $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. @@ -6778,11 +6776,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:6781: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6779: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6785: \$? = $ac_status" >&5 + echo "$as_me:6783: \$? = $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. @@ -6882,11 +6880,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:6885: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6883: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6889: \$? = $ac_status" >&5 + echo "$as_me:6887: \$? = $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 @@ -8347,31 +8345,10 @@ # before this can be enabled. hardcode_into_libs=yes - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 8354 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -9248,7 +9225,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11668: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11698: \$? = $ac_status" >&5 + echo "$as_me:11672: \$? = $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. @@ -11795,11 +11769,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:11798: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11772: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11802: \$? = $ac_status" >&5 + echo "$as_me:11776: \$? = $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 @@ -12327,31 +12301,10 @@ # before this can be enabled. hardcode_into_libs=yes - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 12334 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -12735,9 +12688,6 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - # An ERE matcher. EGREP=$lt_EGREP @@ -12871,11 +12821,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. @@ -12887,7 +12837,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -12967,7 +12917,7 @@ link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -13389,11 +13339,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:13392: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13342: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13396: \$? = $ac_status" >&5 + echo "$as_me:13346: \$? = $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. @@ -13493,11 +13443,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:13496: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13446: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13500: \$? = $ac_status" >&5 + echo "$as_me:13450: \$? = $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 @@ -14938,31 +14888,10 @@ # before this can be enabled. hardcode_into_libs=yes - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 14945 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -15346,9 +15275,6 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - # An ERE matcher. EGREP=$lt_EGREP @@ -15482,11 +15408,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. @@ -15498,7 +15424,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -15578,7 +15504,7 @@ link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -15720,11 +15646,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:15723: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15649: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15727: \$? = $ac_status" >&5 + echo "$as_me:15653: \$? = $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. @@ -15988,11 +15914,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:15991: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15917: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15995: \$? = $ac_status" >&5 + echo "$as_me:15921: \$? = $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. @@ -16092,11 +16018,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:16095: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16021: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16099: \$? = $ac_status" >&5 + echo "$as_me:16025: \$? = $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 @@ -17557,31 +17483,10 @@ # before this can be enabled. hardcode_into_libs=yes - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 17564 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -17965,9 +17870,6 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - # An ERE matcher. EGREP=$lt_EGREP @@ -18101,11 +18003,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. @@ -18117,7 +18019,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -18197,7 +18099,7 @@ link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -18449,9 +18351,6 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_RC -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - # An ERE matcher. EGREP=$lt_EGREP @@ -18585,11 +18484,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. @@ -18601,7 +18500,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -18681,7 +18580,7 @@ link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -23344,6 +23243,11 @@ #define _HPUX_SOURCE 1 _ACEOF + +cat >>confdefs.h <<\_ACEOF +#define _XOPEN_SOURCE_EXTENDED 1 +_ACEOF + # assume 64 bit perlexec='/opt/perl_64/bin/perl' platform="hpux" @@ -26048,7 +25952,6 @@ s, at CCDEPMODE@,$CCDEPMODE,;t t s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t -s, at SED@,$SED,;t t s, at EGREP@,$EGREP,;t t s, at LN_S@,$LN_S,;t t s, at ECHO@,$ECHO,;t t Index: ltmain.sh =================================================================== RCS file: /cvs/dirsec/ldapserver/ltmain.sh,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- ltmain.sh 1 Oct 2007 19:04:02 -0000 1.21 +++ ltmain.sh 18 Oct 2007 00:08:26 -0000 1.22 @@ -46,16 +46,10 @@ VERSION=1.5.22 TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes. +if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi # Check that we have a working $echo. @@ -111,14 +105,12 @@ # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). # We save the old values to restore during execute mode. -for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - fi" -done +if test "${LC_ALL+set}" = set; then + save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL +fi +if test "${LANG+set}" = set; then + save_LANG="$LANG"; LANG=C; export LANG +fi # Make sure IFS has a sensible default lt_nl=' @@ -144,8 +136,6 @@ preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 ##################################### # Shell function definitions: @@ -337,17 +327,7 @@ *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - extracted_serial=`expr $extracted_serial + 1` - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" + my_xdir="$my_gentop/$my_xlib" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" @@ -778,7 +758,6 @@ *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; - *.obj) xform=obj ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` @@ -1159,9 +1138,8 @@ for arg do case $arg in - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) + -all-static | -static) + if test "X$arg" = "X-all-static"; then if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 fi @@ -1169,20 +1147,12 @@ dlopen_self=$dlopen_self_static fi prefer_static_libs=yes - ;; - -static) + else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac + fi build_libtool_libs=no build_old_libs=yes break @@ -1742,7 +1712,7 @@ continue ;; - -static | -static-libtool-libs) + -static) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects @@ -2520,9 +2490,7 @@ if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. @@ -3218,7 +3186,7 @@ # which has an extra 1 added just for fun # case $version_type in - darwin|linux|osf|windows|none) + darwin|linux|osf|windows) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" @@ -3442,11 +3410,11 @@ fi # Eliminate all temporary directories. -# for path in $notinst_path; do -# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` -# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` -# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` -# done + for path in $notinst_path; do + lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` + deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` + done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. @@ -3547,12 +3515,13 @@ int main() { return 0; } EOF $rm conftest - if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then + $LTCC $LTCFLAGS -o conftest conftest.c $deplibs + if test "$?" -eq 0 ; then ldd_output=`ldd conftest` for i in $deplibs; do name=`expr $i : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" != "0"; then + if test "$name" != "" && test "$name" -ne "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) @@ -3591,7 +3560,9 @@ # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" != "0"; then $rm conftest - if $LTCC $LTCFLAGS -o conftest conftest.c $i; then + $LTCC $LTCFLAGS -o conftest conftest.c $i + # Did it work? + if test "$?" -eq 0 ; then ldd_output=`ldd conftest` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in @@ -3623,7 +3594,7 @@ droppeddeps=yes $echo $echo "*** Warning! Library $i is needed by this library but I was not able to" - $echo "*** make it link in! You will probably need to install it or some" + $echo "*** make it link in! You will probably need to install it or some" $echo "*** library that it depends on before this library will be fully" $echo "*** functional. Installing it before continuing would be even better." fi @@ -4268,14 +4239,12 @@ reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. + # -Wl from whole_archive_flag_spec wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" generated="$generated $gentop" @@ -4723,16 +4692,16 @@ case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` else - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` fi ;; * ) - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; esac ;; @@ -4747,13 +4716,13 @@ # really was required. # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. @@ -4840,7 +4809,7 @@ if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= @@ -4877,7 +4846,7 @@ fi done relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. @@ -5284,18 +5253,6 @@ Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi - # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @@ -5438,7 +5395,7 @@ ;; esac $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \$*\" + \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit $EXIT_FAILURE fi else @@ -5624,7 +5581,7 @@ done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi @@ -5969,9 +5926,9 @@ if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi $echo "$modename: warning: relinking \`$file'" 1>&2 @@ -6180,7 +6137,7 @@ file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` + relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : @@ -6456,15 +6413,12 @@ fi # Restore saved environment variables - for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - + if test "${save_LC_ALL+set}" = set; then + LC_ALL="$save_LC_ALL"; export LC_ALL + fi + if test "${save_LANG+set}" = set; then + LANG="$save_LANG"; export LANG + fi # Now prepare to actually exec the command. exec_cmd="\$cmd$args" @@ -6821,9 +6775,9 @@ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE + try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX - try to export only the symbols matching REGEX + try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened @@ -6837,11 +6791,9 @@ -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries + -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] + specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Index: configure.ac =================================================================== RCS file: /cvs/dirsec/ldapserver/configure.ac,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- configure.ac 9 Oct 2007 18:30:39 -0000 1.40 +++ configure.ac 18 Oct 2007 00:08:26 -0000 1.41 @@ -277,6 +277,7 @@ AC_DEFINE([OS_hpux], [1], [OS HP-UX]) AC_DEFINE([_POSIX_C_SOURCE], [199506L], [POSIX revision]) AC_DEFINE([_HPUX_SOURCE], [1], [Source namespace]) + AC_DEFINE([_XOPEN_SOURCE_EXTENDED], [1], [To use XOPEN getpeername]) # assume 64 bit perlexec='/opt/perl_64/bin/perl' platform="hpux" From fedora-directory-commits at redhat.com Thu Oct 18 00:08:29 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:29 -0400 Subject: [Fedora-directory-commits] ldapserver/include/ldaputil ldaputil.h, 1.5, 1.6 Message-ID: <200710180008.l9I08xYK026499@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/include/ldaputil In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/include/ldaputil Modified Files: ldaputil.h Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: ldaputil.h =================================================================== RCS file: /cvs/dirsec/ldapserver/include/ldaputil/ldaputil.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ldaputil.h 10 Nov 2006 23:44:25 -0000 1.5 +++ ldaputil.h 18 Oct 2007 00:08:27 -0000 1.6 @@ -141,7 +141,7 @@ #else LDAP* (LDAP_CALL LDAP_CALLBACK *ldapuV_init) ( const char*, int ); #endif - int (LDAP_CALL LDAP_CALLBACK *ldapuV_set_option) ( LDAP*, int, void* ); + int (LDAP_CALL LDAP_CALLBACK *ldapuV_set_option) ( LDAP*, int, const void* ); int (LDAP_CALL LDAP_CALLBACK *ldapuV_simple_bind_s) ( LDAP*, const char*, const char* ); int (LDAP_CALL LDAP_CALLBACK *ldapuV_unbind) ( LDAP* ); int (LDAP_CALL LDAP_CALLBACK *ldapuV_search_s) ( LDAP*, const char*, int, const char*, char**, int, LDAPMessage** ); From fedora-directory-commits at redhat.com Thu Oct 18 00:08:30 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:30 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl acl.c, 1.9, 1.10 acl_ext.c, 1.6, 1.7 acleffectiverights.c, 1.6, 1.7 aclinit.c, 1.6, 1.7 acllas.c, 1.7, 1.8 aclparse.c, 1.6, 1.7 aclutil.c, 1.7, 1.8 Message-ID: <200710180009.l9I090eL026504@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/acl Modified Files: acl.c acl_ext.c acleffectiverights.c aclinit.c acllas.c aclparse.c aclutil.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: acl.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acl.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- acl.c 4 Oct 2007 16:27:47 -0000 1.9 +++ acl.c 18 Oct 2007 00:08:27 -0000 1.10 @@ -244,7 +244,6 @@ int err; int ret_val; char *right; - int num_handle; struct acl_pblock *aclpb = NULL; AclAttrEval *c_attrEval = NULL; int got_reader_locked = 0; @@ -555,7 +554,7 @@ ** figure out if there are any ACLs which can be applied. ** If no ACLs are there, then it's a DENY as default. */ - if (!(num_handle = acl__scan_for_acis(aclpb, &err))) { + if (!(acl__scan_for_acis(aclpb, &err))) { /* We might have accessed the ACL first time which could ** have caused syntax error. @@ -782,7 +781,7 @@ } } else{ slapi_log_error(loglevel, plugin_name, - "conn=%d op=%d (%s): %s %s on entry(%s).attr(%s)" + "conn=%d op=%d (%s): %s %s on entry(%s).attr(%s) to %s" ": %s\n", op->o_connid, op->o_opid, source, @@ -790,6 +789,7 @@ right, edn, attr ? attr: "NULL", + real_user, acl_info[0] ? acl_info : access_reason); } @@ -2252,7 +2252,6 @@ Targetattrfilter *attrFilter = NULL; - int found_applicable = 0; Slapi_Attr *attr_ptr = NULL; Slapi_Value *sval; const struct berval *attrVal; @@ -2299,8 +2298,6 @@ * values in on the back of it. */ - found_applicable = 1; - sval=NULL; attrVal=NULL; k= slapi_attr_first_value(attr_ptr,&sval); @@ -2695,12 +2692,9 @@ char *testRights[2]; aci_t *aci; int numHandles = 0; - aclEvalContext *c_evalContext = NULL; TNF_PROBE_0_DEBUG(acl__TestRights_start,"ACL",""); - c_evalContext = &aclpb->aclpb_curr_entryEval_context; - /* record the aci and reason for access decision */ result_reason->deciding_aci = NULL; result_reason->reason = ACL_REASON_NONE; @@ -3931,7 +3925,7 @@ char *unused_str1, *unused_str2; char *acl_tag, *testRight[2]; int j, expr_num; - int result_status, rv, cache_result; + int result_status, cache_result; PRUint32 cookie; aci_t *aci; @@ -3992,7 +3986,7 @@ ACL_SetDefaultResult (NULL, aclpb->aclpb_acleval, ACL_RES_INVALID); - rv = ACL_EvalSetACL(NULL, aclpb->aclpb_acleval, aci->aci_handle); + ACL_EvalSetACL(NULL, aclpb->aclpb_acleval, aci->aci_handle); testRight[0] = acl_access2str ( access ); testRight[1] = '\0'; Index: acl_ext.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acl_ext.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- acl_ext.c 10 Nov 2006 23:44:49 -0000 1.6 +++ acl_ext.c 18 Oct 2007 00:08:27 -0000 1.7 @@ -43,11 +43,13 @@ #include "acl.h" static void acl__done_aclpb ( struct acl_pblock *aclpb ); +#ifdef FOR_DEBUGGING static void acl__dump_stats ( struct acl_pblock *aclpb , const char *block_type); +static char * acl__get_aclpb_type ( Acl_PBlock *aclpb ); +#endif static Acl_PBlock * acl__get_aclpb_from_pool ( ); static int acl__put_aclpb_back_to_pool ( Acl_PBlock *aclpb ); static Acl_PBlock * acl__malloc_aclpb ( ); -static char * acl__get_aclpb_type ( Acl_PBlock *aclpb ); static PRLock *aclext_get_lock (); @@ -788,7 +790,9 @@ } - /* acl__dump_stats ( aclpb, acl__get_aclpb_type(aclpb)); */ +#ifdef FOR_DEBUGGING + acl__dump_stats ( aclpb, acl__get_aclpb_type(aclpb)); +#endif /* reset the usergroup cache */ aclg_reset_userGroup ( aclpb ); @@ -956,15 +960,16 @@ } +#ifdef FOR_DEBUGGING static char * acl__get_aclpb_type ( Acl_PBlock *aclpb ) { - if (aclpb->aclpb_state & ACLPB_TYPE_PROXY) return ACLPB_TYPE_PROXY_STR; return ACLPB_TYPE_MAIN_STR; } + static void acl__dump_stats ( struct acl_pblock *aclpb , const char *block_type) { @@ -998,6 +1003,7 @@ aclpb->aclpb_stat_num_copy_attrs); slapi_log_error( SLAPI_LOG_ACL, plugin_name, " **** ACL OPERATION STAT END *******\n"); } +#endif /****************************************************************************/ /* E N D */ /****************************************************************************/ Index: acleffectiverights.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acleffectiverights.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- acleffectiverights.c 10 Nov 2006 23:44:49 -0000 1.6 +++ acleffectiverights.c 18 Oct 2007 00:08:27 -0000 1.7 @@ -663,7 +663,6 @@ char *gerstr = NULL; size_t gerstrsize = 0; size_t gerstrcap = 0; - unsigned long entryrights; int iscritical = 1; int rc; @@ -698,7 +697,7 @@ } /* Get entry level effective rights */ - entryrights = _ger_get_entry_rights ( gerpb, e, subjectndn, &gerstr, &gerstrsize, &gerstrcap, errbuf ); + _ger_get_entry_rights ( gerpb, e, subjectndn, &gerstr, &gerstrsize, &gerstrcap, errbuf ); /* * Attribute level effective rights may not be NULL Index: aclinit.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclinit.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- aclinit.c 10 Nov 2006 23:44:49 -0000 1.6 +++ aclinit.c 18 Oct 2007 00:08:27 -0000 1.7 @@ -232,7 +232,6 @@ /* Tell __aclinit_handler whether it's an add or a delete */ Slapi_PBlock *aPb; LDAPControl **ctrls=NULL; - int retval; struct berval *bval; aclinit_handler_callback_data_t call_back_data; @@ -273,7 +272,7 @@ ctrls[0] = NULL; ctrls[1] = NULL; - retval = slapi_build_control_from_berval( + slapi_build_control_from_berval( MTN_CONTROL_USE_ONE_BACKEND_OID, bval, 1 /* is critical */, Index: acllas.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acllas.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- acllas.c 10 Nov 2006 23:44:49 -0000 1.7 +++ acllas.c 18 Oct 2007 00:08:27 -0000 1.8 @@ -478,7 +478,6 @@ int matched; int rc; short len; - char *s = NULL; const size_t LDAP_URL_prefix_len = strlen(LDAP_URL_prefix); lasInfo lasinfo; int got_undefined = 0; @@ -579,9 +578,9 @@ } else { /* URL format */ - if ((s = strstr (user, ACL_RULE_MACRO_DN_KEY)) != NULL || - (s = strstr (user, ACL_RULE_MACRO_DN_LEVELS_KEY)) != NULL || - (s = strstr (user, ACL_RULE_MACRO_ATTR_KEY)) != NULL) { + if ((strstr (user, ACL_RULE_MACRO_DN_KEY) != NULL) || + (strstr (user, ACL_RULE_MACRO_DN_LEVELS_KEY) != NULL) || + (strstr (user, ACL_RULE_MACRO_ATTR_KEY) != NULL)) { matched = aclutil_evaluate_macro( s_user, &lasinfo, ACL_EVAL_USER); @@ -589,7 +588,7 @@ break; } - } else if ((s = strchr (user, '?'))!= NULL) { + } else if (strchr (user, '?') != NULL) { /* URL format */ if (acllas__client_match_URL ( lasinfo.aclpb, lasinfo.clientDn, s_user) == ACL_TRUE) { @@ -828,12 +827,9 @@ "Group not evaluated(%s)\n", groupName); break; } else { - char *s; - - if ((s = strstr (groupName, ACL_RULE_MACRO_DN_KEY)) != NULL || - (s = strstr (groupName, ACL_RULE_MACRO_DN_LEVELS_KEY)) != NULL || - (s = strstr (groupName, ACL_RULE_MACRO_ATTR_KEY)) != NULL) { - + if ((strstr (groupName, ACL_RULE_MACRO_DN_KEY) != NULL) || + (strstr (groupName, ACL_RULE_MACRO_DN_LEVELS_KEY) != NULL) || + (strstr (groupName, ACL_RULE_MACRO_ATTR_KEY) != NULL)) { matched = aclutil_evaluate_macro( groupName, &lasinfo, ACL_EVAL_GROUP); slapi_log_error ( SLAPI_LOG_ACL, plugin_name, @@ -993,12 +989,9 @@ } else { /* Take care of param strings */ - - char *s; - - if ((s = strstr (role, ACL_RULE_MACRO_DN_KEY)) != NULL || - (s = strstr (role, ACL_RULE_MACRO_DN_LEVELS_KEY)) != NULL || - (s = strstr (role, ACL_RULE_MACRO_ATTR_KEY)) != NULL) { + if ((strstr (role, ACL_RULE_MACRO_DN_KEY) != NULL) || + (strstr (role, ACL_RULE_MACRO_DN_LEVELS_KEY) != NULL) || + (strstr (role, ACL_RULE_MACRO_ATTR_KEY) != NULL)) { matched = aclutil_evaluate_macro( role, &lasinfo, ACL_EVAL_ROLE); @@ -1431,6 +1424,7 @@ } } +#ifdef FOR_DEBUGGING static void dump_eval_info (char *caller, struct eval_info *info, int idx) { @@ -1481,7 +1475,7 @@ slapi_log_error ( SLAPI_LOG_FATAL, NULL, "%s\n", buf ); } } - +#endif /*************************************************************************** * @@ -1611,7 +1605,9 @@ max_memberlimit = aclpb->aclpb_max_member_sizelimit; max_nestlevel = aclpb->aclpb_max_nesting_level; - /* dump_eval_info ( "acllas__user_ismember_of_group", &info, -1 ); */ +#ifdef FOR_DEBUGGING + dump_eval_info ( "acllas__user_ismember_of_group", &info, -1 ); +#endif eval_another_member: @@ -2101,14 +2097,12 @@ */ attrName = attr_pattern; if (strstr(attrName, LDAP_URL_prefix)) { - char *s; - /* In this case "grppupdnattr="ldap:///base??attr" */ - if ((s = strstr (attrName, ACL_RULE_MACRO_DN_KEY)) != NULL || - (s = strstr (attrName, ACL_RULE_MACRO_DN_LEVELS_KEY)) != NULL || - (s = strstr (attrName, ACL_RULE_MACRO_ATTR_KEY)) != NULL) { + if ((strstr (attrName, ACL_RULE_MACRO_DN_KEY) != NULL) || + (strstr (attrName, ACL_RULE_MACRO_DN_LEVELS_KEY) != NULL) || + (strstr (attrName, ACL_RULE_MACRO_ATTR_KEY) != NULL)) { matched = aclutil_evaluate_macro( attrName, &lasinfo, ACL_EVAL_GROUPDNATTR); @@ -3162,7 +3156,6 @@ Slapi_DN *roleDN, Slapi_DN *clientDn) { int present = 0; - int rc = 0; /* Get the client's entry if we don't have already */ if ( aclpb && ( NULL == aclpb->aclpb_client_entry )) { @@ -3202,7 +3195,7 @@ /* If the client has the role then it's a match, otherwise no */ - rc = slapi_role_check( aclpb->aclpb_client_entry, roleDN, &present); + slapi_role_check( aclpb->aclpb_client_entry, roleDN, &present); if ( present ) { return(ACL_TRUE); } @@ -3356,13 +3349,11 @@ char **tptr = NULL; char *t = NULL; char *s = NULL; - char *target_dn = NULL; struct acl_pblock *aclpb = lasinfo->aclpb; - int found_matched_val_in_ht = 0; aci = lasinfo->aclpb->aclpb_curr_aci; /* Get a pointer to the ndn in the resouirce */ - target_dn = slapi_entry_get_ndn ( lasinfo->resourceEntry ); + slapi_entry_get_ndn ( lasinfo->resourceEntry ); /* * First, get the matched value from the target resource. @@ -3395,8 +3386,6 @@ "ACL info: found matched_val (%s) for aci index %d" "in macro ht\n", aci->aclName, aci->aci_index,0); - - found_matched_val_in_ht = 1; } } @@ -3740,14 +3729,10 @@ acllas_eval_one_user( struct acl_pblock *aclpb, char * clientDN, char *rule) { int exact_match = 0; - int ret_code = 0; const size_t LDAP_URL_prefix_len = strlen(LDAP_URL_prefix); - char *s = NULL; - - /* URL format */ - if ((s = strchr (rule, '?'))!= NULL) { + if (strchr (rule, '?') != NULL) { /* URL format */ if (acllas__client_match_URL ( aclpb, clientDN, rule) == ACL_TRUE) { @@ -3763,7 +3748,7 @@ /* Here, contains a =*, so need to match comp by comp */ /* skip the ldap:/// part */ rule += LDAP_URL_prefix_len; - ret_code = acl_match_prefix( rule, clientDN, &exact_match); + acl_match_prefix( rule, clientDN, &exact_match); } if ( exact_match) { return( ACL_TRUE); Index: aclparse.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclparse.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- aclparse.c 10 Nov 2006 23:44:49 -0000 1.6 +++ aclparse.c 18 Oct 2007 00:08:27 -0000 1.7 @@ -1768,7 +1768,7 @@ static int process_filter_list( Targetattrfilter ***input_attrFilterArray, char * input_str) { - char *str, *end_attr, *tmp_attr; + char *str, *end_attr; Targetattrfilter *attrfilter = NULL; int numattr=0; Targetattrfilter **attrFilterArray = NULL; @@ -1801,7 +1801,7 @@ attrfilter = (Targetattrfilter *) slapi_ch_malloc (sizeof (Targetattrfilter)); memset (attrfilter, 0, sizeof(Targetattrfilter)); - if ((tmp_attr = strstr( str,":")) != NULL) { + if (strstr( str,":") != NULL) { if ( __acl_init_targetattrfilter( attrfilter, str ) != 0 ) { slapi_ch_free((void**)&attrfilter); Index: aclutil.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclutil.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- aclutil.c 10 Nov 2006 23:44:49 -0000 1.7 +++ aclutil.c 18 Oct 2007 00:08:27 -0000 1.8 @@ -57,7 +57,9 @@ static PRIntn acl_ht_free_entry_and_value(PLHashEntry *he, PRIntn i, void *arg); static PLHashNumber acl_ht_hash( const void *key); +#ifdef FOR_DEBUGGING static PRIntn acl_ht_display_entry(PLHashEntry *he, PRIntn i, void *arg); +#endif /***************************************************************************/ /* UTILITY FUNCTIONS */ @@ -664,7 +666,6 @@ char *macro_suffix = NULL; char *tmp_ptr = NULL; char *matched_val = NULL; - char *ndn_suffix_start = NULL; char *ret_val = NULL; int ndn_len = 0; int macro_suffix_len = 0; @@ -717,9 +718,6 @@ } } - /* Start of the suffix in ndn...and it matched. */ - ndn_suffix_start = (char*)&ndn[ndn_len-macro_suffix_len]; - /* Here, macro_suffix is a suffix of ndn. * * @@ -1374,11 +1372,12 @@ /* Free all the values in the ht */ void acl_ht_display_ht( acl_ht_t *acl_ht) { -#ifdef DEBUG +#ifdef FOR_DEBUGGING PL_HashTableEnumerateEntries( acl_ht, acl_ht_display_entry, NULL); #endif } +#ifdef FOR_DEBUGGING static PRIntn acl_ht_display_entry(PLHashEntry *he, PRIntn i, void *arg) { @@ -1393,6 +1392,7 @@ return HT_ENUMERATE_NEXT; } +#endif /* remove this entry from the ht--doesn't free the value.*/ void acl_ht_remove( acl_ht_t *acl_ht, PLHashNumber key) { From fedora-directory-commits at redhat.com Thu Oct 18 00:08:30 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:30 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/bitwise bitwise.c, 1.1, 1.2 Message-ID: <200710180009.l9I090YX026511@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/bitwise In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/bitwise Modified Files: bitwise.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: bitwise.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/bitwise/bitwise.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- bitwise.c 16 May 2007 19:45:25 -0000 1.1 +++ bitwise.c 18 Oct 2007 00:08:28 -0000 1.2 @@ -81,7 +81,7 @@ slapi_ch_free((void **)&bmc); } -static int +static void bitwise_filter_destroy(Slapi_PBlock* pb) { void *obj = NULL; From fedora-directory-commits at redhat.com Thu Oct 18 00:08:30 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:30 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/cos cos_cache.c, 1.8, 1.9 Message-ID: <200710180009.l9I090nX026519@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/cos In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/cos Modified Files: cos_cache.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: cos_cache.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/cos/cos_cache.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- cos_cache.c 12 Oct 2007 18:03:43 -0000 1.8 +++ cos_cache.c 18 Oct 2007 00:08:28 -0000 1.9 @@ -284,7 +284,6 @@ /* cosAttrValue manipulation */ static int cos_cache_add_attrval(cosAttrValue **attrval, char *val); static void cos_cache_del_attrval_list(cosAttrValue **pVal); -static int cos_cache_attrval_count(cosAttrValue *pVal); static int cos_cache_attrval_exists(cosAttrValue *pAttrs, const char *val); /* cosAttributes manipulation */ @@ -298,18 +297,12 @@ /* cosTemplates manipulation */ static int cos_cache_add_dn_tmpls(char *dn, cosAttrValue *pCosSpecifier, cosAttrValue *pAttrs, cosTemplates **pTmpls); static int cos_cache_add_tmpl(cosTemplates **pTemplates, cosAttrValue *dn, cosAttrValue *objclasses, cosAttrValue *pCosSpecifier, cosAttributes *pAttrs,cosAttrValue *cosPriority); -#if 0 -static int cos_cache_del_tmpl(cosTemplates *pTemplates, char *dn); -#endif /* cosDefinitions manipulation */ static int cos_cache_build_definition_list(cosDefinitions **pDefs, int *vattr_cacheable); static int cos_cache_add_dn_defs(char *dn, cosDefinitions **pDefs, int *vattr_cacheable); static int cos_cache_add_defn(cosDefinitions **pDefs, cosAttrValue **dn, int cosType, cosAttrValue **tree, cosAttrValue **tmpDn, cosAttrValue **spec, cosAttrValue **pAttrs, cosAttrValue **pOverrides, cosAttrValue **pOperational, cosAttrValue **pCosMerge, cosAttrValue **pCosOpDefault); static int cos_cache_entry_is_cos_related( Slapi_Entry *e); -#if 0 -static int cos_cache_del_defn(cosDefinitions *pDefs, char *dn); -#endif /* schema checking */ static int cos_cache_schema_check(cosCache *pCache, int cache_attr_index, Slapi_Attr *pObjclasses); @@ -332,8 +325,6 @@ static int cos_cache_vattr_compare(vattr_sp_handle *handle, vattr_context *c, Slapi_Entry *e, char *type, Slapi_Value *test_this, int* result, int flags, void *hint); static int cos_cache_vattr_types(vattr_sp_handle *handle,Slapi_Entry *e,vattr_type_list_context *type_context,int flags); static int cos_cache_query_attr(cos_cache *ptheCache, vattr_context *context, Slapi_Entry *e, char *type, Slapi_ValueSet **out_attr, Slapi_Value *test_this, int *result, int *ops); -static void cos_cache_query_attr_free(struct berval ***vals); /* deprecated */ - /* compares s2 to s1 starting from end of string until the beginning of either @@ -344,7 +335,6 @@ /* module level thread control stuff */ -static PRThread *cos_tid = NULL; static int keeprunning = 0; static int started = 0; @@ -411,18 +401,18 @@ goto out; } - if ((cos_tid = PR_CreateThread (PR_USER_THREAD, + if ( PR_CreateThread (PR_USER_THREAD, cos_cache_wait_on_change, NULL, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_UNJOINABLE_THREAD, - SLAPD_DEFAULT_THREAD_STACKSIZE)) == NULL ) + SLAPD_DEFAULT_THREAD_STACKSIZE) == NULL ) { slapi_log_error( SLAPI_LOG_FATAL, COS_PLUGIN_SUBSYSTEM, "cos_cache_init: PR_CreateThread failed\n" ); ret = -1; - goto out; + goto out; } /* wait for that thread to get started */ @@ -794,14 +784,6 @@ int valIndex = 0; Slapi_Attr *dnAttr; char *attrType = 0; - char *attrs[7]; - - attrs[0] = "objectclass"; - attrs[1] = "cosTargetTree"; - attrs[2] = "cosTemplateDn"; - attrs[3] = "cosSpecifier"; - attrs[4] = "cosAttribute"; - attrs[5] = 0; info=(struct dn_defs_info *)callback_data; @@ -849,7 +831,6 @@ */ if(pSneakyVal == &pCosAttribute) { - cosAttrValue *pTmpTargetTree = 0; int qualifier_hit = 0; int op_qualifier_hit = 0; int merge_schemes_qualifier_hit = 0; @@ -935,8 +916,6 @@ slapi_ch_free((void**)&parent); } - pTmpTargetTree = pCosTargetTree; - slapi_vattrspi_regattr((vattr_sp_handle *)vattr_handle, dnVals[valIndex]->bv_val, NULL, NULL); } /* if(attrType is cosAttribute) */ @@ -1821,27 +1800,6 @@ return ret; } -/* - cos_cache_attrval_count - ----------------------- - counts the number of values in the list -*/ - -static int cos_cache_attrval_count(cosAttrValue *pVal) -{ - int ret = 0; - - LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_attrval_count\n",0,0,0); - - while(pVal) - { - ret++; - pVal = pVal->list.pNext; - } - - LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_attrval_count\n",0,0,0); - return ret; -} /* cos_cache_del_attr_list @@ -1875,7 +1833,6 @@ static void cos_cache_del_schema(cosCache *pCache) { char *pLastName = 0; - cosAttrValue *pLastRef = 0; int attr_index = 0; LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_del_schema\n",0,0,0); @@ -1883,7 +1840,6 @@ if(pCache && pCache->attrCount && pCache->ppAttrIndex) { pLastName = pCache->ppAttrIndex[0]->pAttrName; - pLastRef = pCache->ppAttrIndex[0]->pObjectclasses; for(attr_index=1; attr_indexattrCount; attr_index++) { @@ -2578,25 +2534,6 @@ } /* - cos_cache_query_attr_free - ------------------------- - frees the memory allocated for the data returned - by cos_cache_query_attr -*/ -static void cos_cache_query_attr_free(struct berval ***vals) -{ - int index = 0; - - while((*vals)[index]) - { - slapi_ch_free((void**)&((*vals)[index])); - index++; - } - - slapi_ch_free((void**)*vals); -} - -/* cos_cache_find_attr ------------------- searches for the attribute "type", and if found returns the index @@ -3006,19 +2943,6 @@ } -/* - cos_cache_XXX_compare - --------------------- - this set of functions are passed to sorting and searching - functions to provide an ordering comparison between to structures -*/ -#if 0 -int cos_cache_attrval_compare(const void *e1, const void *e2) -{ - return slapi_utf8casecmp((unsigned char*)(*(cosAttrValue**)e1)->val,(unsigned char*)(*(cosAttrValue**)e2)->val); -} -#endif - static int cos_cache_attr_compare(const void *e1, const void *e2) { int com_Result; @@ -3045,13 +2969,6 @@ return com_Result; } -#if 0 -int cos_cache_tmpl_compare(const void *e1, const void *e2) -{ - return slapi_utf8casecmp((unsigned char*)(*(cosTemplates**)e1)->cosGrade,(unsigned char*)(*(cosTemplates**)e2)->cosGrade); -} -#endif - static int cos_cache_string_compare(const void *e1, const void *e2) { return slapi_utf8casecmp((*(unsigned char**)e1),(*(unsigned char**)e2)); From fedora-directory-commits at redhat.com Thu Oct 18 00:08:30 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:30 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/chainingdb cb_conn_stateless.c, 1.6, 1.7 cb_instance.c, 1.7, 1.8 cb_test.c, 1.6, 1.7 Message-ID: <200710180009.l9I090eq026515@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/chainingdb Modified Files: cb_conn_stateless.c cb_instance.c cb_test.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: cb_conn_stateless.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb/cb_conn_stateless.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- cb_conn_stateless.c 10 Nov 2006 23:44:50 -0000 1.6 +++ cb_conn_stateless.c 18 Oct 2007 00:08:28 -0000 1.7 @@ -886,141 +886,6 @@ } - -/**************************************************************************/ -/* Need to use our own connect function until we've switched to C-SDK 4.1 */ -/* to have a timeout in the connect system call. */ -/**************************************************************************/ - -static int global_connect_to; - -#if 0 - -/* Taken from C-SDK 4.1 */ -#include -#include -#define LDAP_X_IO_TIMEOUT_NO_TIMEOUT (-1) - -static int -nsldapi_os_connect_with_to(LBER_SOCKET sockfd, struct sockaddr *saptr, - int salen) -{ -#ifndef _WIN32 - int flags; -#endif /* _WIN32 */ - int n, error; - int len; - fd_set rset, wset; - struct timeval tval; -#ifdef _WIN32 - int nonblock = 1; - int block = 0; - fd_set eset; -#endif /* _WIN32 */ - - int msec=global_connect_to; /* global */ - -#ifdef _WIN32 - ioctlsocket(sockfd, FIONBIO, &nonblock); -#else - flags = fcntl(sockfd, F_GETFL, 0); - fcntl(sockfd, F_SETFL, flags | O_NONBLOCK); -#endif /* _WIN32 */ - - error = 0; - if ((n = connect(sockfd, saptr, salen)) < 0) -#ifdef _WIN32 - if ((n != SOCKET_ERROR) && (WSAGetLastError() != WSAEWOULDBLOCK)) { -#else - if (errno != EINPROGRESS) { -#endif /* _WIN32 */ - return (-1); - } - - /* success */ - if (n == 0) - goto done; - - FD_ZERO(&rset); - FD_SET(sockfd, &rset); - wset = rset; - -#ifdef _WIN32 - eset = rset; -#endif /* _WIN32 */ - - if (msec < 0 && msec != LDAP_X_IO_TIMEOUT_NO_TIMEOUT) { - msec = LDAP_X_IO_TIMEOUT_NO_TIMEOUT; - } else { - if (msec != 0) - tval.tv_sec = msec / 1000; - else - tval.tv_sec = 0; - tval.tv_usec = 0; - } - - /* if timeval structure == NULL, select will block indefinitely */ - /* != NULL, and value == 0, select will */ - /* not block */ - /* Windows is a bit quirky on how it behaves w.r.t nonblocking */ - /* connects. If the connect fails, the exception fd, eset, is */ - /* set to show the failure. The first argument in select is */ - /* ignored */ - -#ifdef _WIN32 - if ((n = select(sockfd +1, &rset, &wset, &eset, - (msec != LDAP_X_IO_TIMEOUT_NO_TIMEOUT) ? &tval : NULL)) == 0) { - errno = WSAETIMEDOUT; - return (-1); - } - /* if wset is set, the connect worked */ - if (FD_ISSET(sockfd, &wset) || FD_ISSET(sockfd, &rset)) { - len = sizeof(error); - if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (char *)&error, &len) - < 0) - return (-1); - goto done; - } - - /* if eset is set, the connect failed */ - if (FD_ISSET(sockfd, &eset)) { - return (-1); - } - - /* failure on select call */ - if (n == SOCKET_ERROR) { - return (-1); - } -#else - if ((n = select(sockfd +1, &rset, &wset, NULL, - (msec != LDAP_X_IO_TIMEOUT_NO_TIMEOUT) ? &tval : NULL)) == 0) { - errno = ETIMEDOUT; - return (-1); - } - if (FD_ISSET(sockfd, &rset) || FD_ISSET(sockfd, &wset)) { - len = sizeof(error); - if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (char *)&error, &len) - < 0) - return (-1); - } -#endif /* _WIN32 */ -done: -#ifdef _WIN32 - ioctlsocket(sockfd, FIONBIO, &block); -#else - fcntl(sockfd, F_SETFL, flags); -#endif /* _WIN32 */ - - if (error) { - errno = error; - return (-1); - } - - return (0); -} - -#endif - /* Try to figure out if a farm server is still alive */ int cb_ping_farm(cb_backend_instance *cb, cb_outgoing_conn * cnx,time_t end_time) { @@ -1030,9 +895,6 @@ struct timeval timeout; LDAP *ld; LDAPMessage *result; -#if 0 - struct ldap_io_fns iof; -#endif time_t now; if (cb->max_idle_time <=0) /* Heart-beat disabled */ return LDAP_SUCCESS; @@ -1049,27 +911,9 @@ return LDAP_SERVER_DOWN; } -#if 0 - memset(&iof,0,sizeof(struct ldap_io_fns)); - if (LDAP_SUCCESS !=ldap_get_option(ld,LDAP_OPT_IO_FN_PTRS,&iof)) { - slapi_ldap_unbind( ld ); - cb_update_failed_conn_cpt( cb ); - return LDAP_SERVER_DOWN; - } - - iof.liof_connect = nsldapi_os_connect_with_to; - if (LDAP_SUCCESS !=ldap_set_option(ld,LDAP_OPT_IO_FN_PTRS,&iof)) { - slapi_ldap_unbind( ld ); - cb_update_failed_conn_cpt( cb ); - return LDAP_SERVER_DOWN; - } - -#endif - timeout.tv_sec=cb->max_test_time; timeout.tv_usec=0; - global_connect_to=cb->max_test_time * 1000; /* Reuse the same for the connect */ rc=ldap_search_ext_s(ld ,NULL,LDAP_SCOPE_BASE,"objectclass=*",attrs,1,NULL, NULL, &timeout, 1,&result); if ( LDAP_SUCCESS != rc ) { @@ -1122,7 +966,6 @@ int cb_check_availability( cb_backend_instance *cb, Slapi_PBlock *pb ) { /* check wether the farmserver is available or not */ - int rc ; time_t now ; if ( cb->monitor_availability.farmserver_state == FARMSERVER_UNAVAILABLE ){ slapi_lock_mutex(cb->monitor_availability.lock_timeLimit); @@ -1138,7 +981,7 @@ } slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM, "cb_check_availability: ping the farm server and check if it's still unavailable"); - if ((rc = cb_ping_farm(cb, NULL, 0)) != LDAP_SUCCESS) { /* farm still unavailable... Just change the timelimit */ + if (cb_ping_farm(cb, NULL, 0) != LDAP_SUCCESS) { /* farm still unavailable... Just change the timelimit */ slapi_lock_mutex(cb->monitor_availability.lock_timeLimit); now = current_time(); cb->monitor_availability.unavailableTimeLimit = now + CB_UNAVAILABLE_PERIOD ; Index: cb_instance.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb/cb_instance.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- cb_instance.c 10 Nov 2006 23:44:50 -0000 1.7 +++ cb_instance.c 18 Oct 2007 00:08:28 -0000 1.8 @@ -716,8 +716,6 @@ if (apply) { - char * ptr; - PR_RWLock_Wlock(inst->rwl_config_lock); if (( phase != CB_CONFIG_PHASE_INITIALIZATION ) && @@ -771,7 +769,7 @@ while (aHostName) { char * aHostPort; - if ( NULL == ( ptr=strstr(aHostName,":"))) { + if ( NULL == strstr(aHostName,":")) { aHostPort = slapi_ch_smprintf("%s://%s:%d/", inst->pool->secure ? "ldaps" : "ldap", aHostName,inst->pool->port); Index: cb_test.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb/cb_test.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- cb_test.c 10 Nov 2006 23:44:50 -0000 1.6 +++ cb_test.c 18 Oct 2007 00:08:28 -0000 1.7 @@ -46,7 +46,7 @@ { Slapi_Backend * be; - cb_backend * cb; + cb_backend * cb; cb_backend_instance * inst; Slapi_PBlock * apb; int res; @@ -56,9 +56,9 @@ char * theTarget; - slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &cb ); - slapi_pblock_get( pb, SLAPI_BACKEND, &be ); - inst = cb_get_instance(be); + slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &cb ); + slapi_pblock_get( pb, SLAPI_BACKEND, &be ); + inst = cb_get_instance(be); apb = slapi_pblock_new(); /* @@ -70,16 +70,16 @@ printf("Begin test instance %s.\n",inst->inst_name); - aSuffix = slapi_be_getsuffix(be,0); - aSuffixString=slapi_sdn_get_dn(aSuffix); - /* Remove leading white spaces */ - for (aSuffixString; *aSuffixString==' ';aSuffixString++) {} + aSuffix = slapi_be_getsuffix(be,0); + /* Remove leading white spaces */ + for (aSuffixString=slapi_sdn_get_dn(aSuffix); + *aSuffixString==' '; aSuffixString++) {} theTarget=slapi_ch_smprintf("cn=test,%s",aSuffixString); /* XXXSD make sure chaining allowed for this plugin... */ - slapi_search_internal_set_pb (apb, theTarget, LDAP_SCOPE_BASE, "objectclass=*", NULL, 0, NULL, NULL, + slapi_search_internal_set_pb (apb, theTarget, LDAP_SCOPE_BASE, "objectclass=*", NULL, 0, NULL, NULL, cb->identity,0 ); - slapi_search_internal_pb (apb); + slapi_search_internal_pb (apb); slapi_ch_free((void **)&theTarget); @@ -91,22 +91,22 @@ slapi_pblock_get(apb, SLAPI_PLUGIN_INTOP_RESULT, &res); /* OPERATIONS ERRORS also returned when bind failed */ - if (CB_LDAP_CONN_ERROR(res) || (res==LDAP_OPERATIONS_ERROR )) - { + if (CB_LDAP_CONN_ERROR(res) || (res==LDAP_OPERATIONS_ERROR )) + { printf("Can't contact the remote farm server %s. (%s).\n",inst->pool->hostname,ldap_err2string(res)); rc=-1; goto the_end; - } else { + } else { printf("Connection established with the remote farm server %s.\n",inst->pool->hostname); } the_end: - if (apb) - { - slapi_free_search_results_internal(apb); - slapi_pblock_destroy (apb); - } - - return rc; + if (apb) + { + slapi_free_search_results_internal(apb); + slapi_pblock_destroy (apb); + } + + return rc; } From fedora-directory-commits at redhat.com Thu Oct 18 00:08:32 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:32 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/dna dna.c, 1.1, 1.2 Message-ID: <200710180009.l9I092BN026522@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/dna In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/dna Modified Files: dna.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: dna.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/dna/dna.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- dna.c 31 Jan 2007 22:49:25 -0000 1.1 +++ dna.c 18 Oct 2007 00:08:28 -0000 1.2 @@ -962,8 +962,8 @@ e, config_entry->type); if((value && !slapi_utf8casecmp( - config_entry->generate, - value)) || + (unsigned char *)config_entry->generate, + (unsigned char *)value)) || 0 == value) { generate = 1; @@ -996,8 +996,8 @@ if(len == bv->bv_len) { if(!slapi_utf8ncasecmp( - bv->bv_val, - config_entry-> + (unsigned char *)bv->bv_val, + (unsigned char *)config_entry-> generate, len)) @@ -1128,7 +1128,6 @@ loadPluginConfig(); } -bail: slapi_log_error( SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM , "<-- dna_config_check_post_op\n"); return 0; @@ -1165,11 +1164,14 @@ void dnaDumpConfigEntry(configEntry *entry) { + char buffer[BUFSIZ]; + size_t bufsiz = (size_t)sizeof(buffer); printf("<- type --------------> %s\n", entry->type); printf("<---- prefix ---------> %s\n", entry->prefix); printf("<---- next value -----> %lu\n", entry->nextval); printf("<---- interval -------> %lu\n", entry->interval); - printf("<---- filter ---------> %s\n", entry->filter); + printf("<---- filter ---------> %s\n", + slapi_filter_to_string_internal((const struct slapi_filter *)entry->filter, buffer, &bufsiz)); printf("<---- generate flag --> %s\n", entry->generate); } From fedora-directory-commits at redhat.com Thu Oct 18 00:08:32 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:32 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/http http_impl.c, 1.10, 1.11 Message-ID: <200710180009.l9I092sN026525@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/http In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/http Modified Files: http_impl.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: http_impl.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/http/http_impl.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- http_impl.c 10 Nov 2006 23:45:02 -0000 1.10 +++ http_impl.c 18 Oct 2007 00:08:30 -0000 1.11 @@ -57,6 +57,7 @@ #include "http_client.h" #include "secerr.h" #include "sslerr.h" +#include "slap.h" #include "slapi-private.h" #include "slapi-plugin-compat4.h" /* get file mode flags for unix */ From fedora-directory-commits at redhat.com Thu Oct 18 00:08:33 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:33 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/pwdstorage md5_pwd.c, 1.2, 1.3 Message-ID: <200710180009.l9I0937o026537@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/pwdstorage In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/pwdstorage Modified Files: md5_pwd.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: md5_pwd.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/pwdstorage/md5_pwd.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- md5_pwd.c 10 Nov 2006 23:45:10 -0000 1.2 +++ md5_pwd.c 18 Oct 2007 00:08:30 -0000 1.3 @@ -76,14 +76,14 @@ /* create the hash */ PK11_DigestBegin(ctx); - PK11_DigestOp(ctx, userpwd, strlen(userpwd)); + PK11_DigestOp(ctx, (const unsigned char *)userpwd, strlen(userpwd)); PK11_DigestFinal(ctx, hash_out, &outLen, sizeof hash_out); PK11_DestroyContext(ctx, 1); /* convert the binary hash to base64 */ binary_item.data = hash_out; binary_item.len = outLen; - bver = NSSBase64_EncodeItem(NULL, b2a_out, sizeof b2a_out, &binary_item); + bver = NSSBase64_EncodeItem(NULL, (char *)b2a_out, sizeof b2a_out, &binary_item); /* bver points to b2a_out upon success */ if (bver) { rc = strcmp(bver,dbpwd); @@ -114,14 +114,14 @@ /* create the hash */ PK11_DigestBegin(ctx); - PK11_DigestOp(ctx, pwd, strlen(pwd)); + PK11_DigestOp(ctx, (const unsigned char *)pwd, strlen(pwd)); PK11_DigestFinal(ctx, hash_out, &outLen, sizeof hash_out); PK11_DestroyContext(ctx, 1); /* convert the binary hash to base64 */ binary_item.data = hash_out; binary_item.len = outLen; - bver = NSSBase64_EncodeItem(NULL, b2a_out, sizeof b2a_out, &binary_item); + bver = NSSBase64_EncodeItem(NULL, (char *)b2a_out, sizeof b2a_out, &binary_item); if (bver) { enc = slapi_ch_smprintf("%c%s%c%s", PWD_HASH_PREFIX_START, MD5_SCHEME_NAME, PWD_HASH_PREFIX_END, bver ); From fedora-directory-commits at redhat.com Thu Oct 18 00:08:32 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:32 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/pam_passthru pam_ptconfig.c, 1.9, 1.10 pam_ptimpl.c, 1.10, 1.11 Message-ID: <200710180009.l9I092gI026534@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/pam_passthru In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/pam_passthru Modified Files: pam_ptconfig.c pam_ptimpl.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: pam_ptconfig.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/pam_passthru/pam_ptconfig.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- pam_ptconfig.c 15 Mar 2007 18:21:37 -0000 1.9 +++ pam_ptconfig.c 18 Oct 2007 00:08:30 -0000 1.10 @@ -231,7 +231,6 @@ parse_map_method(char *map_method, int *one, int *two, int *three, char *returntext) { int err = LDAP_SUCCESS; - int extra; char **ptr = &map_method; *one = *two = *three = PAMPT_MAP_METHOD_NONE; @@ -256,7 +255,7 @@ "one of %s", map_method, get_map_method_values()); return LDAP_UNWILLING_TO_PERFORM; } - if (((extra = meth_to_int(ptr, &err)) != PAMPT_MAP_METHOD_NONE) || + if ((meth_to_int(ptr, &err) != PAMPT_MAP_METHOD_NONE) || err) { PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Invalid extra text [%s] after last map method", Index: pam_ptimpl.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/pam_passthru/pam_ptimpl.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- pam_ptimpl.c 10 Nov 2006 23:45:03 -0000 1.10 +++ pam_ptimpl.c 18 Oct 2007 00:08:30 -0000 1.11 @@ -177,7 +177,7 @@ * tell if this is actually the case. */ static int -pam_conv_func(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *mydata) +pam_conv_func(int num_msg, struct pam_message **msg, struct pam_response **resp, void *mydata) { int ii; struct berval *creds; From fedora-directory-commits at redhat.com Thu Oct 18 00:08:33 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:33 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/referint referint.c, 1.6, 1.7 Message-ID: <200710180009.l9I093lL026540@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/referint In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/referint Modified Files: referint.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: referint.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/referint/referint.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- referint.c 10 Nov 2006 23:45:11 -0000 1.6 +++ referint.c 18 Oct 2007 00:08:31 -0000 1.7 @@ -537,19 +537,20 @@ keeprunning_cv = PR_NewCondVar(keeprunning_mutex); keeprunning =1; - if (( referint_tid = PR_CreateThread (PR_USER_THREAD, + referint_tid = PR_CreateThread (PR_USER_THREAD, referint_thread_func, (void *)argv, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_UNJOINABLE_THREAD, - SLAPD_DEFAULT_THREAD_STACKSIZE)) == NULL ) { + SLAPD_DEFAULT_THREAD_STACKSIZE); + if ( referint_tid == NULL ) { slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM, "referint_postop_start PR_CreateThread failed\n" ); exit( 1 ); - } + } } - } else { + } else { slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM, "referint_postop_start insufficient arguments supplied\n" ); return( -1 ); @@ -818,11 +819,10 @@ " line length exceeded. It will not be able" " to update references to this entry.\n"); }else{ - PRInt32 rv; PR_snprintf(buffer, MAX_LINE, "%s\t%s\t\n", dn, (newrdn != NULL) ? newrdn : "NULL"); - if ((rv = PR_Write(prfd,buffer,strlen(buffer))) < 0){ + if (PR_Write(prfd,buffer,strlen(buffer)) < 0){ slapi_log_error(SLAPI_LOG_FATAL,REFERINT_PLUGIN_SUBSYSTEM, " writeintegritylog: PR_Write failed : The disk" " may be full or the file is unwritable :: NSPR error - %d\n", From fedora-directory-commits at redhat.com Thu Oct 18 00:08:34 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:34 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication cl5_api.c, 1.18, 1.19 cl5_config.c, 1.7, 1.8 repl5_connection.c, 1.7, 1.8 repl5_inc_protocol.c, 1.10, 1.11 repl5_plugins.c, 1.8, 1.9 repl5_replica.c, 1.14, 1.15 repl5_total.c, 1.9, 1.10 repl_controls.c, 1.8, 1.9 repl_extop.c, 1.11, 1.12 repl_monitor.c, 1.6, 1.7 replutil.c, 1.10, 1.11 windows_connection.c, 1.17, 1.18 windows_inc_protocol.c, 1.14, 1.15 windows_private.c, 1.16, 1.17 windows_protocol_util.c, 1.36, 1.37 windows_tot_protocol.c, 1.11, 1.12 Message-ID: <200710180009.l9I094tt026545@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/replication Modified Files: cl5_api.c cl5_config.c repl5_connection.c repl5_inc_protocol.c repl5_plugins.c repl5_replica.c repl5_total.c repl_controls.c repl_extop.c repl_monitor.c replutil.c windows_connection.c windows_inc_protocol.c windows_private.c windows_protocol_util.c windows_tot_protocol.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: cl5_api.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/cl5_api.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- cl5_api.c 16 Oct 2007 21:22:47 -0000 1.18 +++ cl5_api.c 18 Oct 2007 00:08:31 -0000 1.19 @@ -348,7 +348,9 @@ static int _cl5WriteBervals (struct berval **bv, char** buff, unsigned int *size); /* replay iteration */ +#ifdef FOR_DEBUGGING static PRBool _cl5ValidReplayIterator (const CL5ReplayIterator *iterator); +#endif static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const RUV *consumerRuv, Object *replica, Object *fileObject, CL5ReplayIterator **iterator); static int _cl5CheckMissingCSN (const CSN *minCsn, const RUV *supplierRUV, CL5DBFile *file); @@ -3766,7 +3768,6 @@ /* must be called under the state lock */ static void _cl5Close () { - int rc2 = 0; PRIntervalTime interval; if (s_cl5Desc.dbState != CL5_STATE_CLOSED) /* Don't try to close twice */ @@ -3792,7 +3793,7 @@ if (s_cl5Desc.dbEnv) { DB_ENV *dbEnv = s_cl5Desc.dbEnv; - rc2 = dbEnv->close(dbEnv, 0); + dbEnv->close(dbEnv, 0); s_cl5Desc.dbEnv = NULL; } @@ -5596,6 +5597,7 @@ return retval; } +#ifdef FOR_DEBUGGING /* Replay iteration helper functions */ static PRBool _cl5ValidReplayIterator (const CL5ReplayIterator *iterator) { @@ -5606,6 +5608,7 @@ return PR_TRUE; } +#endif /* Algorithm: ONREPL!!! */ @@ -5628,7 +5631,6 @@ int rc = CL5_SUCCESS; Object *supplierRuvObj = NULL; RUV *supplierRuv = NULL; - ReplicaId supplierRID; PRBool newReplica; PRBool haveChanges = PR_FALSE; char *agmt_name; @@ -5638,7 +5640,6 @@ csnStr[0] = '\0'; file = (CL5DBFile*)object_get_data (fileObj); - supplierRID = replica_get_rid((Replica*)object_get_data(replica)); /* get supplier's RUV */ supplierRuvObj = replica_get_ruv((Replica*)object_get_data(replica)); Index: cl5_config.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/cl5_config.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- cl5_config.c 16 Oct 2007 21:22:47 -0000 1.7 +++ cl5_config.c 18 Oct 2007 00:08:31 -0000 1.8 @@ -330,7 +330,7 @@ slapi_ch_free_string(&config.maxAge); config.maxAge = slapi_ch_strdup(CL5_STR_IGNORE); config.dbconfig.maxChCacheEntries = 0; - config.dbconfig.maxChCacheSize = CL5_NUM_IGNORE; + config.dbconfig.maxChCacheSize = (PRUint32)CL5_NUM_IGNORE; slapi_pblock_get( pb, SLAPI_MODIFY_MODS, &mods ); for (i = 0; mods[i] != NULL; i++) @@ -438,7 +438,7 @@ } if (config.dbconfig.maxChCacheEntries == 0) config.dbconfig.maxChCacheEntries = originalConfig->dbconfig.maxChCacheEntries; - if (config.dbconfig.maxChCacheSize == CL5_NUM_IGNORE) + if (config.dbconfig.maxChCacheSize == (PRUint32)CL5_NUM_IGNORE) config.dbconfig.maxChCacheSize = originalConfig->dbconfig.maxChCacheSize; @@ -567,7 +567,7 @@ } } - if (config.dbconfig.maxChCacheEntries != 0 || config.dbconfig.maxChCacheSize != CL5_NUM_IGNORE) + if (config.dbconfig.maxChCacheEntries != 0 || config.dbconfig.maxChCacheSize != (PRUint32)CL5_NUM_IGNORE) clcache_set_config(&config.dbconfig); done:; Index: repl5_connection.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_connection.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- repl5_connection.c 10 Nov 2006 23:45:17 -0000 1.7 +++ repl5_connection.c 18 Oct 2007 00:08:31 -0000 1.8 @@ -471,7 +471,6 @@ LDAPControl *server_controls[3]; /* LDAPControl **loc_returned_controls; */ const char *op_string = NULL; - const char *extra_op_string = NULL; int msgid = 0; server_controls[0] = &manageDSAITControl; @@ -562,7 +561,6 @@ case CONN_EXTENDED_OPERATION: conn->status = STATUS_PROCESSING_EXTENDED_OPERATION; op_string = "extended"; - extra_op_string = extop_oid; rc = ldap_extended_operation(conn->ld, extop_oid, extop_payload, server_controls, NULL /* clientctls */, &msgid); } @@ -864,7 +862,6 @@ ConnResult conn_connect(Repl_Connection *conn) { - int ldap_rc; int optdata; int secure = 0; char* binddn = NULL; @@ -1012,7 +1009,7 @@ } else { - conn->last_ldap_error = ldap_rc = LDAP_SUCCESS; + conn->last_ldap_error = LDAP_SUCCESS; conn->state = STATE_CONNECTED; return_value = CONN_OPERATION_SUCCESS; } @@ -1028,7 +1025,7 @@ close_connection_internal(conn); } else { - conn->last_ldap_error = ldap_rc = LDAP_SUCCESS; + conn->last_ldap_error = LDAP_SUCCESS; conn->state = STATE_CONNECTED; } @@ -1698,6 +1695,7 @@ } } +#ifdef FOR_DEBUGGING static time_t PRTime2time_t (PRTime tm) { @@ -1709,6 +1707,7 @@ return (time_t)rt; } +#endif static Slapi_Eq_Context repl5_start_debug_timeout(int *setlevel) Index: repl5_inc_protocol.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_inc_protocol.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- repl5_inc_protocol.c 10 Nov 2006 23:45:17 -0000 1.10 +++ repl5_inc_protocol.c 18 Oct 2007 00:08:31 -0000 1.11 @@ -598,8 +598,6 @@ int wait_change_timer_set = 0; time_t last_start_time; PRUint32 num_changes_sent; - char *hostname = NULL; - int portnum = 0; /* use a different backoff timer strategy for ACQUIRE_REPLICA_BUSY errors */ PRBool use_busy_backoff_timer = PR_FALSE; long pausetime = 0; @@ -607,8 +605,6 @@ prp->stopped = 0; prp->terminate = 0; - hostname = agmt_get_hostname(prp->agmt); - portnum = agmt_get_port(prp->agmt); /* establish_protocol_callbacks(prp); */ done = 0; @@ -1264,7 +1260,6 @@ current_state = next_state; } while (!done); - slapi_ch_free((void**)&hostname); /* remove_protocol_callbacks(prp); */ prp->stopped = 1; /* Cancel any linger timer that might be in effect... */ Index: repl5_plugins.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_plugins.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- repl5_plugins.c 12 Sep 2007 00:59:53 -0000 1.8 +++ repl5_plugins.c 18 Oct 2007 00:08:31 -0000 1.9 @@ -86,7 +86,6 @@ static PRBool process_operation (Slapi_PBlock *pb, const CSN *csn); static PRBool is_mmr_replica (Slapi_PBlock *pb); static const char *replica_get_purl_for_op (const Replica *r, Slapi_PBlock *pb, const CSN *opcsn); -static void strip_legacy_info (slapi_operation_parameters *op_params); /* * XXXggood - what to do if both ssl and non-ssl ports available? How @@ -695,12 +694,10 @@ Slapi_Operation *op; int is_replicated_operation; int is_fixup_operation; - int is_legacy_operation; slapi_pblock_get(pb, SLAPI_OPERATION, &op); is_replicated_operation= operation_is_flag_set(op,OP_FLAG_REPLICATED); is_fixup_operation= operation_is_flag_set(op,OP_FLAG_REPL_FIXUP); - is_legacy_operation= operation_is_flag_set(op,OP_FLAG_LEGACY_REPLICATION_DN); /* For replicated operations, apply URP algorithm */ if (is_replicated_operation && !is_fixup_operation) @@ -718,12 +715,10 @@ Slapi_Operation *op; int is_replicated_operation; int is_fixup_operation; - int is_legacy_operation; slapi_pblock_get(pb, SLAPI_OPERATION, &op); is_replicated_operation= operation_is_flag_set(op,OP_FLAG_REPLICATED); is_fixup_operation= operation_is_flag_set(op,OP_FLAG_REPL_FIXUP); - is_legacy_operation= operation_is_flag_set(op,OP_FLAG_LEGACY_REPLICATION_DN); /* For replicated operations, apply URP algorithm */ if(is_replicated_operation && !is_fixup_operation) @@ -741,12 +736,10 @@ Slapi_Operation *op; int is_replicated_operation; int is_fixup_operation; - int is_legacy_operation; slapi_pblock_get(pb, SLAPI_OPERATION, &op); is_replicated_operation= operation_is_flag_set(op,OP_FLAG_REPLICATED); is_fixup_operation= operation_is_flag_set(op,OP_FLAG_REPL_FIXUP); - is_legacy_operation= operation_is_flag_set(op,OP_FLAG_LEGACY_REPLICATION_DN); /* For replicated operations, apply URP algorithm */ if(is_replicated_operation && !is_fixup_operation) @@ -767,12 +760,10 @@ Slapi_Operation *op; int is_replicated_operation; int is_fixup_operation; - int is_legacy_operation; slapi_pblock_get(pb, SLAPI_OPERATION, &op); is_replicated_operation= operation_is_flag_set(op,OP_FLAG_REPLICATED); is_fixup_operation= operation_is_flag_set(op,OP_FLAG_REPL_FIXUP); - is_legacy_operation= operation_is_flag_set(op,OP_FLAG_LEGACY_REPLICATION_DN); /* For replicated operations, apply URP algorithm */ if(is_replicated_operation && !is_fixup_operation) @@ -1341,6 +1332,7 @@ return purl; } +#ifdef NOTUSED /* ONREPL at the moment, I decided not to trim copiedFrom and copyingFrom attributes when sending operation to replicas. This is because, each operation results in a state information stored in the database and @@ -1385,6 +1377,7 @@ default: break; } } +#endif /* this function is called when state of a backend changes */ void @@ -1432,9 +1425,12 @@ object_release (r_obj); } +#ifdef NOTUSED +/* Keeping the function just in case */ static void close_changelog_for_replica (Object *r_obj) { if (cl5GetState () == CL5_STATE_OPEN) cl5CloseDB (r_obj); } +#endif Index: repl5_replica.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_replica.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- repl5_replica.c 10 Nov 2006 23:45:17 -0000 1.14 +++ repl5_replica.c 18 Oct 2007 00:08:31 -0000 1.15 @@ -3230,7 +3230,6 @@ char *current_purl = NULL; char *p_locking_purl = NULL; char *locking_purl = NULL; - int junkrc; ReplicaId junkrid; PRBool isInc = PR_FALSE; /* get exclusive access, but not for inc update */ RUV *repl_ruv = NULL; @@ -3255,7 +3254,7 @@ from a supplier */ repl_ruv = (RUV*) object_get_data (r->repl_ruv); - junkrc = ruv_get_first_id_and_purl(repl_ruv, &junkrid, &p_locking_purl); + ruv_get_first_id_and_purl(repl_ruv, &junkrid, &p_locking_purl); locking_purl = slapi_ch_strdup(p_locking_purl); p_locking_purl = NULL; repl_ruv = NULL; Index: repl5_total.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_total.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- repl5_total.c 10 Nov 2006 23:45:17 -0000 1.9 +++ repl5_total.c 18 Oct 2007 00:08:31 -0000 1.10 @@ -634,7 +634,7 @@ /* The "attribute deleted" flag is next, and is optional */ if (ber_peek_tag(ber, &len) == LBER_BOOLEAN) { - if (ber_scanf(ber, "b", deleted) == -1) + if (ber_scanf(ber, "b", deleted) == LBER_DEFAULT) { goto loser; } Index: repl_controls.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl_controls.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- repl_controls.c 10 Nov 2006 23:45:17 -0000 1.8 +++ repl_controls.c 18 Oct 2007 00:08:31 -0000 1.9 @@ -229,7 +229,7 @@ if (ber_peek_tag(tmp_bere, &len) == LBER_OCTETSTRING) { /* The optional superior_uuid is present */ - if (ber_scanf(tmp_bere, "o", &superior_uuid_val) == -1) + if (ber_scanf(tmp_bere, "o", &superior_uuid_val) == LBER_DEFAULT) { rc = -1; goto loser; Index: repl_extop.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl_extop.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- repl_extop.c 10 Nov 2006 23:45:17 -0000 1.11 +++ repl_extop.c 18 Oct 2007 00:08:31 -0000 1.12 @@ -110,7 +110,6 @@ struct berval *req_data = NULL; BerElement *tmp_bere = NULL; int rc = 0; - const char *csnstr = NULL; Object *repl_obj, *ruv_obj = NULL; Replica *repl; RUV *ruv; @@ -203,7 +202,7 @@ } /* Add the CSN */ PR_ASSERT(NULL != csn); - if (ber_printf(tmp_bere, "s", csnstr = csn_as_string(csn,PR_FALSE,s)) == -1) + if (ber_printf(tmp_bere, "s", csn_as_string(csn,PR_FALSE,s)) == -1) { rc = LDAP_ENCODING_ERROR; goto loser; @@ -274,7 +273,7 @@ PR_ASSERT (ber && ruv); - if (ber_scanf(ber, "[V]", &bvals) == -1) + if (ber_scanf(ber, "[V]", &bvals) == LBER_DEFAULT) { goto done; } @@ -339,12 +338,12 @@ goto free_and_return; } /* Get the required protocol OID and root of replicated subtree */ - if (ber_get_stringa(tmp_bere, protocol_oid) == -1) + if (ber_get_stringa(tmp_bere, protocol_oid) == LBER_DEFAULT) { rc = -1; goto free_and_return; } - if (ber_get_stringa(tmp_bere, repl_root) == -1) + if (ber_get_stringa(tmp_bere, repl_root) == LBER_DEFAULT) { rc = -1; goto free_and_return; @@ -439,18 +438,18 @@ rc = -1; goto free_and_return; } - if (ber_scanf(tmp_bere, "{") == -1) + if (ber_scanf(tmp_bere, "{") == LBER_DEFAULT) { rc = -1; goto free_and_return; } /* Get the required root of replicated subtree */ - if (ber_get_stringa(tmp_bere, repl_root) == -1) + if (ber_get_stringa(tmp_bere, repl_root) == LBER_DEFAULT) { rc = -1; goto free_and_return; } - if (ber_scanf(tmp_bere, "}") == -1) + if (ber_scanf(tmp_bere, "}") == LBER_DEFAULT) { rc = -1; goto free_and_return; @@ -494,7 +493,6 @@ else { ber_len_t len; - ber_tag_t tag = 0; ber_int_t temp_response_code = 0; *ruv_bervals = NULL; if ((tmp_bere = ber_init(data)) == NULL) @@ -505,7 +503,7 @@ { return_value = -1; } - else if ((tag = ber_peek_tag(tmp_bere, &len)) == LBER_SEQUENCE) + else if (ber_peek_tag(tmp_bere, &len) == LBER_SEQUENCE) { if (ber_scanf(tmp_bere, "{V}}", ruv_bervals) == LBER_ERROR) { @@ -1034,7 +1032,6 @@ ber_int_t response; void *conn; consumer_connection_extension *connext = NULL; - int rc; int connid=-1, opid=-1; /* Decode the extended operation */ @@ -1092,7 +1089,7 @@ if (cl5GetState () == CL5_STATE_OPEN) { - rc = cl5DeleteDBSync (connext->replica_acquired); + cl5DeleteDBSync (connext->replica_acquired); } replica_set_ruv (r, connext->supplier_ruv); @@ -1140,7 +1137,6 @@ /* Send the response code */ if ((resp_bere = der_alloc()) == NULL) { - rc = LDAP_ENCODING_ERROR; goto free_and_return; } ber_printf(resp_bere, "{e}", response); Index: repl_monitor.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl_monitor.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- repl_monitor.c 10 Nov 2006 23:45:17 -0000 1.6 +++ repl_monitor.c 18 Oct 2007 00:08:31 -0000 1.7 @@ -46,8 +46,10 @@ #include "repl.h" #include "slapi-plugin.h" +#ifdef FOR_40_STYLE_CHANGELOG /* Forward Declartions */ static int repl_monitor_search (Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry* entryAfter, int *returncode, char *returntext, void *arg); +#endif int repl_monitor_init() @@ -58,14 +60,17 @@ if (!initialized) { - /* ONREPL - this is commented until we implement 4.0 style changelog - slapi_config_register_callback(SLAPI_OPERATION_SEARCH,DSE_FLAG_PREOP,"cn=monitor",LDAP_SCOPE_BASE,"(objectclass=*)",repl_monitor_search,NULL); */ +#ifdef FOR_40_STYLE_CHANGELOG + /* ONREPL - this is commented until we implement 4.0 style changelog */ + slapi_config_register_callback(SLAPI_OPERATION_SEARCH,DSE_FLAG_PREOP,"cn=monitor",LDAP_SCOPE_BASE,"(objectclass=*)",repl_monitor_search,NULL); +#endif initialized = 1; } return return_value; } +#ifdef FOR_40_STYLE_CHANGELOG static int repl_monitor_search(Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry* entryAfter, int *returncode, char *returntext, void *arg) { @@ -93,4 +98,5 @@ } return SLAPI_DSE_CALLBACK_OK; } +#endif Index: replutil.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/replutil.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- replutil.c 11 Jun 2007 17:22:37 -0000 1.10 +++ replutil.c 18 Oct 2007 00:08:31 -0000 1.11 @@ -824,7 +824,6 @@ int local_backend = -1; /* index of local backend */ int chaining_backend = -1; /* index of chain backend */ PRBool local_online = PR_FALSE; /* true if the local db is online */ - PRBool chain_online = PR_FALSE; /* true if the chain db is online */ int ii; int opid; #ifdef DEBUG_CHAIN_ON_UPDATE @@ -850,10 +849,6 @@ if (slapi_be_is_flag_set(be,SLAPI_BE_FLAG_REMOTE_DATA)) { chaining_backend = ii; - if (mtn_be_states[ii] == SLAPI_BE_STATE_ON) - { - chain_online = PR_TRUE; - } } else { Index: windows_connection.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_connection.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- windows_connection.c 27 Sep 2007 18:33:30 -0000 1.17 +++ windows_connection.c 18 Oct 2007 00:08:31 -0000 1.18 @@ -601,7 +601,6 @@ ConnResult return_value = 0; int ldap_rc = 0; LDAPMessage *res = NULL; - int not_unique = 0; int nummessages = 0; int numentries = 0; int numreferences = 0; @@ -635,10 +634,7 @@ /* See if there are any more entries : if so then that's an error * but we still need to get them to avoid gumming up the connection */ - while (NULL != ( message = ldap_next_entry(conn->ld,message))) - { - not_unique = 1; - } + while (NULL != ( message = ldap_next_entry(conn->ld,message))) ; return_value = CONN_OPERATION_SUCCESS; } else if (IS_DISCONNECT_ERROR(ldap_rc)) @@ -838,9 +834,8 @@ { LDAPControl **returned_controls = NULL; int code = 0; - int parse_rc = 0; /* Purify says this is a leak : */ - parse_rc = ldap_parse_result( conn->ld, res, &code, NULL, NULL, NULL, &returned_controls, 0 ); + ldap_parse_result( conn->ld, res, &code, NULL, NULL, NULL, &returned_controls, 0 ); if (returned_controls) { windows_private_update_dirsync_control(conn->agmt, returned_controls); @@ -1096,7 +1091,6 @@ ConnResult windows_conn_connect(Repl_Connection *conn) { - int ldap_rc; int optdata; int secure = 0; char* binddn = NULL; @@ -1252,7 +1246,7 @@ } else { - conn->last_ldap_error = ldap_rc = LDAP_SUCCESS; + conn->last_ldap_error = LDAP_SUCCESS; conn->state = STATE_CONNECTED; return_value = CONN_OPERATION_SUCCESS; } @@ -1291,7 +1285,7 @@ close_connection_internal(conn); } else { - conn->last_ldap_error = ldap_rc = LDAP_SUCCESS; + conn->last_ldap_error = LDAP_SUCCESS; conn->state = STATE_CONNECTED; } @@ -1863,22 +1857,6 @@ } -static time_t -PRTime2time_t (PRTime tm) -{ - PRInt64 rt; - - LDAPDebug( LDAP_DEBUG_TRACE, "=> PRTime2time_t\n", 0, 0, 0 ); - - PR_ASSERT (tm); - - LL_DIV(rt, tm, PR_USEC_PER_SEC); - - LDAPDebug( LDAP_DEBUG_TRACE, "<= PRTime2time_t\n", 0, 0, 0 ); - - return (time_t)rt; -} - static Slapi_Eq_Context repl5_start_debug_timeout(int *setlevel) { Index: windows_inc_protocol.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_inc_protocol.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- windows_inc_protocol.c 26 Sep 2007 05:43:34 -0000 1.14 +++ windows_inc_protocol.c 18 Oct 2007 00:08:31 -0000 1.15 @@ -277,8 +277,6 @@ int wait_change_timer_set = 0; time_t last_start_time = 0; PRUint32 num_changes_sent = 0; - char *hostname = NULL; - int portnum = 0; /* use a different backoff timer strategy for ACQUIRE_REPLICA_BUSY errors */ PRBool use_busy_backoff_timer = PR_FALSE; long pausetime = 0; @@ -292,8 +290,6 @@ prp->stopped = 0; prp->terminate = 0; - hostname = agmt_get_hostname(prp->agmt); - portnum = agmt_get_port(prp->agmt); windows_private_load_dirsync_cookie(prp->agmt); @@ -970,7 +966,6 @@ current_state = next_state; } while (!done); - slapi_ch_free((void**)&hostname); /* remove_protocol_callbacks(prp); */ prp->stopped = 1; /* Cancel any linger timer that might be in effect... */ Index: windows_private.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_private.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- windows_private.c 17 Sep 2007 19:18:30 -0000 1.16 +++ windows_private.c 18 Oct 2007 00:08:31 -0000 1.17 @@ -554,7 +554,9 @@ ber_int_t hasMoreData; ber_int_t maxAttributeCount; BerValue *serverCookie; +#ifdef FOR_DEBUGGING int return_value = LDAP_SUCCESS; +#endif LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_private_update_dirsync_control\n", 0, 0, 0 ); @@ -572,7 +574,9 @@ if ( !foundDirsyncControl ) { +#ifdef FOR_DEBUGGING return_value = LDAP_CONTROL_NOT_FOUND; +#endif goto choke; } else @@ -584,7 +588,9 @@ if (ber_scanf( ber, "{iiO}", &hasMoreData, &maxAttributeCount, &serverCookie) == LBER_ERROR) { +#ifdef FOR_DEBUGGING return_value = LDAP_CONTROL_NOT_FOUND; +#endif goto choke; } @@ -603,12 +609,16 @@ } else { +#ifdef FOR_DEBUGGING return_value = LDAP_CONTROL_NOT_FOUND; +#endif } - +#ifdef FOR_DEBUGGING + LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_private_update_dirsync_control: rc=%d\n", return_value, 0, 0 ); +#else LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_private_update_dirsync_control\n", 0, 0, 0 ); - /* return return_value; */ +#endif } PRBool windows_private_dirsync_has_more(const Repl_Agmt *ra) Index: windows_protocol_util.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_protocol_util.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- windows_protocol_util.c 16 Oct 2007 20:17:37 -0000 1.36 +++ windows_protocol_util.c 18 Oct 2007 00:08:31 -0000 1.37 @@ -58,12 +58,10 @@ int ruv_private_new( RUV **ruv, RUV *clone ); - +#ifdef FOR_DEBUGGING static Slapi_Entry* windows_entry_already_exists(Slapi_Entry *e); -static void windows_dirsync_now (Private_Repl_Protocol *prp); -static Slapi_DN* map_dn_user(Slapi_DN *sdn, int map_to, const Slapi_DN *root); -static Slapi_DN* map_dn_group(Slapi_DN *sdn, int map_to, const Slapi_DN *root); -static void make_mods_from_entries(Slapi_Entry *new_entry, Slapi_Entry *existing_entry, LDAPMod ***attrs); +static void extract_guid_from_entry_bv(Slapi_Entry *e, const struct berval **bv); +#endif static void windows_map_mods_for_replay(Private_Repl_Protocol *prp,LDAPMod **original_mods, LDAPMod ***returned_mods, int is_user, char** password); static int is_subject_of_agreement_local(const Slapi_Entry *local_entry,const Repl_Agmt *ra); static int windows_create_remote_entry(Private_Repl_Protocol *prp,Slapi_Entry *original_entry, Slapi_DN *remote_sdn, Slapi_Entry **remote_entry, char** password); @@ -395,6 +393,9 @@ original_dn_string = slapi_value_get_string(original_value); /* Sanity check the data was a valid string */ original_dn_string_length = slapi_value_get_length(original_value); + if (0 == original_dn_string_length) { + slapi_log_error(SLAPI_LOG_REPL, NULL, "map_dn_values: length of dn is 0\n"); + } /* Make a sdn from the string */ original_dn = slapi_sdn_new_dn_byref(original_dn_string); if (to_windows) @@ -1098,9 +1099,10 @@ } } else { - Slapi_Entry *remote_entry = NULL; + Slapi_Entry *remote_entry; modify_fallback: + remote_entry = NULL; /* Fetch the remote entry */ rc = windows_get_remote_entry(prp, remote_dn,&remote_entry); if (0 == rc && remote_entry) { @@ -1605,6 +1607,7 @@ return retval; } +#ifdef FOR_DEBUGGING /* the entry has already been translated, so be sure to search for ntuserid and not samaccountname or anything else. */ @@ -1632,6 +1635,7 @@ } } +#endif static int windows_delete_local_entry(Slapi_DN *sdn){ @@ -1740,13 +1744,12 @@ */ if (0 == slapi_attr_type_cmp(mapped_type, "streetAddress", SLAPI_TYPE_CMP_SUBTYPE)) { Slapi_Mod smod; - struct berval *new_bval = NULL; slapi_mod_init_byref(&smod,mod); /* Check if there is more than one value */ if (slapi_mod_get_num_values(&smod) > 1) { - new_bval = slapi_mod_get_first_value(&smod); + slapi_mod_get_first_value(&smod); /* Remove all values except for the first */ while (slapi_mod_get_next_value(&smod)) { /* This modifies the bvalues in the mod itself */ @@ -2315,6 +2318,7 @@ return guid; } +#ifdef FOR_DEBUGGING static void extract_guid_from_entry_bv(Slapi_Entry *e, const struct berval **bv) { @@ -2330,6 +2334,7 @@ } } } +#endif static char* extract_username_from_entry(Slapi_Entry *e) Index: windows_tot_protocol.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_tot_protocol.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- windows_tot_protocol.c 26 Sep 2007 05:43:34 -0000 1.11 +++ windows_tot_protocol.c 18 Oct 2007 00:08:31 -0000 1.12 @@ -70,8 +70,8 @@ Private_Repl_Protocol *prp; int rc; unsigned long num_entries; - time_t sleep_on_busy; - time_t last_busy; + time_t sleep_on_busy; /* not used ??? */ + time_t last_busy; /* not used ??? */ } callback_data; /* @@ -100,8 +100,6 @@ callback_data cb_data; Slapi_PBlock *pb; const char* dn; - CSN *remote_schema_csn = NULL; - PRBool cookie_has_more = PR_TRUE; RUV *ruv = NULL; RUV *starting_ruv = NULL; Replica *replica = NULL; @@ -143,7 +141,6 @@ } agmt_set_last_init_status(prp->agmt, 0, 0, "Total schema update in progress"); - remote_schema_csn = agmt_get_consumer_schema_csn ( prp->agmt ); agmt_set_last_init_status(prp->agmt, 0, 0, "Total update in progress"); @@ -154,7 +151,6 @@ /* get everything */ windows_dirsync_inc_run(prp); - cookie_has_more = windows_private_dirsync_has_more(prp->agmt); windows_private_save_dirsync_cookie(prp->agmt); @@ -350,10 +346,7 @@ { int rc; Private_Repl_Protocol *prp; - unsigned long *num_entriesp; - time_t *sleep_on_busyp; - time_t *last_busyp; LDAPDebug( LDAP_DEBUG_TRACE, "=> send_entry\n", 0, 0, 0 ); @@ -361,8 +354,6 @@ prp = ((callback_data*)cb_data)->prp; num_entriesp = &((callback_data *)cb_data)->num_entries; - sleep_on_busyp = &((callback_data *)cb_data)->sleep_on_busy; - last_busyp = &((callback_data *)cb_data)->last_busy; PR_ASSERT (prp); if (prp->terminate) From fedora-directory-commits at redhat.com Thu Oct 18 00:08:34 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:34 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/retrocl retrocl_trim.c, 1.7, 1.8 Message-ID: <200710180009.l9I094O5026561@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/retrocl In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/retrocl Modified Files: retrocl_trim.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: retrocl_trim.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/retrocl/retrocl_trim.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- retrocl_trim.c 10 Nov 2006 23:45:18 -0000 1.7 +++ retrocl_trim.c 18 Oct 2007 00:08:32 -0000 1.8 @@ -363,7 +363,6 @@ void retrocl_housekeeping ( time_t cur_time, void *noarg ) { - static time_t thread_start_time; int ldrc; if (retrocl_be_changelog == NULL) { @@ -402,7 +401,6 @@ if ( must_trim ) { LDAPDebug(LDAP_DEBUG_TRACE,"changelog about to create thread\n",0,0,0); /* Start a thread to trim the changelog */ - thread_start_time = cur_time; ts.ts_s_trimming = 1; if ( PR_CreateThread( PR_USER_THREAD, changelog_trim_thread_fn, NULL, From fedora-directory-commits at redhat.com Thu Oct 18 00:08:34 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:34 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/shared utils.c, 1.6, 1.7 Message-ID: <200710180009.l9I094f4026564@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/shared In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/shared Modified Files: utils.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: utils.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/shared/utils.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- utils.c 10 Nov 2006 23:45:30 -0000 1.6 +++ utils.c 18 Oct 2007 00:08:32 -0000 1.7 @@ -97,7 +97,6 @@ Slapi_PBlock * readPblockAndEntry( const char *baseDN, const char *filter, char *attrs[] ) { - int result = 0; Slapi_PBlock *spb = NULL; BEGIN @@ -107,15 +106,15 @@ spb = slapi_search_internal((char *)baseDN, LDAP_SCOPE_BASE, (char *)filter, NULL, attrs, 0); if ( !spb ) { - result = op_error(20); + op_error(20); break; } if ( slapi_pblock_get( spb, SLAPI_PLUGIN_INTOP_RESULT, &sres ) ) { - result = op_error(21); + op_error(21); break; } else if (sres) { - result = op_error(22); + op_error(22); break; } END @@ -166,7 +165,6 @@ */ Slapi_PBlock * dnHasObjectClass( const char *baseDN, const char *objectClass ) { - int result = 0; char *filter = NULL; Slapi_PBlock *spb = NULL; @@ -184,7 +182,7 @@ if ( slapi_pblock_get(spb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries) ) { - result = op_error(23); + op_error(23); break; } /* @@ -213,7 +211,6 @@ */ Slapi_PBlock * dnHasAttribute( const char *baseDN, const char *attrName ) { - int result = 0; Slapi_PBlock *spb = NULL; char *filter = NULL; @@ -229,21 +226,21 @@ spb = slapi_search_internal((char *)baseDN, LDAP_SCOPE_BASE, filter, NULL, attrs, 0); if ( !spb ) { - result = op_error(20); + op_error(20); break; } if ( slapi_pblock_get( spb, SLAPI_PLUGIN_INTOP_RESULT, &sres ) ) { - result = op_error(21); + op_error(21); break; } else if (sres) { - result = op_error(22); + op_error(22); break; } if ( slapi_pblock_get(spb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries) ) { - result = op_error(23); + op_error(23); break; } /* From fedora-directory-commits at redhat.com Thu Oct 18 00:08:36 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:36 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/views views.c, 1.10, 1.11 Message-ID: <200710180009.l9I096AC026567@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/views In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/views Modified Files: views.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: views.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/views/views.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- views.c 12 Oct 2007 16:53:02 -0000 1.10 +++ views.c 18 Oct 2007 00:08:32 -0000 1.11 @@ -1202,12 +1202,8 @@ struct berval **dnVals; Slapi_Attr *dnAttr; char *attrType = 0; - char *attrs[3]; viewEntry *pView; - - attrs[0] = VIEW_FILTER_ATTR; - attrs[1] = "entryid"; - attrs[2] = 0; + info=(struct dn_views_info *)callback_data; info->ret = 0; From fedora-directory-commits at redhat.com Thu Oct 18 00:08:36 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:36 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd add.c, 1.10, 1.11 auditlog.c, 1.6, 1.7 bind.c, 1.10, 1.11 compare.c, 1.6, 1.7 connection.c, 1.17, 1.18 conntable.c, 1.8, 1.9 daemon.c, 1.16, 1.17 defbackend.c, 1.5, 1.6 delete.c, 1.7, 1.8 dse.c, 1.7, 1.8 dynalib.c, 1.7, 1.8 entry.c, 1.13, 1.14 errormap.c, 1.6, 1.7 getopt_ext.c, 1.5, 1.6 index_subsystem.c, 1.6, 1.7 log.c, 1.18, 1.19 main.c, 1.21, 1.22 mapping_tree.c, 1.11, 1.12 match.c, 1.6, 1.7 modify.c, 1.15, 1.16 modrdn.c, 1.8, 1.9 opshared.c, 1.10, 1.11 passwd_extop.c, 1.15, 1.16 plugin_internal_op.c, 1.8, 1.9 protect_db.c, 1.11, 1.12 proto-slap.h, 1.29, 1.30 pw.c, 1.16, 1.17 pw_mgmt.c, 1.9, 1.10 result.c, 1.11, 1.12 sasl_io.c, 1.12, 1.13 search.c, 1.7, 1.8 slap.h, 1.28, 1.29 slapi-private.h, 1.18, 1.19 snmp_collator.c, 1.10, 1.11 ssl.c, 1.14, 1.15 task.c, 1.13, 1.14 uuid.c, 1.10, 1.11 Message-ID: <200710180009.l9I0961V026573@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/slapd Modified Files: add.c auditlog.c bind.c compare.c connection.c conntable.c daemon.c defbackend.c delete.c dse.c dynalib.c entry.c errormap.c getopt_ext.c index_subsystem.c log.c main.c mapping_tree.c match.c modify.c modrdn.c opshared.c passwd_extop.c plugin_internal_op.c protect_db.c proto-slap.h pw.c pw_mgmt.c result.c sasl_io.c search.c slap.h slapi-private.h snmp_collator.c ssl.c task.c uuid.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: add.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/add.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- add.c 10 Nov 2006 23:45:40 -0000 1.10 +++ add.c 18 Oct 2007 00:08:34 -0000 1.11 @@ -93,7 +93,7 @@ ber = operation->o_ber; /* count the add request */ - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsAddEntryOps); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsAddEntryOps); /* * Parse the add request. It looks like this: Index: auditlog.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/auditlog.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- auditlog.c 10 Nov 2006 23:45:40 -0000 1.6 +++ auditlog.c 18 Oct 2007 00:08:34 -0000 1.7 @@ -66,7 +66,6 @@ char *dn; void *change; int flag = 0; - int internal_op = 0; Operation *op; /* if the audit log is not enabled, just skip all of @@ -76,7 +75,6 @@ } slapi_pblock_get( pb, SLAPI_OPERATION, &op ); - internal_op = operation_is_flag_set(op, OP_FLAG_INTERNAL); slapi_pblock_get( pb, SLAPI_TARGET_DN, &dn ); switch ( operation_get_type(op) ) { Index: bind.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/bind.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- bind.c 27 Feb 2007 02:57:29 -0000 1.10 +++ bind.c 18 Oct 2007 00:08:34 -0000 1.11 @@ -335,7 +335,7 @@ * All SASL auth methods are categorized as strong binds, * although they are not necessarily stronger than simple. */ - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsStrongAuthBinds); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsStrongAuthBinds); if ( saslmech == NULL || *saslmech == '\0' ) { send_ldap_result( pb, LDAP_AUTH_METHOD_NOT_SUPPORTED, NULL, "SASL mechanism absent", 0, NULL ); @@ -407,13 +407,13 @@ } break; case LDAP_AUTH_SIMPLE: - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsSimpleAuthBinds); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsSimpleAuthBinds); /* accept null binds */ if (dn == NULL || *dn == '\0') { - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsAnonymousBinds); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsAnonymousBinds); /* by definition its anonymous is also UnAuthenticated so increment that counter */ - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsUnAuthBinds); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsUnAuthBinds); /* call preop plugins */ if (plugin_call_plugins( pb, SLAPI_PLUGIN_PRE_BIND_FN ) == 0){ @@ -439,7 +439,7 @@ if ( isroot && method == LDAP_AUTH_SIMPLE ) { if ( cred.bv_len == 0 ) { /* unauthenticated bind */ - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsUnAuthBinds); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsUnAuthBinds); } else { /* a passwd was supplied -- check it */ @@ -457,7 +457,7 @@ send_ldap_result( pb, LDAP_INVALID_CREDENTIALS, NULL, NULL, 0, NULL ); /* increment BindSecurityErrorcount */ - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsBindSecurityErrors); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsBindSecurityErrors); value_done(&cv); goto free_and_return; } @@ -601,11 +601,11 @@ if(cred.bv_len == 0) { /* its an UnAuthenticated Bind, DN specified but no pw */ - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsUnAuthBinds); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsUnAuthBinds); }else{ /* password must have been invalid */ /* increment BindSecurityError count */ - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsBindSecurityErrors); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsBindSecurityErrors); } } Index: compare.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/compare.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- compare.c 10 Nov 2006 23:45:40 -0000 1.6 +++ compare.c 18 Oct 2007 00:08:34 -0000 1.7 @@ -77,7 +77,7 @@ LDAPDebug( LDAP_DEBUG_TRACE, "do_compare\n", 0, 0, 0 ); /* count the compare request */ - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsCompareOps); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsCompareOps); /* have to init this here so we can "done" it below if we short circuit */ slapi_sdn_init(&sdn); Index: connection.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/connection.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- connection.c 20 Sep 2007 16:54:38 -0000 1.17 +++ connection.c 18 Oct 2007 00:08:34 -0000 1.18 @@ -222,8 +222,8 @@ PR_Unlock( num_conns_mutex ); if (! in_referral_mode) { - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsConnectionSeq); - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsConnections); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsConnectionSeq); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsConnections); } /* @@ -823,7 +823,7 @@ if (! config_check_referral_mode()) { PR_AtomicIncrement(&ops_initiated); - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsInOps); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsInOps); } if ( (tag = ber_get_int( op->o_ber, &msgid )) @@ -1920,10 +1920,9 @@ */ void connection_find_our_rank(Connection *conn,int *connection_count, int *our_rank) { - int ret = 0; table_iterate_info info = {0}; info.our_rate = conn->c_private->operation_rate; - ret = connection_table_iterate_active_connections(the_connection_table, &info, &table_iterate_function); + connection_table_iterate_active_connections(the_connection_table, &info, &table_iterate_function); *connection_count = info.connection_count; *our_rank = info.rank_count; } @@ -2060,7 +2059,7 @@ PR_Unlock(conn->c_mutex); if (! config_check_referral_mode()) { PR_AtomicIncrement(&ops_initiated); - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsInOps); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsInOps); } } /* Once we're here we have a pb */ @@ -2243,7 +2242,7 @@ if (! config_check_referral_mode()) { PR_AtomicIncrement(&ops_initiated); - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsInOps); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsInOps); } return 0; } @@ -2562,7 +2561,7 @@ } if (! config_check_referral_mode()) { - PR_AtomicDecrement(g_get_global_snmp_vars()->ops_tbl.dsConnections); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsConnections); } conn->c_gettingber = 0; Index: conntable.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/conntable.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- conntable.c 7 Sep 2007 19:49:51 -0000 1.8 +++ conntable.c 18 Oct 2007 00:08:34 -0000 1.9 @@ -249,6 +249,7 @@ return ret; } +#ifdef FOR_DEBUGGING static void connection_table_dump_active_connection (Connection *c) { @@ -257,7 +258,6 @@ c->c_mutex, c->c_next, c->c_prev); } -#if 0 /* useful for debugging */ static void connection_table_dump_active_connections (Connection_Table *ct) { @@ -289,8 +289,10 @@ /* we always have previous element because list contains a dummy header */; PR_ASSERT (c->c_prev); - /* slapi_log_error(SLAPI_LOG_FATAL, "connection", "Moving connection out of active list\n"); - connection_table_dump_active_connection (c);*/ +#ifdef FOR_DEBUGGING + slapi_log_error(SLAPI_LOG_FATAL, "connection", "Moving connection out of active list\n"); + connection_table_dump_active_connection (c); +#endif /* * Note: the connection will NOT be moved off the active list if any other threads still hold @@ -314,7 +316,9 @@ PR_Unlock(ct->table_mutex); - /* connection_table_dump_active_connections (ct); */ +#ifdef FOR_DEBUGGING + connection_table_dump_active_connections (ct); +#endif } /* @@ -333,8 +337,10 @@ connection_acquire_nolock (c); - /* slapi_log_error(SLAPI_LOG_FATAL, "connection", "Moving connection into active list\n"); - connection_table_dump_active_connection (c);*/ +#ifdef FOR_DEBUGGING + slapi_log_error(SLAPI_LOG_FATAL, "connection", "Moving connection into active list\n"); + connection_table_dump_active_connection (c); +#endif c->c_next = ct->c[0].c_next; if ( c->c_next != NULL ) @@ -346,7 +352,9 @@ PR_Unlock(ct->table_mutex); - /* connection_table_dump_active_connections (ct); */ +#ifdef FOR_DEBUGGING + connection_table_dump_active_connections (ct); +#endif } /* Index: daemon.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/daemon.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- daemon.c 10 Oct 2007 01:55:36 -0000 1.16 +++ daemon.c 18 Oct 2007 00:08:34 -0000 1.17 @@ -1570,7 +1570,6 @@ struct POLL_STRUCT pr_pd; PRIntervalTime timeout = PR_MillisecondsToInterval(ioblock_timeout); - if (timeout < 0) timeout = 0; pr_pd.fd = (PRFileDesc *)handle; pr_pd.in_flags = output ? PR_POLL_WRITE : PR_POLL_READ; pr_pd.out_flags = 0; @@ -2841,7 +2840,7 @@ exit( 1 ); suppressed: - return (PRFileDesc *)-1; + return (PRFileDesc **)-1; } /* createprlistensockets */ Index: defbackend.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/defbackend.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- defbackend.c 10 Nov 2006 23:45:40 -0000 1.5 +++ defbackend.c 18 Oct 2007 00:08:34 -0000 1.6 @@ -216,7 +216,7 @@ slapi_pblock_get( pb, SLAPI_BIND_METHOD, &method ); slapi_pblock_get( pb, SLAPI_BIND_CREDENTIALS, &cred ); if ( method == LDAP_AUTH_SIMPLE && cred->bv_len == 0 ) { - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsAnonymousBinds); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsAnonymousBinds); rc = SLAPI_BIND_ANONYMOUS; } else { send_nobackend_ldap_result( pb ); Index: delete.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/delete.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- delete.c 10 Nov 2006 23:45:40 -0000 1.7 +++ delete.c 18 Oct 2007 00:08:34 -0000 1.8 @@ -80,7 +80,7 @@ ber = operation->o_ber; /* count the delete request */ - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsRemoveEntryOps); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsRemoveEntryOps); /* * Parse the delete request. It looks like this: Index: dse.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/dse.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- dse.c 10 Nov 2006 23:45:40 -0000 1.7 +++ dse.c 18 Oct 2007 00:08:34 -0000 1.8 @@ -590,7 +590,7 @@ struct berval val; vals[0] = &val; vals[1] = NULL; - sprintf(value_buffer,"%u",current_sub_count); + sprintf(value_buffer,"%lu",current_sub_count); val.bv_val = value_buffer; val.bv_len = strlen (val.bv_val); switch(mod_op) @@ -640,7 +640,6 @@ char *buf = NULL; char *lastp = NULL; int rc= 0; /* Fail */ - PRInt32 remaining; PRInt32 nr = 0; PRFileInfo prfinfo; PRFileDesc *prfd = 0; @@ -689,7 +688,6 @@ int done= 0; /* read the entire file into core */ buf = slapi_ch_malloc( prfinfo.size + 1 ); - remaining = prfinfo.size; if (( nr = slapi_read_buffer( prfd, buf, prfinfo.size )) < 0 ) { slapi_log_error(SLAPI_LOG_FATAL, "dse", Index: dynalib.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/dynalib.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- dynalib.c 19 Jun 2007 18:24:58 -0000 1.7 +++ dynalib.c 18 Oct 2007 00:08:34 -0000 1.8 @@ -150,12 +150,12 @@ symload_report_error( const char *libpath, char *symbol, char *plugin, int libopen ) { char *errtext = NULL; - PRInt32 errlen, err; + PRInt32 errlen; errlen = PR_GetErrorTextLength(); if ( errlen > 0 ) { errtext = slapi_ch_malloc( errlen ); - if (( err = PR_GetErrorText( errtext )) > 0 ) { + if ( PR_GetErrorText( errtext ) > 0 ) { LDAPDebug( LDAP_DEBUG_ANY, SLAPI_COMPONENT_NAME_NSPR " error %d: %s\n", PR_GetError(), errtext, 0 ); } Index: entry.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/entry.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- entry.c 11 Jun 2007 17:22:37 -0000 1.13 +++ entry.c 18 Oct 2007 00:08:34 -0000 1.14 @@ -197,7 +197,6 @@ Slapi_Attr **a; char *valuecharptr=NULL; int valuelen; - CSNType attributecsntype; int value_state= VALUE_NOTFOUND; int attr_state= ATTRIBUTE_NOTFOUND; int maxvals; @@ -217,7 +216,6 @@ /* * Extract the attribute and value CSNs from the attribute type. */ - attributecsntype= CSN_TYPE_NONE; csn_free(&attributedeletioncsn); /* JCM - Do this more efficiently */ csnset_free(&valuecsnset); value_state= VALUE_NOTFOUND; @@ -596,7 +594,6 @@ while ( (s = ldif_getline( &next )) != NULL ) { CSN *attributedeletioncsn= NULL; - CSNType attributecsntype; CSNSet *valuecsnset= NULL; int value_state= VALUE_NOTFOUND; int attr_state= VALUE_NOTFOUND; @@ -615,7 +612,6 @@ /* * Extract the attribute and value CSNs from the attribute type. */ - attributecsntype= CSN_TYPE_UNKNOWN; csn_free(&attributedeletioncsn); csnset_free(&valuecsnset); value_state= VALUE_NOTFOUND; Index: errormap.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/errormap.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- errormap.c 10 Nov 2006 23:45:40 -0000 1.6 +++ errormap.c 18 Oct 2007 00:08:34 -0000 1.7 @@ -106,7 +106,7 @@ const char *s; if (( s = (const char *)SECU_Strerror( prerrno )) == NULL ) { - s = slapd_system_strerror( (const int)prerrno ); + s = slapd_system_strerror( prerrno ); } return( s ); Index: getopt_ext.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/getopt_ext.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- getopt_ext.c 10 Nov 2006 23:45:40 -0000 1.5 +++ getopt_ext.c 18 Oct 2007 00:08:34 -0000 1.6 @@ -52,7 +52,6 @@ static int _getopt_ext_inited = 0; static int _optind_firstHandled = 0; static int _optind_firstRecognized = 0; -static int _getopt_ext_done_long = 0; static int _getopt_ext_init(int argc) @@ -63,7 +62,6 @@ _optind_firstHandled = argc; _optind_firstRecognized = argc; /* optind = 1;*/ - _getopt_ext_done_long = 0; return(0); } Index: index_subsystem.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/index_subsystem.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- index_subsystem.c 10 Nov 2006 23:45:40 -0000 1.6 +++ index_subsystem.c 18 Oct 2007 00:08:34 -0000 1.7 @@ -611,8 +611,6 @@ /* indicates we found an existing targetf */ int assigned = 0; - struct slapi_filter *f_last = 0; /* previos filter in list */ - /* something to join with next compatible * subfilter we find - this will be the * first occurence of a filter assigned @@ -768,8 +766,6 @@ break; } } - - f_last = f; } /* iterate through the main list Index: log.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/log.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- log.c 5 Oct 2007 17:00:04 -0000 1.18 +++ log.c 18 Oct 2007 00:08:34 -0000 1.19 @@ -1488,7 +1488,7 @@ { int value = 0; int rv = 0; - int eunit, etimeunit, rsecs; + int etimeunit, rsecs; slapdFrontendConfig_t *fe_cfg = getFrontendConfig(); if ( logtype != SLAPD_ACCESS_LOG && @@ -1543,16 +1543,12 @@ } if (strcasecmp(expunit, "month") == 0) { - eunit = LOG_UNIT_MONTHS; value = 31 * 24 * 60 * 60 * etimeunit; } else if (strcasecmp(expunit, "week") == 0) { - eunit = LOG_UNIT_WEEKS; value = 7 * 24 * 60 * 60 * etimeunit; } else if (strcasecmp(expunit, "day") == 0) { - eunit = LOG_UNIT_DAYS; value = 24 * 60 * 60 * etimeunit; } else { - eunit = LOG_UNIT_UNKNOWN; value = -1; } @@ -2225,7 +2221,7 @@ int f_size = 0; int maxlogsize, nlogs; int rotationtime_secs = -1; - int sync_enabled, synchour, syncmin, timeunit; + int sync_enabled, timeunit; if (fp == NULL) { return LOG_ROTATE; @@ -2236,8 +2232,6 @@ nlogs = loginfo.log_access_maxnumlogs; maxlogsize = loginfo.log_access_maxlogsize; sync_enabled = loginfo.log_access_rotationsync_enabled; - synchour = loginfo.log_access_rotationsynchour; - syncmin = loginfo.log_access_rotationsyncmin; syncclock = loginfo.log_access_rotationsyncclock; timeunit = loginfo.log_access_rotationunit; rotationtime_secs = loginfo.log_access_rotationtime_secs; @@ -2247,8 +2241,6 @@ nlogs = loginfo.log_error_maxnumlogs; maxlogsize = loginfo.log_error_maxlogsize; sync_enabled = loginfo.log_error_rotationsync_enabled; - synchour = loginfo.log_error_rotationsynchour; - syncmin = loginfo.log_error_rotationsyncmin; syncclock = loginfo.log_error_rotationsyncclock; timeunit = loginfo.log_error_rotationunit; rotationtime_secs = loginfo.log_error_rotationtime_secs; @@ -2258,8 +2250,6 @@ nlogs = loginfo.log_audit_maxnumlogs; maxlogsize = loginfo.log_audit_maxlogsize; sync_enabled = loginfo.log_audit_rotationsync_enabled; - synchour = loginfo.log_audit_rotationsynchour; - syncmin = loginfo.log_audit_rotationsyncmin; syncclock = loginfo.log_audit_rotationsyncclock; timeunit = loginfo.log_audit_rotationunit; rotationtime_secs = loginfo.log_audit_rotationtime_secs; @@ -2875,11 +2865,10 @@ log__getfilesize(LOGFD fp) { PRFileInfo info; - int rv; - if ((rv = PR_GetOpenFileInfo (fp, &info)) == PR_FAILURE) { - return -1; - } + if (PR_GetOpenFileInfo (fp, &info) == PR_FAILURE) { + return -1; + } return info.size; } #endif @@ -3076,6 +3065,7 @@ */ if (++numoflogs > loginfo.log_error_maxnumlogs) { logstr = "Exceeded max number of logs allowed"; + syslog(LOG_ERR, "%s\n", logstr); goto delete_logfile; } @@ -3166,7 +3156,15 @@ /* Delete the error file */ log_convert_time (delete_logp->l_ctime, tbuf, 1 /*short */); PR_snprintf (buffer, sizeof(buffer), "%s.%s", loginfo.log_error_file, tbuf); - PR_Delete(buffer); + if (PR_Delete(buffer) != PR_SUCCESS) { + LDAPDebug(LDAP_DEBUG_ANY, "LOGINFO:Unable to remove file:%s.%s\n", + loginfo.log_audit_file, tbuf,0); + } else { + LDAPDebug(LDAP_DEBUG_TRACE, + "LOGINFO:Removed file:%s.%s because of (%s)\n", + loginfo.log_error_file, tbuf, + logstr); + } slapi_ch_free((void**)&delete_logp); loginfo.log_numof_error_logs--; @@ -3222,7 +3220,7 @@ ** have to delete one any how. */ if (++numoflogs > loginfo.log_audit_maxnumlogs) { - logstr = "Exceeded max number of logs allowed"; + logstr = "Delete Error Log File: Exceeded max number of logs allowed"; goto delete_logfile; } Index: main.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/main.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- main.c 7 Sep 2007 19:08:45 -0000 1.21 +++ main.c 18 Oct 2007 00:08:34 -0000 1.22 @@ -189,17 +189,14 @@ * yourself). */ -#if 0 - LDAPDebug( LDAP_DEBUG_ANY, "slapd got shutdown signal\n", 0, 0, 0 ); -#endif - c_set_shutdown(); + c_set_shutdown(); #ifndef _WIN32 #ifndef LINUX - /* don't mess with USR1/USR2 on linux, used by libpthread */ - (void) SIGNAL( SIGUSR2, cmd_set_shutdown ); + /* don't mess with USR1/USR2 on linux, used by libpthread */ + (void) SIGNAL( SIGUSR2, cmd_set_shutdown ); #endif - (void) SIGNAL( SIGTERM, cmd_set_shutdown ); - (void) SIGNAL( SIGHUP, cmd_set_shutdown ); + (void) SIGNAL( SIGTERM, cmd_set_shutdown ); + (void) SIGNAL( SIGHUP, cmd_set_shutdown ); #endif } @@ -470,7 +467,6 @@ static int s_port = 0; static char **ldif_file = NULL; static int ldif_files = 0; -static int ldif_backend = 0; static char *cmd_line_instance_name = NULL; static char **cmd_line_instance_names = NULL; static int skip_db_protect_check = 0; @@ -484,7 +480,6 @@ static int db2ldif_dump_replica = 0; static int db2ldif_dump_uniqueid = 1; static int ldif2db_generate_uniqueid = SLAPI_UNIQUEID_GENERATE_TIME_BASED; -static int ldif2db_load_state = 1; static int dbverify_verbose = 0; static char *ldif2db_namespaceid = NULL; int importexport_encrypt = 0; @@ -1218,7 +1213,7 @@ #if ( defined( hpux ) || defined( irix )) -void * +void signal2sigaction( int s, void *a ) { struct sigaction act; @@ -1596,8 +1591,6 @@ slapd_exemode == SLAPD_EXEMODE_DBVERIFY) { char *s = slapi_ch_strdup(optarg_ext); charray_add(&cmd_line_instance_names, s); - } else { - ldif_backend = atoi( optarg_ext ); } break; case 's': /* which suffix to include in import/export */ @@ -1766,7 +1759,6 @@ case 'Z': if (slapd_exemode == SLAPD_EXEMODE_LDIF2DB) { - ldif2db_load_state= 0; break; } usage( myname, *extraname ); @@ -2122,7 +2114,6 @@ pb.pb_ldif_generate_uniqueid = ldif2db_generate_uniqueid; pb.pb_ldif_namespaceid = ldif2db_namespaceid; pb.pb_ldif_encrypt = importexport_encrypt; -/* pb.pb_ldif_load_state = ldif2db_load_state; */ pb.pb_instance_name = cmd_line_instance_name; pb.pb_ldif_files = ldif_file; pb.pb_ldif_include = db2ldif_include; @@ -2662,7 +2653,7 @@ memset( &pb, '\0', sizeof(pb) ); pb.pb_backend = NULL; - pb.pb_seq_val = dbverify_verbose; + pb.pb_seq_type = dbverify_verbose; pb.pb_plugin = backend_plugin; pb.pb_instance_name = (char *)cmd_line_instance_names; pb.pb_task_flags = TASK_RUNNING_FROM_COMMANDLINE; Index: mapping_tree.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/mapping_tree.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- mapping_tree.c 25 Sep 2007 22:12:26 -0000 1.11 +++ mapping_tree.c 18 Oct 2007 00:08:34 -0000 1.12 @@ -2059,8 +2059,6 @@ int ret_code = LDAP_SUCCESS; int be_index = 0 ; int referral_index = 0 ; - int be_list_size = 0; - int referral_list_size = 0; Slapi_Backend * be; Slapi_Entry * referral; int scope = LDAP_SCOPE_BASE; @@ -2091,8 +2089,6 @@ mtn_lock(); - be_list_size = BE_LIST_SIZE; - referral_list_size = BE_LIST_SIZE; be_list[0] = NULL; referral_list[0] = NULL; @@ -3182,7 +3178,6 @@ char * slapi_mtn_get_state(const Slapi_DN *sdn) { - int hint; char * node_dn; Slapi_Attr *attr; char * state = NULL; @@ -3199,7 +3194,7 @@ if (attr) { /* entry state was found */ - hint = slapi_attr_first_value(attr, &val); + slapi_attr_first_value(attr, &val); state = slapi_ch_strdup(slapi_value_get_string(val)); slapi_attr_free(&attr); } Index: match.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/match.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- match.c 2 Oct 2007 18:39:50 -0000 1.6 +++ match.c 18 Oct 2007 00:08:34 -0000 1.7 @@ -216,12 +216,11 @@ { struct matchingRuleList *mrl=NULL; struct matchingRuleList *newmrl=NULL; - int rc=0; if(NULL == mrule) { return(-1); } - if((rc = _mr_alloc_new(&newmrl)) != 0) { + if(_mr_alloc_new(&newmrl) != 0) { return(-1); } if(NULL != mrule->mr_name) { Index: modify.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/modify.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- modify.c 5 Oct 2007 23:31:07 -0000 1.15 +++ modify.c 18 Oct 2007 00:08:34 -0000 1.16 @@ -138,7 +138,7 @@ ber = operation->o_ber; /* count the modify request */ - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsModifyEntryOps); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsModifyEntryOps); /* * Parse the modify request. It looks like this: Index: modrdn.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/modrdn.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- modrdn.c 10 Nov 2006 23:45:40 -0000 1.8 +++ modrdn.c 18 Oct 2007 00:08:34 -0000 1.9 @@ -79,7 +79,7 @@ LDAPDebug( LDAP_DEBUG_TRACE, "do_modrdn\n", 0, 0, 0 ); /* count the modrdn request */ - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsModifyRDNOps); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsModifyRDNOps); slapi_pblock_get( pb, SLAPI_OPERATION, &operation); ber = operation->o_ber; Index: opshared.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/opshared.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- opshared.c 3 Oct 2007 17:44:50 -0000 1.10 +++ opshared.c 18 Oct 2007 00:08:34 -0000 1.11 @@ -464,6 +464,7 @@ while (be) { const Slapi_DN * be_suffix; + int err = 0; if (be->be_search == NULL) { @@ -546,7 +547,6 @@ rc = (*be->be_search)(pb); switch (rc) { - int err = 0; case 1: /* if the backend returned LDAP_NO_SUCH_OBJECT for a SEARCH request, it will not have sent back a result - otherwise, it will have sent a result */ Index: passwd_extop.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/passwd_extop.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- passwd_extop.c 27 Feb 2007 02:57:30 -0000 1.15 +++ passwd_extop.c 18 Oct 2007 00:08:34 -0000 1.16 @@ -436,7 +436,7 @@ char *errMesg = NULL; int ret=0, rc=0, sasl_ssf=0; ber_tag_t tag=0; - ber_len_t len=-1; + ber_len_t len=(ber_len_t)-1; struct berval *extop_value = NULL; struct berval *gen_passwd = NULL; BerElement *ber = NULL; Index: plugin_internal_op.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/plugin_internal_op.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- plugin_internal_op.c 12 Oct 2007 16:53:03 -0000 1.8 +++ plugin_internal_op.c 18 Oct 2007 00:08:34 -0000 1.9 @@ -591,7 +591,6 @@ int opresult = 0; Slapi_Entry **pb_search_entries = NULL; char **pb_search_referrals = NULL; - int rc; PR_ASSERT (pb); @@ -609,7 +608,7 @@ /* call internal search callback, define search_entry_callback, and result_callback such that the results of the search are stuffed into pb */ - rc = search_internal_callback_pb (pb, &psid, internal_plugin_result_callback, + search_internal_callback_pb (pb, &psid, internal_plugin_result_callback, internal_plugin_search_entry_callback, internal_plugin_search_referral_callback); opresult = psid.rc; Index: protect_db.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/protect_db.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- protect_db.c 17 Aug 2007 02:12:37 -0000 1.11 +++ protect_db.c 18 Oct 2007 00:08:34 -0000 1.12 @@ -248,7 +248,6 @@ } } } -bail: PR_Close(prfd); } Index: proto-slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/proto-slap.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- proto-slap.h 20 Sep 2007 16:54:38 -0000 1.29 +++ proto-slap.h 18 Oct 2007 00:08:34 -0000 1.30 @@ -1273,6 +1273,6 @@ * main.c */ #if ( defined( hpux ) || defined( irix )) -void * signal2sigaction( int s, void *a ); +void signal2sigaction( int s, void *a ); #endif #endif /* _PROTO_SLAP */ Index: pw.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pw.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- pw.c 9 Oct 2007 17:51:14 -0000 1.16 +++ pw.c 18 Oct 2007 00:08:34 -0000 1.17 @@ -782,7 +782,7 @@ num_digits++; } else if ( ldap_utf8isalpha( p ) ) { num_alphas++; - if ( slapi_utf8isLower( p ) ) { + if ( slapi_utf8isLower( (unsigned char *)p ) ) { num_lowers++; } else { num_uppers++; Index: pw_mgmt.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pw_mgmt.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- pw_mgmt.c 7 Mar 2007 22:06:19 -0000 1.9 +++ pw_mgmt.c 18 Oct 2007 00:08:34 -0000 1.10 @@ -297,7 +297,6 @@ time_t unlock_time; time_t cur_time; - double diff_t; char *cur_time_str = NULL; char *accountUnlockTime; passwdPolicy *pwpolicy = NULL; @@ -401,8 +400,7 @@ } cur_time = current_time(); cur_time_str = format_genTime( cur_time); - if ( ( diff_t = difftime ( parse_genTime( cur_time_str ), - unlock_time ) ) < 0 ) { + if ( difftime ( parse_genTime( cur_time_str ), unlock_time ) < 0 ) { /* account is locked, cannot do anything */ if (pwresponse_req) { Index: result.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/result.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- result.c 3 Oct 2007 17:44:50 -0000 1.11 +++ result.c 18 Oct 2007 00:08:34 -0000 1.12 @@ -328,7 +328,7 @@ || err == LDAP_AUTH_UNKNOWN ) { if(g_get_global_snmp_vars()->ops_tbl.dsSecurityErrors!=NULL) - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsSecurityErrors); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsSecurityErrors); }else if( err != LDAP_REFERRAL && err != LDAP_OPT_REFERRALS && err != LDAP_PARTIAL_RESULTS) @@ -339,7 +339,7 @@ -- partially seviced operations will not be conted as an error */ if(g_get_global_snmp_vars()->ops_tbl.dsErrors!=NULL) - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsErrors); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsErrors); } } @@ -413,7 +413,7 @@ int len; /* count the referral */ - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsReferrals); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsReferrals); /* * figure out how much space we need @@ -486,7 +486,7 @@ */ /* count the referral */ if (! config_check_referral_mode()) - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsReferrals); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsReferrals); rc = ber_printf( ber, "{it{esst{s", operation->o_msgid, tag, err, matched ? matched : "", text ? text : "", LDAP_TAG_REFERRAL, urls[0]->bv_val ); @@ -524,7 +524,7 @@ if ( operation->o_results.result_controls != NULL && conn->c_ldapversion >= LDAP_VERSION3 && write_controls( ber, operation->o_results.result_controls ) != 0 ) { - rc = LBER_ERROR; + rc = (int)LBER_ERROR; } if ( rc != LBER_ERROR ) { /* end the LDAPMessage sequence */ @@ -677,7 +677,7 @@ char *attrs[2] = { NULL, NULL }; /* count the referral */ - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsReferrals); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsReferrals); attrs[0] = refAttr; if ( e != NULL && @@ -1550,11 +1550,11 @@ plugin_call_plugins( pb, SLAPI_PLUGIN_POST_RESULT_FN ); break; case _LDAP_SEND_REFERRAL: - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsReferralsReturned); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsReferralsReturned); plugin_call_plugins( pb, SLAPI_PLUGIN_POST_REFERRAL_FN ); break; case _LDAP_SEND_ENTRY: - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsEntriesReturned); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsEntriesReturned); plugin_call_plugins( pb, SLAPI_PLUGIN_POST_ENTRY_FN ); break; } Index: sasl_io.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/sasl_io.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- sasl_io.c 3 Oct 2007 00:55:35 -0000 1.12 +++ sasl_io.c 18 Oct 2007 00:08:34 -0000 1.13 @@ -227,7 +227,7 @@ static int sasl_io_read_packet(Connection *c, PRInt32 *err) { - size_t ret = 0; + PRInt32 ret = 0; sasl_io_private *sp = c->c_sasl_io_private; size_t bytes_remaining_to_read = sp->encrypted_buffer_count - sp->encrypted_buffer_offset; Index: search.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/search.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- search.c 10 Nov 2006 23:45:40 -0000 1.7 +++ search.c 18 Oct 2007 00:08:34 -0000 1.8 @@ -86,7 +86,7 @@ ber = operation->o_ber; /* count the search request */ - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsSearchOps); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsSearchOps); /* * Parse the search request. It looks like this: @@ -140,11 +140,11 @@ /* check and record the scope for snmp */ if ( scope == LDAP_SCOPE_ONELEVEL) { /* count the one level search request */ - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsOneLevelSearchOps); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsOneLevelSearchOps); } else if (scope == LDAP_SCOPE_SUBTREE) { /* count the subtree search request */ - PR_AtomicIncrement(g_get_global_snmp_vars()->ops_tbl.dsWholeSubtreeSearchOps); + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsWholeSubtreeSearchOps); } /* filter - returns a "normalized" version */ Index: slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slap.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- slap.h 12 Oct 2007 18:03:42 -0000 1.28 +++ slap.h 18 Oct 2007 00:08:34 -0000 1.29 @@ -1368,7 +1368,6 @@ int pb_ldif_dump_replica; int pb_ldif_dump_uniqueid; /* dump uniqueid during db2ldif */ int pb_ldif_generate_uniqueid; /* generate uniqueid during db2ldif */ -/* JCMREPL int pb_ldif_load_state; */ char* pb_ldif_namespaceid; /* used for name based uniqueid generation */ int pb_ldif_encrypt; /* used to enable encrypt/decrypt on import and export */ /* Index: slapi-private.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-private.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- slapi-private.h 12 Oct 2007 18:03:42 -0000 1.18 +++ slapi-private.h 18 Oct 2007 00:08:34 -0000 1.19 @@ -377,6 +377,8 @@ /* filter.c */ int filter_flag_is_set(const Slapi_Filter *f,unsigned char flag); char *slapi_filter_to_string(const Slapi_Filter *f, char *buffer, size_t bufsize); +char * +slapi_filter_to_string_internal( const struct slapi_filter *f, char *buf, size_t *bufsize ); /* operation.c */ @@ -1226,6 +1228,14 @@ #define PRLDAP_SET_PORT(myaddr,myport) \ ((myaddr)->raw.family == PR_AF_INET6 ? ((myaddr)->ipv6.port = PR_htons(myport)) : ((myaddr)->inet.port = PR_htons(myport))) +/* + * snmp_collator.c + * wrapper functions to ease the cast burdon between net-snmp APIs which expect + * unsigned int and PR_AtomicIncrement/PR_AtomicSet which expect signed int. + */ +void snmp_increment_counter(PRUint32 *counter); +void snmp_set_counter(PRUint32 *counter, PRInt32 newval); + #ifdef __cplusplus } #endif Index: snmp_collator.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/snmp_collator.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- snmp_collator.c 10 Nov 2006 23:45:40 -0000 1.10 +++ snmp_collator.c 18 Oct 2007 00:08:34 -0000 1.11 @@ -570,7 +570,7 @@ /* if we got a value for entrycachehits, then set it */ if(val != NULL) { - PR_AtomicSet(g_get_global_snmp_vars()->entries_tbl.dsCacheHits, atoi(val->bv_val)); + snmp_set_counter(g_get_global_snmp_vars()->entries_tbl.dsCacheHits, atoi(val->bv_val)); } @@ -590,7 +590,7 @@ /* if we got a value for currententrycachesize, then set it */ if(val != NULL) { - PR_AtomicSet(g_get_global_snmp_vars()->entries_tbl.dsCacheEntries, atoi(val->bv_val)); + snmp_set_counter(g_get_global_snmp_vars()->entries_tbl.dsCacheEntries, atoi(val->bv_val)); } @@ -704,7 +704,7 @@ slapi_sdn_done( &sdn ); return *e; } - + static void freeConfigEntry( Slapi_Entry **e ) { if ( (e != NULL) && (*e != NULL) ) { @@ -713,9 +713,20 @@ } } +/* + * wrapper functions to ease the cast burdon between net=snmp APIs which expect + * unsigned int and PR_AtomicIncrement/PR_AtomicSet which expect signed int. + * NSPR_API(PRInt32) PR_AtomicSet(PRInt32 *val, PRInt32 newval); + * NSPR_API(PRInt32) PR_AtomicIncrement(PRInt32 *val); + */ +void +snmp_increment_counter(PRUint32 *counter) +{ + PR_AtomicIncrement((PRInt32 *)counter); +} - - - - +void snmp_set_counter(PRUint32 *counter, PRInt32 newval) +{ + PR_AtomicSet((PRInt32 *)counter, newval); +} Index: ssl.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/ssl.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- ssl.c 5 Oct 2007 23:31:07 -0000 1.14 +++ ssl.c 18 Oct 2007 00:08:34 -0000 1.15 @@ -400,7 +400,6 @@ { SECStatus secStatus; PRErrorCode errorCode; - PRStatus status; int rv = 0; int len = 0; PRUint32 nssFlags = 0; @@ -423,7 +422,7 @@ } else { /* otherwise, NSS will create empty databases */ /* we open the key/cert db in rw mode, so make sure the directory is writable */ - if (PR_SUCCESS != (status = PR_Access(certdir, PR_ACCESS_WRITE_OK))) { + if (PR_SUCCESS != PR_Access(certdir, PR_ACCESS_WRITE_OK)) { char *serveruser = "unknown"; #ifndef _WIN32 serveruser = config_get_localuser(); Index: task.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/task.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- task.c 20 Sep 2007 16:54:38 -0000 1.13 +++ task.c 18 Oct 2007 00:08:34 -0000 1.14 @@ -425,7 +425,7 @@ Slapi_Attr *attr; Slapi_Value *val = NULL; Slapi_Backend *be = NULL; - const char *cn, *instance_name; + const char *instance_name; char **ldif_file = NULL, **include = NULL, **exclude = NULL; int idx, rv = 0; const char *do_attr_indexes, *uniqueid_kind_str; @@ -435,7 +435,7 @@ char *nameFrombe_name = NULL; const char *encrypt_on_import = NULL; - if ((cn = fetch_attr(e, "cn", NULL)) == NULL) { + if (fetch_attr(e, "cn", NULL) == NULL) { *returncode = LDAP_OBJECT_CLASS_VIOLATION; return SLAPI_DSE_CALLBACK_ERROR; } @@ -724,7 +724,6 @@ Slapi_Attr *attr; Slapi_Value *val = NULL; Slapi_Backend *be = NULL; - const char *cn; char *ldif_file = NULL; char **instance_names = NULL, **inp; char **include = NULL, **exclude = NULL; @@ -744,7 +743,7 @@ const char *decrypt_on_export = NULL; *returncode = LDAP_SUCCESS; - if ((cn = fetch_attr(e, "cn", NULL)) == NULL) { + if (fetch_attr(e, "cn", NULL) == NULL) { *returncode = LDAP_OBJECT_CLASS_VIOLATION; rv = SLAPI_DSE_CALLBACK_ERROR; goto out; @@ -994,7 +993,6 @@ { Slapi_Backend *be = NULL; PRThread *thread = NULL; - const char *cn; const char *archive_dir = NULL; const char *my_database_type = NULL; const char *database_type = "ldbm database"; @@ -1004,7 +1002,7 @@ Slapi_Task *task = NULL; *returncode = LDAP_SUCCESS; - if ((cn = fetch_attr(e, "cn", NULL)) == NULL) { + if (fetch_attr(e, "cn", NULL) == NULL) { *returncode = LDAP_OBJECT_CLASS_VIOLATION; rv = SLAPI_DSE_CALLBACK_ERROR; goto out; @@ -1139,7 +1137,6 @@ Slapi_Entry *eAfter, int *returncode, char *returntext, void *arg) { Slapi_Backend *be = NULL; - const char *cn = NULL; const char *instance_name = NULL; const char *archive_dir = NULL; const char *my_database_type = NULL; @@ -1151,7 +1148,7 @@ PRThread *thread = NULL; *returncode = LDAP_SUCCESS; - if ((cn = fetch_attr(e, "cn", NULL)) == NULL) { + if (fetch_attr(e, "cn", NULL) == NULL) { *returncode = LDAP_OBJECT_CLASS_VIOLATION; rv = SLAPI_DSE_CALLBACK_ERROR; goto out; @@ -1285,7 +1282,6 @@ Slapi_Entry *eAfter, int *returncode, char *returntext, void *arg) { const char *instance_name; - const char *cn; int rv = SLAPI_DSE_CALLBACK_OK; Slapi_Backend *be = NULL; Slapi_Task *task = NULL; @@ -1297,7 +1293,7 @@ PRThread *thread = NULL; *returncode = LDAP_SUCCESS; - if ((cn = fetch_attr(e, "cn", NULL)) == NULL) { + if (fetch_attr(e, "cn", NULL) == NULL) { *returncode = LDAP_OBJECT_CLASS_VIOLATION; rv = SLAPI_DSE_CALLBACK_ERROR; goto out; @@ -1411,7 +1407,6 @@ task_upgradedb_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter, int *returncode, char *returntext, void *arg) { - const char *cn; int rv = SLAPI_DSE_CALLBACK_OK; Slapi_Backend *be = NULL; Slapi_Task *task = NULL; @@ -1423,7 +1418,7 @@ char *cookie = NULL; *returncode = LDAP_SUCCESS; - if ((cn = fetch_attr(e, "cn", NULL)) == NULL) { + if (fetch_attr(e, "cn", NULL) == NULL) { *returncode = LDAP_OBJECT_CLASS_VIOLATION; rv = SLAPI_DSE_CALLBACK_ERROR; goto out; @@ -1556,8 +1551,6 @@ if ((task->task_state == SLAPI_TASK_FINISHED) && !(task->task_flags & SLAPI_TASK_DESTROYING)) { - /* queue an event to destroy the state info */ - Slapi_Eq_Context event; Slapi_PBlock *pb = slapi_pblock_new(); Slapi_Entry *e; int ttl; @@ -1571,7 +1564,8 @@ ttl = 3600; /* be reasonable. */ expire = time(NULL) + ttl; task->task_flags |= SLAPI_TASK_DESTROYING; - event = slapi_eq_once(destroy_task, (void *)task, expire); + /* queue an event to destroy the state info */ + slapi_eq_once(destroy_task, (void *)task, expire); slapi_free_search_results_internal(pb); slapi_pblock_destroy(pb); Index: uuid.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/uuid.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- uuid.c 13 Oct 2007 01:47:15 -0000 1.10 +++ uuid.c 18 Oct 2007 00:08:34 -0000 1.11 @@ -291,7 +291,7 @@ void uuid_format(const guid_t *u, char *buff) { - sprintf(buff, "%8.8lx-%4.4x-%4.4x-%2.2x%2.2x-%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x", + sprintf(buff, "%8.8x-%4.4x-%4.4x-%2.2x%2.2x-%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x", u->time_low, u->time_mid, u->time_hi_and_version, u->clock_seq_hi_and_reserved, u->clock_seq_low, u->node[0], u->node[1], u->node[2], u->node[3], u->node[4], u->node[5]); @@ -368,7 +368,7 @@ time calls are made by a uuid_update_state */ update_time_mt (×tamp, &clock_seq); - if (timestamp == NEED_TIME_UPDATE) + if (timestamp == (uuid_time_t)NEED_TIME_UPDATE) { slapi_log_error (SLAPI_LOG_FATAL, MODULE, "uuid_create_mt: generator ran " "out of sequence numbers.\n"); From fedora-directory-commits at redhat.com Thu Oct 18 00:08:37 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:37 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools dbscan.c, 1.17, 1.18 mmldif.c, 1.7, 1.8 Message-ID: <200710180009.l9I097Z3026620@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/slapd/tools Modified Files: dbscan.c mmldif.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: dbscan.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/dbscan.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- dbscan.c 24 Sep 2007 23:39:23 -0000 1.17 +++ dbscan.c 18 Oct 2007 00:08:34 -0000 1.18 @@ -66,6 +66,12 @@ #include #endif +#if ( defined( hpux ) ) +#ifdef _XOPEN_SOURCE_EXTENDED +#include /* for ntohl, et al. */ +#endif +#endif + /* file type */ #define ENTRYTYPE 0x1 #define INDEXTYPE 0x2 @@ -227,7 +233,7 @@ } if (truncatesiz > 0 && o > bufend - 5) { /* truncate it */ - strcpy(o, " ..."); + strcpy((char *)o, " ..."); i = len; o += 4; } @@ -416,9 +422,7 @@ uint32 i; uint32 val_count; char *type = NULL; - int op; - op = (*pos) & 0x000000FF; pos ++; _cl5ReadString (&type, &pos); @@ -440,7 +444,7 @@ /* data format: ..... */ void print_ruv(unsigned char *buff) { - char *pos = buff; + char *pos = (char *)buff; uint32 i; uint32 val_count; @@ -942,7 +946,7 @@ } while (0 == ret); key.size = 0; key.data = NULL; - } else if (entry_id != -1) { + } else if (entry_id != 0xffffffff) { key.size = sizeof(entry_id); key.data = &entry_id; ret = db->get(db, NULL, &key, &data, 0); Index: mmldif.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/mmldif.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- mmldif.c 10 Nov 2006 23:45:51 -0000 1.7 +++ mmldif.c 18 Oct 2007 00:08:34 -0000 1.8 @@ -290,7 +290,6 @@ static char seed; static int hashmask; static entry_t **hashtable; -static int maxcount; static int emitchanges; static int readrec(edfFILE * edf1, attrib1_t ** attrib); @@ -641,7 +640,6 @@ time(&tl); seed = (char)tl; - maxcount = 10; ndirectories = 0; emitchanges = 0; ofp = NULL; From fedora-directory-commits at redhat.com Thu Oct 18 00:08:36 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:36 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm dbhelp.c, 1.8, 1.9 dblayer.c, 1.24, 1.25 dbverify.c, 1.1, 1.2 import.c, 1.9, 1.10 ldbm_attr.c, 1.8, 1.9 ldbm_attrcrypt.c, 1.9, 1.10 sort.c, 1.10, 1.11 Message-ID: <200710180009.l9I096Nv026613@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/slapd/back-ldbm Modified Files: dbhelp.c dblayer.c dbverify.c import.c ldbm_attr.c ldbm_attrcrypt.c sort.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: dbhelp.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dbhelp.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- dbhelp.c 16 Aug 2007 19:28:58 -0000 1.8 +++ dbhelp.c 18 Oct 2007 00:08:34 -0000 1.9 @@ -57,8 +57,8 @@ DB *destination_file = NULL; DBC *source_cursor = NULL; DBTYPE dbtype = 0; - int dbflags = 0; - int dbpagesize = 0; + PRUint32 dbflags = 0; + PRUint32 dbpagesize = 0; int cursor_flag = 0; int finished = 0; int mode = 0; @@ -187,14 +187,11 @@ int dblayer_copy_file_resetlsns(char *home_dir ,char *source_file_name, char *destination_file_name, int overwrite, dblayer_private *priv) { int retval = 0; - int mode = 0; DB_ENV *env = NULL; LDAPDebug( LDAP_DEBUG_TRACE, "=> dblayer_copy_file_resetlsns\n", 0, 0, 0 ); /* Make the environment */ - if (priv->dblayer_file_mode) - mode = priv->dblayer_file_mode; retval = dblayer_make_private_simple_env(home_dir,&env); if (retval) { LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_resetlsns: Call to dblayer_make_private_simple_env failed!\n" Index: dblayer.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- dblayer.c 16 Oct 2007 17:30:58 -0000 1.24 +++ dblayer.c 18 Oct 2007 00:08:34 -0000 1.25 @@ -478,6 +478,7 @@ return (ret < 0) ? errno : 0; } +#if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR >= 4300 /* Helper function for large seeks, db4.3 */ static int dblayer_seek43_large(int fd, off64_t offset, int whence) { @@ -487,6 +488,7 @@ return (ret < 0) ? errno : 0; } +#endif /* helper function for large fstat -- this depends on 'struct stat64' having * the following members: @@ -5828,7 +5830,6 @@ int dblayer_update_db_ext(ldbm_instance *inst, char *oldext, char *newext) { struct attrinfo *a = NULL; - backend *be = NULL; struct ldbminfo *li = NULL; dblayer_private *priv = NULL; DB *thisdb = NULL; @@ -5844,7 +5845,6 @@ "update_db_ext: Null instance is passed\n", 0, 0, 0); return -1; /* non zero */ } - be = inst->inst_be; li = inst->inst_li; priv = (dblayer_private*)li->li_dblayer_private; inst_dirp = dblayer_get_full_inst_dir(li, inst, inst_dir, MAXPATHLEN); Index: dbverify.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dbverify.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- dbverify.c 7 Sep 2007 19:08:45 -0000 1.1 +++ dbverify.c 18 Oct 2007 00:08:34 -0000 1.2 @@ -169,7 +169,7 @@ slapi_log_error(SLAPI_LOG_TRACE, "verify DB", "Verifying db files...\n"); slapi_pblock_get(pb, SLAPI_BACKEND_INSTANCE_NAME, &instance_names); - slapi_pblock_get(pb, SLAPI_SEQ_VAL, &verbose); + slapi_pblock_get(pb, SLAPI_SEQ_TYPE, &verbose); slapi_pblock_get(pb, SLAPI_PLUGIN_PRIVATE, &li); ldbm_config_load_dse_info(li); ldbm_config_internal_set(li, CONFIG_DB_TRANSACTION_LOGGING, "off"); Index: import.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/import.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- import.c 19 Sep 2007 19:32:03 -0000 1.9 +++ import.c 18 Oct 2007 00:08:34 -0000 1.10 @@ -173,8 +173,6 @@ static void import_log_status_done(ImportJob *job) { if (job->task) { - int len = 0; - len = strlen(job->task_status); slapi_task_log_status(job->task, "%s", job->task_status); } } Index: ldbm_attr.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_attr.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ldbm_attr.c 2 Oct 2007 18:39:51 -0000 1.8 +++ ldbm_attr.c 18 Oct 2007 00:08:34 -0000 1.9 @@ -572,7 +572,7 @@ rhs = f->f_ava.ava_value.bv_val; /* is the value zero ? */ rhs_num = atoi(rhs); - if (0 == rhs) { + if (0 == rhs_num) { /* If so, rewrite to same as numsubordinates=* */ free_the_filter_bits(f); replace_filter(f,"(objectclass=*)"); Index: ldbm_attrcrypt.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ldbm_attrcrypt.c 10 Nov 2006 23:45:39 -0000 1.9 +++ ldbm_attrcrypt.c 18 Oct 2007 00:08:34 -0000 1.10 @@ -200,7 +200,7 @@ char *entry_string = slapi_ch_smprintf(entry_template,acs->ace->cipher_display_name,instance_name,acs->ace->cipher_display_name); e = slapi_str2entry(entry_string, 0); /* Add the key as a binary attribute */ - key_as_berval.bv_val = wrapped_symmetric_key.data; + key_as_berval.bv_val = (char *)wrapped_symmetric_key.data; key_as_berval.bv_len = wrapped_symmetric_key.len; key_value = slapi_value_new_berval(&key_as_berval); /* key_value is now a copy of key_as_berval - free wrapped_symmetric_key */ @@ -236,7 +236,7 @@ CK_MECHANISM_TYPE wrap_mechanism = CKM_RSA_PKCS; SECKEYPublicKey *wrapping_key = public_key; wrapped_symmetric_key->len = slapd_SECKEY_PublicKeyStrength(public_key); - wrapped_symmetric_key->data = slapi_ch_malloc(wrapped_symmetric_key->len); + wrapped_symmetric_key->data = (unsigned char *)slapi_ch_malloc(wrapped_symmetric_key->len); LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_wrap_key\n", 0, 0, 0); s = slapd_pk11_PubWrapSymKey(wrap_mechanism, wrapping_key, symmetric_key, wrapped_symmetric_key); if (SECSuccess != s) { @@ -567,7 +567,7 @@ SECItem *security_parameter = NULL; int output_buffer_length = 0; int output_buffer_size1 = 0; - int output_buffer_size2 = 0; + unsigned int output_buffer_size2 = 0; unsigned char *output_buffer = NULL; attrcrypt_cipher_state *acs = NULL; @@ -586,7 +586,7 @@ #endif /* Allocate the output buffer */ output_buffer_length = in_size + 16; - output_buffer = slapi_ch_malloc(output_buffer_length); + output_buffer = (unsigned char *)slapi_ch_malloc(output_buffer_length); /* Now call NSS to do the cipher op */ iv_item.data = "aaaaaaaaaaaaaaaa"; /* ptr to an array of IV bytes */ iv_item.len = acs->ace->iv_length; /* length of the array of IV bytes */ @@ -602,7 +602,7 @@ LDAPDebug(LDAP_DEBUG_ANY,"attrcrypt_crypto_op failed on cipher %s : %d - %s\n", acs->ace->cipher_display_name, errorCode, slapd_pr_strerror(errorCode)); goto error; } - secret = slapd_pk11_cipherOp(sec_context, output_buffer, &output_buffer_size1, output_buffer_length, in_data, in_size); + secret = slapd_pk11_cipherOp(sec_context, output_buffer, &output_buffer_size1, output_buffer_length, (unsigned char *)in_data, in_size); if (SECSuccess != secret) { int errorCode = PR_GetError(); LDAPDebug(LDAP_DEBUG_ANY,"attrcrypt_crypto_op failed on cipher %s : %d - %s\n", acs->ace->cipher_display_name, errorCode, slapd_pr_strerror(errorCode)); @@ -621,11 +621,11 @@ if (encrypt) { log_bytes("slapd_pk11_DigestFinal '%s' (%d)\n", output_buffer, output_buffer_size1 + output_buffer_size2); } else { - LDAPDebug(LDAP_DEBUG_ANY,"slapd_pk11_DigestFinal '%s', %d\n", output_buffer, output_buffer_size2, 0); + LDAPDebug(LDAP_DEBUG_ANY,"slapd_pk11_DigestFinal '%s', %u\n", output_buffer, output_buffer_size2, 0); } #endif *out_size = output_buffer_size1 + output_buffer_size2; - *out_data = output_buffer; + *out_data = (char *)output_buffer; } error: if (sec_context) { Index: sort.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/sort.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- sort.c 1 Dec 2006 21:57:57 -0000 1.10 +++ sort.c 18 Oct 2007 00:08:34 -0000 1.11 @@ -673,7 +673,6 @@ struct backentry *b = NULL; int result = 0; sort_spec_thing *this_one = NULL; - int return_value = -1; backend *be = bc->be; ldbm_instance *inst = (ldbm_instance *) be->be_instance_info; int err; @@ -706,8 +705,8 @@ struct berval **value_b = NULL; /* Get the two attribute values from the entries */ - return_value = slapi_entry_attr_find(a->ep_entry,type,&attr_a); - return_value = slapi_entry_attr_find(b->ep_entry,type,&attr_b); + slapi_entry_attr_find(a->ep_entry,type,&attr_a); + slapi_entry_attr_find(b->ep_entry,type,&attr_b); /* What do we do if one or more of the entries lacks this attribute ? */ /* if one lacks the attribute */ if (NULL == attr_a) { From fedora-directory-commits at redhat.com Thu Oct 18 00:08:37 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:37 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/ldclt ldapfct.c, 1.6, 1.7 scalab01.c, 1.4, 1.5 Message-ID: <200710180009.l9I097HU026625@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/slapd/tools/ldclt Modified Files: ldapfct.c scalab01.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: ldapfct.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/ldapfct.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ldapfct.c 19 Sep 2007 18:08:12 -0000 1.6 +++ ldapfct.c 18 Oct 2007 00:08:35 -0000 1.7 @@ -629,7 +629,7 @@ if (close ((int)fd) < 0) { perror ("ldctx"); - printf ("ldclt[%d]: T%03d: cannot close(fd=%d), error=%d (%s)\n", + printf ("ldclt[%d]: T%03d: cannot close(fd=%ld), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, fd, errno, strerror (errno)); return (-1); } Index: scalab01.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/scalab01.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- scalab01.c 19 Sep 2007 18:08:12 -0000 1.4 +++ scalab01.c 18 Oct 2007 00:08:35 -0000 1.5 @@ -1019,7 +1019,6 @@ /* * End of thread */ - return (arg); } From fedora-directory-commits at redhat.com Thu Oct 18 00:08:37 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:37 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/rsearch infadd.c, 1.3, 1.4 Message-ID: <200710180009.l9I097H6026628@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/slapd/tools/rsearch Modified Files: infadd.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: infadd.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/infadd.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- infadd.c 10 Nov 2006 23:45:51 -0000 1.3 +++ infadd.c 18 Oct 2007 00:08:35 -0000 1.4 @@ -223,8 +223,7 @@ exit(1); } - if (use_random < 0 || sampleInterval <= 0 || thread_count <= 0 || - lmtCount < 0 || blobsize < 0 || firstUID < 0) { + if ( sampleInterval <= 0 || thread_count <= 0 || lmtCount < 0 ) { printf("infadd: invalid option value\n"); usage(); exit(-1); From fedora-directory-commits at redhat.com Thu Oct 18 00:08:37 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:37 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/snmp ldap-agent.c, 1.11, 1.12 Message-ID: <200710180009.l9I097YW026631@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/snmp In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/snmp Modified Files: ldap-agent.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: ldap-agent.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/ldap-agent.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- ldap-agent.c 10 Nov 2006 23:45:53 -0000 1.11 +++ ldap-agent.c 18 Oct 2007 00:08:35 -0000 1.12 @@ -277,7 +277,6 @@ time_t previous_start; int previous_state; int stats_hdl = -1; - int err; snmp_log(LOG_INFO, "Reloading stats.\n"); @@ -293,7 +292,7 @@ serv_p->stats_file, serv_p->port); /* Open the stats file */ - if ((err = agt_mopen_stats(serv_p->stats_file, O_RDONLY, &stats_hdl)) != 0) { + if ( agt_mopen_stats(serv_p->stats_file, O_RDONLY, &stats_hdl) != 0 ) { /* Server must be down */ serv_p->server_state = SERVER_DOWN; /* Zero out the ops and entries tables */ @@ -304,13 +303,13 @@ serv_p->stats_file, serv_p->port); } else { /* Initialize ops table */ - if ((err = agt_mread_stats(stats_hdl, &ctx->hdr_tbl, &ctx->ops_tbl, - &ctx->entries_tbl)) != 0) + if ( agt_mread_stats(stats_hdl, &ctx->hdr_tbl, &ctx->ops_tbl, + &ctx->entries_tbl) != 0 ) snmp_log(LOG_ERR, "Unable to read stats file: %s\n", serv_p->stats_file); /* Close stats file */ - if ((err = agt_mclose_stats(stats_hdl)) != 0) + if ( agt_mclose_stats(stats_hdl) != 0 ) snmp_log(LOG_ERR, "Error closing stats file: %s\n", serv_p->stats_file); From fedora-directory-commits at redhat.com Thu Oct 18 00:08:38 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 17 Oct 2007 20:08:38 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/systools idsktune.c, 1.15, 1.16 Message-ID: <200710180009.l9I098m0026634@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/systools In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/systools Modified Files: idsktune.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler Index: idsktune.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/systools/idsktune.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- idsktune.c 9 Aug 2007 15:40:11 -0000 1.15 +++ idsktune.c 18 Oct 2007 00:08:35 -0000 1.16 @@ -1418,20 +1418,20 @@ } else { if (flag_debug) { printf("DEBUG : Static info\n"); - printf("DEBUG : Physical memory size %d\n",pst_stt.physical_memory); - printf("DEBUG : Page size %d\n",pst_stt.page_size); - printf("DEBUG : Max nfile %d\n",pst_stt.pst_max_nfile); + printf("DEBUG : Physical memory size %lu\n",pst_stt.physical_memory); + printf("DEBUG : Page size %lu\n",pst_stt.page_size); + printf("DEBUG : Max nfile %lu\n",pst_stt.pst_max_nfile); printf("DEBUG : Dynamic info\n"); - printf("DEBUG : Physical memory size %d\n",pst_dyn.psd_rm); - printf("DEBUG : Virtual Memory size %d\n",pst_dyn.psd_vm); - printf("DEBUG : Physical memory size %d active\n",pst_dyn.psd_arm); - printf("DEBUG : Virtual Memory size %d active\n",pst_dyn.psd_avm); - printf("DEBUG : Processors %d\n",pst_dyn.psd_proc_cnt); + printf("DEBUG : Physical memory size %lu\n",pst_dyn.psd_rm); + printf("DEBUG : Virtual Memory size %lu\n",pst_dyn.psd_vm); + printf("DEBUG : Physical memory size %lu active\n",pst_dyn.psd_arm); + printf("DEBUG : Virtual Memory size %lu active\n",pst_dyn.psd_avm); + printf("DEBUG : Processors %lu\n",pst_dyn.psd_proc_cnt); printf("DEBUG : VM Info\n"); - printf("DEBUG : Pages on disk backing %d\n",pst_vmm.psv_swapspc_cnt); - printf("DEBUG : Max pages on disk backing %d\n",pst_vmm.psv_swapspc_max); + printf("DEBUG : Pages on disk backing %lu\n",pst_vmm.psv_swapspc_cnt); + printf("DEBUG : Max pages on disk backing %lu\n",pst_vmm.psv_swapspc_max); } phys_mb = pst_stt.page_size / 1024; phys_mb = phys_mb * (pst_stt.physical_memory / 1024); @@ -1828,6 +1828,7 @@ if (!strcmp(month, mo_lookup[i])) return i+1; } + return 0; /* error */ } static void hp_check_index(char *index_path, char *desc, int yr, int mo) @@ -1920,7 +1921,6 @@ { char fbuf[MAXPATHLEN]; int i,pm= 0; - int not_su = 0; int found = 0; DIR *prod_dir = NULL; @@ -1928,7 +1928,6 @@ if (access(HP_PATCH_DIR,X_OK) == -1) { printf("\nWARNING : Only the superuser can check which patches are installed. You must\nrun dsktune as root to ensure the necessary patches are present. If required\npatches are not present, the server may not function correctly.\n\n"); - not_su = 1; return; } @@ -1978,17 +1977,17 @@ if (_SYSTEM_SUPPORTS_LP64OS(cpu64) == 0) { printf("WARNING: This system does not support 64 bit operating systems.\n\n"); } else { - if (flag_debug) printf("DEBUG : _SC_HW_32_64_CAPABLE 0x%x\n",cpu64); + if (flag_debug) printf("DEBUG : _SC_HW_32_64_CAPABLE 0x%lx\n",cpu64); } tmax = sysconf(_SC_THREAD_THREADS_MAX); if (tmax < 128) { - printf("WARNING: only %d threads are available in a process.\n", tmax); + printf("WARNING: only %lu threads are available in a process.\n", tmax); printf("NOTICE : use kmtune or sam Kernel Configuration Parameters to change max_thread_proc\n"); printf("and nkthreads as needed.\n\n"); } else { - if (flag_debug) printf("DEBUG : HP-UX max threads %ld\n", tmax); + if (flag_debug) printf("DEBUG : HP-UX max threads %lu\n", tmax); } /* XXX set ncallout (max number of pending timeouts ) to 128 + NPROC */ @@ -1998,7 +1997,7 @@ omax = sysconf(_SC_OPEN_MAX); if (omax < 120) { - printf("WARNING: only %d files can be opened at once in a process.\n",omax); + printf("WARNING: only %lu files can be opened at once in a process.\n",omax); printf("NOTICE : use kmtune or sam Kernel Configuration Parameters to change maxfiles.\n"); } else { if (flag_debug) printf("DEBUG : HP-UX maxfiles %ld\n", omax); @@ -2076,7 +2075,7 @@ if (ndd_get_tcp(name_tcp_time_wait_interval, &ndd_tcp_time_wait_interval) == 0) { if (ndd_tcp_time_wait_interval >= 240000) { if (flag_html) printf("

\n"); - printf("%s: The %s is set to %d milliseconds (%d seconds).\n" + printf("%s: The %s is set to %ld milliseconds (%ld seconds).\n" "This value should be reduced to allow for more simultaneous connections\n" "to the server.\n", flag_carrier ? "ERROR " : "WARNING", @@ -2094,12 +2093,12 @@ if (flag_carrier) flag_os_bad = 1; } else if (ndd_tcp_time_wait_interval < 10000) { if (flag_html) printf("

\n"); - printf("WARNING: The %s is set to %d milliseconds. Values below\n30000 may cause problems.\n\n", + printf("WARNING: The %s is set to %ld milliseconds. Values below\n30000 may cause problems.\n\n", name_tcp_time_wait_interval, ndd_tcp_time_wait_interval); if (flag_html) printf("

\n"); } else { if (flag_debug) { - printf("DEBUG : %s %d\n", name_tcp_time_wait_interval, ndd_tcp_time_wait_interval); + printf("DEBUG : %s %ld\n", name_tcp_time_wait_interval, ndd_tcp_time_wait_interval); } } } @@ -2163,7 +2162,7 @@ if (ndd_get_tcp(NAME_TCP_CONN_REQ_MAX_Q, &ndd_tcp_conn_req_max_q) == 0) { if (flag_html) printf("

\n"); if (ndd_tcp_conn_req_max_q < recommended_tcp_conn_req_max) { - printf("ERROR : The NDD %s value %d is lower than the recommended minimum, %d.\n\n", + printf("ERROR : The NDD %s value %ld is lower than the recommended minimum, %d.\n\n", NAME_TCP_CONN_REQ_MAX_Q, ndd_tcp_conn_req_max_q, recommended_tcp_conn_req_max); if (flag_solaris_251) { printf("ERROR : Patches %s and %s may need to be applied.\n\n", @@ -2172,17 +2171,17 @@ } } else if (ndd_tcp_conn_req_max_q >= ndd_tcp_conn_req_max_q0) { if (flag_debug) { - printf("DEBUG : %s %d\n", NAME_TCP_CONN_REQ_MAX_Q, ndd_tcp_conn_req_max_q); + printf("DEBUG : %s %ld\n", NAME_TCP_CONN_REQ_MAX_Q, ndd_tcp_conn_req_max_q); } } else { - printf("NOTICE : The %s value is currently %d, which will limit the\nvalue of listen backlog which can be configured. ", + printf("NOTICE : The %s value is currently %ld, which will limit the\nvalue of listen backlog which can be configured. ", NAME_TCP_CONN_REQ_MAX_Q, ndd_tcp_conn_req_max_q); #ifdef NAME_NDD_CFG_FILE printf("It can be raised by adding\nto %s, after any adb command, an entry similar to:\n", NAME_NDD_CFG_FILE); if (flag_html) printf("

\n");
 	printf("TRANSPORT_NAME[10]=tcp\n");
 	printf("NDD_NAME[10]=%s\n", NAME_TCP_CONN_REQ_MAX_Q);
-	printf("NDD_VALUE[10]=%d\n\n", ndd_tcp_conn_req_max_q0);
+	printf("NDD_VALUE[10]=%ld\n\n", ndd_tcp_conn_req_max_q0);
 	if (flag_html) printf("

\n"); #endif if (tcp_max_listen == 1024) { @@ -2193,7 +2192,7 @@ if (flag_html) printf("

\n"); if (tcp_max_listen && ndd_tcp_conn_req_max_q > tcp_max_listen) { - printf("WARNING: %s (value %d) is larger than the kernel will allow.\n\n", NAME_TCP_CONN_REQ_MAX_Q, ndd_tcp_conn_req_max_q); + printf("WARNING: %s (value %ld) is larger than the kernel will allow.\n\n", NAME_TCP_CONN_REQ_MAX_Q, ndd_tcp_conn_req_max_q); } if (flag_html) printf("

\n"); @@ -2784,7 +2783,7 @@ #if defined(RLIMIT_CORE) getrlimit(RLIMIT_CORE,&r); if (flag_debug) printf("DEBUG : RLIMIT_CORE is %ld, %ld\n", r.rlim_cur, r.rlim_max); - if (r.rlim_cur == -1 || r.rlim_cur >= 2147483647) { + if (r.rlim_cur == (unsigned long)-1 || r.rlim_cur >= 2147483647) { if (swap_mb <2048) { max_core = swap_mb; } else { @@ -3121,24 +3120,24 @@ switch(cpuvers) { case CPU_PA_RISC1_0: - sprintf(procstr,"hppa1.0/%d",cputype); + sprintf(procstr,"hppa1.0/%ld",cputype); break; case CPU_PA_RISC1_1: - sprintf(procstr,"hppa1.1/%d",cputype); + sprintf(procstr,"hppa1.1/%ld",cputype); break; case CPU_PA_RISC1_2: - sprintf(procstr,"hppa1.2/%d",cputype); + sprintf(procstr,"hppa1.2/%ld",cputype); break; case CPU_PA_RISC2_0: - sprintf(procstr,"hppa2.0/%d",cputype); + sprintf(procstr,"hppa2.0/%ld",cputype); break; #if defined(__ia64) case CPU_IA64_ARCHREV_0: - sprintf(procstr,"hpia0/%d",cputype); + sprintf(procstr,"hpia0/%ld",cputype); break; #endif default: - sprintf(procstr,"hppa_0x%x/%d",cpuvers,cputype); + sprintf(procstr,"hppa_0x%lx/%ld",cpuvers,cputype); break; } From fedora-directory-commits at redhat.com Thu Oct 18 01:22:31 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 17 Oct 2007 21:22:31 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts dscreate.map.in, 1.1, 1.2 Message-ID: <200710180122.l9I1MVaP004017@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3959/ldapserver/ldap/admin/src/scripts Modified Files: dscreate.map.in Log Message: Resolves: bug 250179 Description: tmpwatch whacks stats Reviewed by: nkinder (Thanks!) Fix Description: move the snmp slapd.stats file to run_dir (/var/run/dirsrv) and rename to slapd-instance.stats. Had to add nsslapd-rundir to cn=config in order for ldap-agent to be able to get it. Doc: Yes, we need to document the new attribute nsslapd-rundir. Index: dscreate.map.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/dscreate.map.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- dscreate.map.in 13 Jul 2007 18:35:32 -0000 1.1 +++ dscreate.map.in 18 Oct 2007 01:22:28 -0000 1.2 @@ -65,3 +65,4 @@ log_dir = log_dir config_dir = config_dir db_dir = db_dir +run_dir = run_dir From fedora-directory-commits at redhat.com Thu Oct 18 01:22:31 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 17 Oct 2007 21:22:31 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/ldif template-dse.ldif.in, 1.4, 1.5 Message-ID: <200710180122.l9I1MVgp004023@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/ldif In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3959/ldapserver/ldap/ldif Modified Files: template-dse.ldif.in Log Message: Resolves: bug 250179 Description: tmpwatch whacks stats Reviewed by: nkinder (Thanks!) Fix Description: move the snmp slapd.stats file to run_dir (/var/run/dirsrv) and rename to slapd-instance.stats. Had to add nsslapd-rundir to cn=config in order for ldap-agent to be able to get it. Doc: Yes, we need to document the new attribute nsslapd-rundir. Index: template-dse.ldif.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/ldif/template-dse.ldif.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- template-dse.ldif.in 25 Jul 2007 15:20:01 -0000 1.4 +++ template-dse.ldif.in 18 Oct 2007 01:22:29 -0000 1.5 @@ -9,6 +9,7 @@ nsslapd-certdir: %cert_dir% nsslapd-ldifdir: %ldif_dir% nsslapd-bakdir: %bak_dir% +nsslapd-rundir: %run_dir% nsslapd-instancedir: %inst_dir% nsslapd-accesslog-logging-enabled: on nsslapd-accesslog-maxlogsperdir: 10 From fedora-directory-commits at redhat.com Thu Oct 18 01:22:31 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 17 Oct 2007 21:22:31 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd agtmmap.h, 1.10, 1.11 libglobs.c, 1.22, 1.23 proto-slap.h, 1.30, 1.31 slap.h, 1.29, 1.30 snmp_collator.c, 1.11, 1.12 Message-ID: <200710180122.l9I1MVta004032@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3959/ldapserver/ldap/servers/slapd Modified Files: agtmmap.h libglobs.c proto-slap.h slap.h snmp_collator.c Log Message: Resolves: bug 250179 Description: tmpwatch whacks stats Reviewed by: nkinder (Thanks!) Fix Description: move the snmp slapd.stats file to run_dir (/var/run/dirsrv) and rename to slapd-instance.stats. Had to add nsslapd-rundir to cn=config in order for ldap-agent to be able to get it. Doc: Yes, we need to document the new attribute nsslapd-rundir. Index: agtmmap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/agtmmap.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- agtmmap.h 10 Nov 2006 23:45:40 -0000 1.10 +++ agtmmap.h 18 Oct 2007 01:22:29 -0000 1.11 @@ -79,7 +79,8 @@ #if !defined(_MAX_PATH) #define _MAX_PATH 256 #endif -#define AGT_STATS_FILE "slapd.stats" +#define AGT_STATS_EXTENSION ".stats" +#define AGT_STATS_FILE "slapd" AGT_STATS_EXTENSION #define AGT_MJR_VERSION 1 #define AGT_MNR_VERSION 0 Index: libglobs.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/libglobs.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- libglobs.c 5 Oct 2007 17:00:04 -0000 1.22 +++ libglobs.c 18 Oct 2007 01:22:29 -0000 1.23 @@ -573,6 +573,10 @@ {CONFIG_SASLPATH_ATTRIBUTE, config_set_saslpath, NULL, 0, (void**)&global_slapdFrontendConfig.saslpath, CONFIG_STRING, (ConfigGetFunc)config_get_saslpath}, + /* parameterizing run dir */ + {CONFIG_RUNDIR_ATTRIBUTE, config_set_rundir, + NULL, 0, + (void**)&global_slapdFrontendConfig.rundir, CONFIG_STRING, (ConfigGetFunc)config_get_rundir}, {CONFIG_REWRITE_RFC1274_ATTRIBUTE, config_set_rewrite_rfc1274, NULL, 0, (void**)&global_slapdFrontendConfig.rewrite_rfc1274, CONFIG_ON_OFF, NULL}, @@ -4728,6 +4732,43 @@ CFG_UNLOCK_WRITE(slapdFrontendConfig); return retVal; } + +char * +config_get_rundir() +{ + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + char *retVal; + + CFG_LOCK_READ(slapdFrontendConfig); + retVal = config_copy_strval(slapdFrontendConfig->rundir); + CFG_UNLOCK_READ(slapdFrontendConfig); + + return retVal; +} + +int +config_set_rundir(const char *attrname, char *value, char *errorbuf, int apply) +{ + int retVal = LDAP_SUCCESS; + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + + if ( config_value_is_null( attrname, value, errorbuf, 0 )) { + return LDAP_OPERATIONS_ERROR; + } + + if (!apply) { + return retVal; + } + + CFG_LOCK_WRITE(slapdFrontendConfig); + slapi_ch_free((void **)&slapdFrontendConfig->rundir); + + slapdFrontendConfig->rundir = slapi_ch_strdup(value); + + CFG_UNLOCK_WRITE(slapdFrontendConfig); + return retVal; +} + char * config_get_saslpath() { Index: proto-slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/proto-slap.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- proto-slap.h 18 Oct 2007 00:08:34 -0000 1.30 +++ proto-slap.h 18 Oct 2007 01:22:29 -0000 1.31 @@ -326,6 +326,7 @@ int config_set_certdir( const char *attrname, char *value, char *errorbuf, int apply ); int config_set_ldifdir( const char *attrname, char *value, char *errorbuf, int apply ); int config_set_bakdir( const char *attrname, char *value, char *errorbuf, int apply ); +int config_set_rundir( const char *attrname, char *value, char *errorbuf, int apply ); int config_set_saslpath( const char *attrname, char *value, char *errorbuf, int apply ); int config_set_attrname_exceptions( const char *attrname, char *value, char *errorbuf, int apply ); int config_set_hash_filters( const char *attrname, char *value, char *errorbuf, int apply ); @@ -438,6 +439,7 @@ char *config_get_certdir(); char *config_get_ldifdir(); char *config_get_bakdir(); +char *config_get_rundir(); char *config_get_saslpath(); char **config_get_errorlog_list(); char **config_get_accesslog_list(); Index: slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slap.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- slap.h 18 Oct 2007 00:08:34 -0000 1.29 +++ slap.h 18 Oct 2007 01:22:29 -0000 1.30 @@ -1727,6 +1727,7 @@ #define CONFIG_LDIFDIR_ATTRIBUTE "nsslapd-ldifdir" #define CONFIG_BAKDIR_ATTRIBUTE "nsslapd-bakdir" #define CONFIG_SASLPATH_ATTRIBUTE "nsslapd-saslpath" +#define CONFIG_RUNDIR_ATTRIBUTE "nsslapd-rundir" #define CONFIG_SSLCLIENTAUTH_ATTRIBUTE "nsslapd-SSLclientAuth" #define CONFIG_SSL_CHECK_HOSTNAME_ATTRIBUTE "nsslapd-ssl-check-hostname" #define CONFIG_HASH_FILTERS_ATTRIBUTE "nsslapd-hash-filters" @@ -1906,6 +1907,7 @@ char *certdir; /* full path name of directory containing cert files */ char *ldifdir; /* full path name of directory containing ldif files */ char *bakdir; /* full path name of directory containing bakup files */ + char *rundir; /* where pid, snmp stats, and ldapi files go */ char *saslpath; /* full path name of directory containing sasl plugins */ int attrname_exceptions; /* if true, allow questionable attribute names */ int rewrite_rfc1274; /* return attrs for both v2 and v3 names */ Index: snmp_collator.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/snmp_collator.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- snmp_collator.c 18 Oct 2007 00:08:34 -0000 1.11 +++ snmp_collator.c 18 Oct 2007 01:22:29 -0000 1.12 @@ -60,6 +60,7 @@ #include "prlock.h" #include "prerror.h" #include "prcvar.h" +#include "plstr.h" #include "snmp_collator.h" #include "../snmp/ntagt/nslagtcom_nt.h" @@ -397,8 +398,10 @@ { int err; - char *statspath = config_get_tmpdir(); + char *statspath = config_get_rundir(); char *lp = NULL; + char *instdir = config_get_configdir(); + char *instname = NULL; /* * Get directory for our stats file @@ -407,10 +410,18 @@ statspath = slapi_ch_strdup("/tmp"); } - PR_snprintf(szStatsFile, sizeof(szStatsFile), "%s/%s", - statspath, AGT_STATS_FILE); + instname = PL_strrstr(instdir, "slapd-"); + if (!instname) { + instname = PL_strrstr(instdir, "/"); + if (instname) { + instname++; + } + } + PR_snprintf(szStatsFile, sizeof(szStatsFile), "%s/%s%s", + statspath, instname, AGT_STATS_EXTENSION); tmpstatsfile = szStatsFile; - slapi_ch_free((void **) &statspath); + slapi_ch_free_string(&statspath); + slapi_ch_free_string(&instname); /* open the memory map */ if ((err = agt_mopen_stats(tmpstatsfile, O_RDWR, &hdl) != 0)) From fedora-directory-commits at redhat.com Thu Oct 18 01:22:31 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 17 Oct 2007 21:22:31 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/snmp main.c, 1.12, 1.13 Message-ID: <200710180122.l9I1MVK8004040@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/snmp In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3959/ldapserver/ldap/servers/snmp Modified Files: main.c Log Message: Resolves: bug 250179 Description: tmpwatch whacks stats Reviewed by: nkinder (Thanks!) Fix Description: move the snmp slapd.stats file to run_dir (/var/run/dirsrv) and rename to slapd-instance.stats. Had to add nsslapd-rundir to cn=config in order for ldap-agent to be able to get it. Doc: Yes, we need to document the new attribute nsslapd-rundir. Index: main.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/main.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- main.c 15 Oct 2007 19:19:32 -0000 1.12 +++ main.c 18 Oct 2007 01:22:29 -0000 1.13 @@ -318,6 +318,7 @@ int got_tmpdir = 0; int lineno = 0; char *entry = NULL; + char *instancename = NULL; /* Allocate a server_instance */ if ((serv_p = malloc(sizeof(server_instance))) == NULL) { @@ -330,6 +331,7 @@ p = p + 6; if ((p = strtok(p, " \t\n")) != NULL) { /* first token is the instance name */ + instancename = strdup(p); serv_p->dse_ldif = malloc(strlen(p) + strlen(SYSCONFDIR) + strlen(PACKAGE_NAME) + 12); if (serv_p->dse_ldif != NULL) { @@ -341,6 +343,8 @@ } else { printf("ldap-agent: malloc error processing config file\n"); error = 1; + free(instancename); + instancename = NULL; goto close_and_exit; } } @@ -350,6 +354,8 @@ printf("ldap-agent: Error opening server config file: %s\n", serv_p->dse_ldif); error = 1; + free(instancename); + instancename = NULL; goto close_and_exit; } @@ -376,16 +382,18 @@ if (strcmp(attr, "nsslapd-port") == 0) { serv_p->port = atol(val); got_port = 1; - } else if (strcmp(attr, "nsslapd-tmpdir") == 0) { + } else if (strcmp(attr, "nsslapd-rundir") == 0) { serv_p->stats_file = malloc(vlen + 13); if (serv_p->stats_file != NULL) { snprintf(serv_p->stats_file, vlen + 13, - "%s/slapd.stats", val); + "%s/%s.stats", instancename, val); serv_p->stats_file[(vlen + 12)] = (char)0; } else { printf("ldap-agent: malloc error processing config file\n"); free(entry); error = 1; + free(instancename); + instancename = NULL; goto close_and_exit; } got_tmpdir = 1; @@ -404,6 +412,8 @@ } } + free(instancename); + instancename = NULL; /* We're done reading entries from dse_ldif now, so * we can free entry */ free(entry); From fedora-directory-commits at redhat.com Thu Oct 18 01:41:16 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 17 Oct 2007 21:41:16 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSCreate.pm.in, 1.7, 1.8 Message-ID: <200710180141.l9I1fGEm004523@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4506/ldapserver/ldap/admin/src/scripts Modified Files: DSCreate.pm.in Log Message: Resolves: bug 250179 Description: tmpwatch whacks stats Fix Description: Move the default nsslapd-tmpdir to /tmp. Index: DSCreate.pm.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSCreate.pm.in,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- DSCreate.pm.in 28 Sep 2007 23:34:55 -0000 1.7 +++ DSCreate.pm.in 18 Oct 2007 01:41:13 -0000 1.8 @@ -774,9 +774,9 @@ if (!defined($inf->{slapd}->{tmp_dir})) { if ("@with_fhs_opt@") { - $inf->{slapd}->{tmp_dir} = "$localstatedir/@PACKAGE_NAME@/slapd-$servid/tmp"; + $inf->{slapd}->{tmp_dir} = "/tmp"; } else { - $inf->{slapd}->{tmp_dir} = "$localstatedir/tmp/@PACKAGE_NAME@/slapd-$servid"; + $inf->{slapd}->{tmp_dir} = "/tmp"; } } $ENV{DS_TMP_DIR} = $inf->{slapd}->{tmp_dir}; From fedora-directory-commits at redhat.com Thu Oct 18 14:05:27 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Thu, 18 Oct 2007 10:05:27 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd snmp_collator.c, 1.12, 1.13 Message-ID: <200710181405.l9IE5R8X024662@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24642 Modified Files: snmp_collator.c Log Message: Have to free instdir not instname Index: snmp_collator.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/snmp_collator.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- snmp_collator.c 18 Oct 2007 01:22:29 -0000 1.12 +++ snmp_collator.c 18 Oct 2007 14:05:24 -0000 1.13 @@ -421,7 +421,7 @@ statspath, instname, AGT_STATS_EXTENSION); tmpstatsfile = szStatsFile; slapi_ch_free_string(&statspath); - slapi_ch_free_string(&instname); + slapi_ch_free_string(&instdir); /* open the memory map */ if ((err = agt_mopen_stats(tmpstatsfile, O_RDWR, &hdl) != 0)) From fedora-directory-commits at redhat.com Thu Oct 18 18:26:23 2007 From: fedora-directory-commits at redhat.com (Robert Crittenden (rcritten)) Date: Thu, 18 Oct 2007 14:26:23 -0400 Subject: [Fedora-directory-commits] mod_nss mod_nss.c, 1.16, 1.17 mod_nss.h, 1.18, 1.19 nss_engine_vars.c, 1.9, 1.10 Message-ID: <200710181826.l9IIQNfs030808@cvs-int.fedora.redhat.com> Author: rcritten Update of /cvs/dirsec/mod_nss In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30785 Modified Files: mod_nss.c mod_nss.h nss_engine_vars.c Log Message: If mod_ssl isn't loaded then register the hooks to mod_proxy so we can do at least secure proxy in front of an unsecure host. Index: mod_nss.c =================================================================== RCS file: /cvs/dirsec/mod_nss/mod_nss.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- mod_nss.c 31 May 2007 21:36:03 -0000 1.16 +++ mod_nss.c 18 Oct 2007 18:26:21 -0000 1.17 @@ -200,6 +200,10 @@ return 1; } +int ssl_proxy_enable(conn_rec *c) { + return nss_proxy_enable(c); +} + int nss_engine_disable(conn_rec *c) { SSLSrvConfigRec *sc = mySrvConfig(c->base_server); @@ -217,6 +221,10 @@ return 1; } +int ssl_engine_disable(conn_rec *c) { + return nss_engine_disable(c); +} + /* Callback for an incoming certificate that is not valid */ SECStatus NSSBadCertHandler(void *arg, PRFileDesc * socket) @@ -430,6 +438,12 @@ APR_REGISTER_OPTIONAL_FN(nss_proxy_enable); APR_REGISTER_OPTIONAL_FN(nss_engine_disable); + + /* If mod_ssl is not loaded then mod_nss can work with mod_proxy */ + if (APR_RETRIEVE_OPTIONAL_FN(ssl_proxy_enable) == NULL) + APR_REGISTER_OPTIONAL_FN(ssl_proxy_enable); + if (APR_RETRIEVE_OPTIONAL_FN(ssl_engine_disable) == NULL) + APR_REGISTER_OPTIONAL_FN(ssl_engine_disable); } module AP_MODULE_DECLARE_DATA nss_module = { Index: mod_nss.h =================================================================== RCS file: /cvs/dirsec/mod_nss/mod_nss.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- mod_nss.h 31 May 2007 21:36:03 -0000 1.18 +++ mod_nss.h 18 Oct 2007 18:26:21 -0000 1.19 @@ -419,24 +419,34 @@ /* Variables */ void nss_var_register(void); char *nss_var_lookup(apr_pool_t *, server_rec *, conn_rec *, request_rec *, char *); +char *ssl_var_lookup(apr_pool_t *, server_rec *, conn_rec *, request_rec *, char *); void nss_var_log_config_register(apr_pool_t *p); APR_DECLARE_OPTIONAL_FN(char *, nss_var_lookup, (apr_pool_t *, server_rec *, conn_rec *, request_rec *, char *)); +APR_DECLARE_OPTIONAL_FN(char *, ssl_var_lookup, + (apr_pool_t *, server_rec *, + conn_rec *, request_rec *, + char *)); /* An optional function which returns non-zero if the given connection * is using SSL/TLS. */ APR_DECLARE_OPTIONAL_FN(int, nss_is_https, (conn_rec *)); +APR_DECLARE_OPTIONAL_FN(int, ssl_is_https, (conn_rec *)); /* Proxy Support */ int nss_proxy_enable(conn_rec *c); int nss_engine_disable(conn_rec *c); +int ssl_proxy_enable(conn_rec *c); +int ssl_engine_disable(conn_rec *c); APR_DECLARE_OPTIONAL_FN(int, nss_proxy_enable, (conn_rec *)); +APR_DECLARE_OPTIONAL_FN(int, ssl_proxy_enable, (conn_rec *)); APR_DECLARE_OPTIONAL_FN(int, nss_engine_disable, (conn_rec *)); +APR_DECLARE_OPTIONAL_FN(int, ssl_engine_disable, (conn_rec *)); /* I/O */ PRFileDesc * nss_io_new_fd(); Index: nss_engine_vars.c =================================================================== RCS file: /cvs/dirsec/mod_nss/nss_engine_vars.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- nss_engine_vars.c 31 May 2007 21:36:03 -0000 1.9 +++ nss_engine_vars.c 18 Oct 2007 18:26:21 -0000 1.10 @@ -46,10 +46,21 @@ return sslconn && sslconn->ssl; } +static int ssl_is_https(conn_rec *c) { + return nss_is_https(c); +} + void nss_var_register(void) { APR_REGISTER_OPTIONAL_FN(nss_is_https); APR_REGISTER_OPTIONAL_FN(nss_var_lookup); + + /* These can only be registered if mod_ssl is not loaded */ + if (APR_RETRIEVE_OPTIONAL_FN(ssl_is_https) == NULL) + APR_REGISTER_OPTIONAL_FN(ssl_is_https); + if (APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup) == NULL) + APR_REGISTER_OPTIONAL_FN(ssl_var_lookup); + return; } @@ -241,6 +252,10 @@ return result; } +char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r, char *var) { + return nss_var_lookup(p, s, c, r, var); +} + static char *nss_var_lookup_header(apr_pool_t *p, request_rec *r, const char *name) { char *hdr = NULL; From fedora-directory-commits at redhat.com Thu Oct 18 19:20:18 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Thu, 18 Oct 2007 15:20:18 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/snmp main.c, 1.13, 1.14 Message-ID: <200710181920.l9IJKIIK009053@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/snmp In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9009/ldap/servers/snmp Modified Files: main.c Log Message: Resolves: 338611 Summary: Sleep longer when waiting for ldap-agent to start. Index: main.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/main.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- main.c 18 Oct 2007 01:22:29 -0000 1.13 +++ main.c 18 Oct 2007 19:20:16 -0000 1.14 @@ -172,15 +172,23 @@ /* run as a daemon */ if (netsnmp_daemonize(0, 0)) { + int i; + /* sleep to allow pidfile to be created by child */ - sleep(5); - if((pid_fp = fopen(pidfile,"r")) == NULL) { - printf("ldap-agent: Not started! Check log file for details.\n"); + for (i=0; i < 3; i++) { + sleep(5); + if((pid_fp = fopen(pidfile,"r")) != NULL) { + break; + } + } + + if(!pid_fp) { + printf("ldap-agent: Not started after 15 seconds! Check log file for details.\n"); exit(1); - } else { - fscanf(pid_fp, "%d", &child_pid); - fclose(pid_fp); } + + fscanf(pid_fp, "%d", &child_pid); + fclose(pid_fp); printf("ldap-agent: Started as pid %d\n", child_pid); exit(1); } @@ -315,7 +323,7 @@ } } else if ((p = strstr(line, "server")) != NULL) { int got_port = 0; - int got_tmpdir = 0; + int got_rundir = 0; int lineno = 0; char *entry = NULL; char *instancename = NULL; @@ -376,7 +384,7 @@ if ((strcmp(attr, "dn") == 0) && (strcmp(val, "cn=config") == 0)) { char *dse_line = NULL; - /* Look for port and tmpdir attributes */ + /* Look for port and rundir attributes */ while ((dse_line = ldif_getline(&entryp)) != NULL) { ldif_parse_line(dse_line, &attr, &val, &vlen); if (strcmp(attr, "nsslapd-port") == 0) { @@ -396,16 +404,16 @@ instancename = NULL; goto close_and_exit; } - got_tmpdir = 1; + got_rundir = 1; } /* Stop processing this entry if we found the - * port and tmpdir settings */ - if (got_port && got_tmpdir) { + * port and rundir settings */ + if (got_port && got_rundir) { break; } } - /* The port and tmpdir settings must be in the + /* The port and rundir settings must be in the * cn=config entry, so we can stop reading through * the dse.ldif now. */ break; @@ -425,8 +433,8 @@ "server config file: %s\n", serv_p->dse_ldif); error = 1; goto close_and_exit; - } else if (!got_tmpdir) { - printf("ldap-agent: Error reading nsslapd-tmpdir from " + } else if (!got_rundir) { + printf("ldap-agent: Error reading nsslapd-rundir from " "server config file: %s\n", serv_p->dse_ldif); error = 1; goto close_and_exit; From fedora-directory-commits at redhat.com Thu Oct 18 19:20:19 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Thu, 18 Oct 2007 15:20:19 -0400 Subject: [Fedora-directory-commits] ldapserver/wrappers ldap-agent.in, 1.4, 1.5 Message-ID: <200710181920.l9IJKJEx009059@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/wrappers In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9009/wrappers Modified Files: ldap-agent.in Log Message: Resolves: 338611 Summary: Sleep longer when waiting for ldap-agent to start. Index: ldap-agent.in =================================================================== RCS file: /cvs/dirsec/ldapserver/wrappers/ldap-agent.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ldap-agent.in 9 Aug 2007 23:59:23 -0000 1.4 +++ ldap-agent.in 18 Oct 2007 19:20:16 -0000 1.5 @@ -8,6 +8,9 @@ BIN_DIR=@bindir@ COMMAND=ldap-agent-bin +# We don't need to load any mibs, so set MIBS to nothing. +MIBS= +export MIBS ############################################################################### ## (2) Set the LD_LIBRARY_PATH environment variable to determine the ## From fedora-directory-commits at redhat.com Thu Oct 18 20:27:00 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Thu, 18 Oct 2007 16:27:00 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/rsearch infadd.c, 1.4, 1.5 Message-ID: <200710182027.l9IKR0hf018300@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18274 Modified Files: infadd.c Log Message: Resolves: 336871 Summary: Look for infadd data files in TEMPLATEDIR. Index: infadd.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/infadd.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- infadd.c 18 Oct 2007 00:08:35 -0000 1.4 +++ infadd.c 18 Oct 2007 20:26:58 -0000 1.5 @@ -157,7 +157,7 @@ AddThread **threads; PRUint32 total = 0, ntotal = 0; int counter; - char familynames[35], givennames[35]; + char familynames[strlen(TEMPLATEDIR) + 19], givennames[strlen(TEMPLATEDIR) + 18]; srand(time(NULL)); if (argc < 2) { @@ -241,14 +241,8 @@ fill_table(family_names, use_random); } else { - if (!access("../data/dbgen-FamilyNames", R_OK)) { - strcpy(familynames, "../data/dbgen-FamilyNames"); - strcpy(givennames, "../data/dbgen-GivenNames"); - } - else { - strcpy(familynames, "../../data/dbgen-FamilyNames"); - strcpy(givennames, "../../data/dbgen-GivenNames"); - } + strcpy(familynames, TEMPLATEDIR "/dbgen-FamilyNames"); + strcpy(givennames, TEMPLATEDIR "/dbgen-GivenNames"); fprintf(stdout, "Loading Given-Names ...\n"); if (!nt_load(given_names, givennames)) { fprintf(stdout, "*** Failed to read name table\n"); From fedora-directory-commits at redhat.com Thu Oct 18 20:49:03 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Thu, 18 Oct 2007 16:49:03 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd pblock.c, 1.11, 1.12 Message-ID: <200710182049.l9IKn3qV019426@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19310 Modified Files: pblock.c Log Message: Resolves: #193724 Summary: "nested" filtered roles result in deadlock (comment #16) Description: fixed a memory leak introduced in the previous checkins (comment #12) Index: pblock.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pblock.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- pblock.c 5 Oct 2007 23:31:07 -0000 1.11 +++ pblock.c 18 Oct 2007 20:49:01 -0000 1.12 @@ -102,6 +102,7 @@ { operation_free(&pb->pb_op,pb->pb_conn); } + slapi_ch_free((void**)&(pb->pb_vattr_context)); slapi_ch_free((void**)&(pb->pb_result_text)); } From fedora-directory-commits at redhat.com Thu Oct 18 20:55:13 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Thu, 18 Oct 2007 16:55:13 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl aclparse.c, 1.7, 1.8 Message-ID: <200710182055.l9IKtD73019807@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19790/ldapserver/ldap/servers/plugins/acl Modified Files: aclparse.c Log Message: Resolves: bug 232910 Bug Description: ACI targetattr list parser is whitespace sensitive Reviewed by: nkinder, nhosoi (Thanks!) Files: see diff Branch: HEAD Fix Description: Need to trim trailing whitespace from the targetattr clause. I noticed that targetattrfilters had the same problem, except it returned ACL_SYNTAX_ERR in that case, so I changed targetattr to do the same. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no Index: aclparse.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclparse.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- aclparse.c 18 Oct 2007 00:08:27 -0000 1.7 +++ aclparse.c 18 Oct 2007 20:55:10 -0000 1.8 @@ -1232,10 +1232,16 @@ s = strchr (attr_val, '='); s++; __acl_strip_leading_space(&s); + __acl_strip_trailing_space(s); len = strlen(s); if (*s == '"' && s[len-1] == '"') { s[len-1] = '\0'; s++; + } else { + slapi_log_error(SLAPI_LOG_FATAL, plugin_name, + "__aclp__init_targetattr: Error: The statement does not begin and end with a \": [%s]\n", + s); + return ACL_SYNTAX_ERR; } str = s; @@ -1635,12 +1641,15 @@ s = strchr (input_str, '='); s++; /* skip the = */ __acl_strip_leading_space(&s); /* skip to next significant character */ + __acl_strip_trailing_space(s); len = strlen(s); /* Knock off the " and trailing ) */ if (*s == '"' && s[len-1] == '"') { s[len-1] = '\0'; s++; /* skip the first " */ } else { /* No matching quotes */ - + slapi_log_error(SLAPI_LOG_FATAL, plugin_name, + "__aclp__init_targetattrfilters: Error: The statement does not begin and end with a \": [%s]\n", + s); return (ACL_SYNTAX_ERR); } From fedora-directory-commits at redhat.com Thu Oct 18 22:25:16 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Thu, 18 Oct 2007 18:25:16 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl acllas.c, 1.8, 1.9 Message-ID: <200710182225.l9IMPG8c003960@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3904/ldapserver/ldap/servers/plugins/acl Modified Files: acllas.c Log Message: Resolves: bug 297221 Bug Description: rhds71 Malformed Dynamic Authorization Group makes Directory Server Crash Reviewed by: nhosoi (Thanks!) Fix Description: The problem was that we were not checking the return value of slapi_str2filter(). I added a check at the crash site, and it will not print out a helpful error message. I did a search through the code looking for other similar places and found a couple. I added similar code in those places. I added an initialization of a buffer to null, as suggested by nhosoi. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no Index: acllas.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acllas.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- acllas.c 18 Oct 2007 00:08:27 -0000 1.8 +++ acllas.c 18 Oct 2007 22:25:13 -0000 1.9 @@ -3027,6 +3027,14 @@ /* Convert the filter string */ f = slapi_str2filter ( ludp->lud_filter ); + if (f == NULL) { /* bogus filter */ + slapi_log_error(SLAPI_LOG_FATAL, plugin_name, + "DS_LASUserAttrEval: The member URL search filter in entry [%s] is not valid: [%s]\n", + n_clientdn, ludp->lud_filter); + ldap_free_urldesc( ludp ); + return ACL_FALSE; + } + rc = ACL_TRUE; if (0 != slapi_vattr_filter_test ( aclpb->aclpb_pblock, aclpb->aclpb_client_entry, f, 0 /* no acces chk */ )) From fedora-directory-commits at redhat.com Thu Oct 18 22:25:16 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Thu, 18 Oct 2007 18:25:16 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/dna dna.c, 1.2, 1.3 Message-ID: <200710182225.l9IMPGhU003966@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/dna In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3904/ldapserver/ldap/servers/plugins/dna Modified Files: dna.c Log Message: Resolves: bug 297221 Bug Description: rhds71 Malformed Dynamic Authorization Group makes Directory Server Crash Reviewed by: nhosoi (Thanks!) Fix Description: The problem was that we were not checking the return value of slapi_str2filter(). I added a check at the crash site, and it will not print out a helpful error message. I did a search through the code looking for other similar places and found a couple. I added similar code in those places. I added an initialization of a buffer to null, as suggested by nhosoi. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no Index: dna.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/dna/dna.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- dna.c 18 Oct 2007 00:08:28 -0000 1.2 +++ dna.c 18 Oct 2007 22:25:14 -0000 1.3 @@ -512,7 +512,12 @@ value = slapi_entry_attr_get_charptr(e, DNA_FILTER); if (value) { - entry->filter = slapi_str2filter(value); + if (NULL == (entry->filter = slapi_str2filter(value))) { + slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM , + "Error: Invalid search filter in entry [%s]: [%s]\n", + entry->dn, value); + goto bail; + } } else goto bail; @@ -1170,6 +1175,7 @@ printf("<---- prefix ---------> %s\n", entry->prefix); printf("<---- next value -----> %lu\n", entry->nextval); printf("<---- interval -------> %lu\n", entry->interval); + buffer[0] = '\0'; printf("<---- filter ---------> %s\n", slapi_filter_to_string_internal((const struct slapi_filter *)entry->filter, buffer, &bufsiz)); printf("<---- generate flag --> %s\n", entry->generate); From fedora-directory-commits at redhat.com Thu Oct 18 22:25:16 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Thu, 18 Oct 2007 18:25:16 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/statechange statechange.c, 1.6, 1.7 Message-ID: <200710182225.l9IMPGBE003973@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/statechange In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3904/ldapserver/ldap/servers/plugins/statechange Modified Files: statechange.c Log Message: Resolves: bug 297221 Bug Description: rhds71 Malformed Dynamic Authorization Group makes Directory Server Crash Reviewed by: nhosoi (Thanks!) Fix Description: The problem was that we were not checking the return value of slapi_str2filter(). I added a check at the crash site, and it will not print out a helpful error message. I did a search through the code looking for other similar places and found a couple. I added similar code in those places. I added an initialization of a buffer to null, as suggested by nhosoi. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no Index: statechange.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/statechange/statechange.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- statechange.c 10 Nov 2006 23:45:30 -0000 1.6 +++ statechange.c 18 Oct 2007 22:25:14 -0000 1.7 @@ -331,7 +331,17 @@ item->dn = 0; item->filter = slapi_ch_strdup(filter); item->caller_data = caller_data; - item->realfilter = slapi_str2filter(writable_filter); + if (NULL == (item->realfilter = slapi_str2filter(writable_filter))) { + slapi_log_error(SLAPI_LOG_FATAL, SCN_PLUGIN_SUBSYSTEM, + "Error: invalid filter in statechange entry [%s]: [%s]\n", + dn, filter); + slapi_ch_free_string(&item->caller_id); + slapi_ch_free_string(&item->dn); + slapi_ch_free_string(&item->filter); + slapi_ch_free_string(&writable_filter); + slapi_ch_free((void **)&item); + return -1; + } item->func = func; slapi_lock_mutex(buffer_lock); From fedora-directory-commits at redhat.com Thu Oct 18 22:25:16 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Thu, 18 Oct 2007 18:25:16 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd index_subsystem.c, 1.7, 1.8 Message-ID: <200710182225.l9IMPGst003980@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3904/ldapserver/ldap/servers/slapd Modified Files: index_subsystem.c Log Message: Resolves: bug 297221 Bug Description: rhds71 Malformed Dynamic Authorization Group makes Directory Server Crash Reviewed by: nhosoi (Thanks!) Fix Description: The problem was that we were not checking the return value of slapi_str2filter(). I added a check at the crash site, and it will not print out a helpful error message. I did a search through the code looking for other similar places and found a couple. I added similar code in those places. I added an initialization of a buffer to null, as suggested by nhosoi. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no Index: index_subsystem.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/index_subsystem.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- index_subsystem.c 18 Oct 2007 00:08:34 -0000 1.7 +++ index_subsystem.c 18 Oct 2007 22:25:14 -0000 1.8 @@ -1030,7 +1030,7 @@ Slapi_Filter *tmp_f = slapi_str2filter(registration_item->index_filter); Slapi_Backend *be; - if(!theCache) + if(!theCache || !tmp_f) return -1; index_subsys_write_lock(); From fedora-directory-commits at redhat.com Thu Oct 18 22:40:20 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Thu, 18 Oct 2007 18:40:20 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication repl5_plugins.c, 1.9, 1.10 repl5_replica.c, 1.15, 1.16 Message-ID: <200710182240.l9IMeK42004948@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4834/plugins/replication Modified Files: repl5_plugins.c repl5_replica.c Log Message: Resolves #329951 Summary: MMR: Supplier does not respond anymore after many operations (deletes) Description: introduce OP_FLAG_REPL_RUV. It's set in repl5_replica.c if the entry is RUV. The operation should not be blocked at the backend SERIAL lock (this is achieved by having OP_FLAG_REPL_FIXUP set in the operation flag). But updating RUV has nothing to do with VLV, thus if the flag is set, it skips the VLV indexing. Index: repl5_plugins.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_plugins.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- repl5_plugins.c 18 Oct 2007 00:08:31 -0000 1.9 +++ repl5_plugins.c 18 Oct 2007 22:40:17 -0000 1.10 @@ -846,39 +846,39 @@ static void copy_operation_parameters(Slapi_PBlock *pb) { - Slapi_Operation *op = NULL; - struct slapi_operation_parameters *op_params; - supplier_operation_extension *opext; + Slapi_Operation *op = NULL; + struct slapi_operation_parameters *op_params; + supplier_operation_extension *opext; Object *repl_obj; Replica *replica; - + repl_obj = replica_get_replica_for_op (pb); /* we are only interested in the updates to replicas */ if (repl_obj) { /* we only save the original operation parameters for replicated operations - since client operations don't go through urp engine and pblock data can be logged */ - slapi_pblock_get( pb, SLAPI_OPERATION, &op ); - PR_ASSERT (op); + since client operations don't go through urp engine and pblock data can be logged */ + slapi_pblock_get( pb, SLAPI_OPERATION, &op ); + PR_ASSERT (op); replica = (Replica*)object_get_data (repl_obj); - PR_ASSERT (replica); + PR_ASSERT (replica); opext = (supplier_operation_extension*) repl_sup_get_ext (REPL_SUP_EXT_OP, op); - if (operation_is_flag_set(op,OP_FLAG_REPLICATED) && + if (operation_is_flag_set(op,OP_FLAG_REPLICATED) && !operation_is_flag_set(op, OP_FLAG_REPL_FIXUP)) - { - slapi_pblock_get (pb, SLAPI_OPERATION_PARAMETERS, &op_params); - opext->operation_parameters= operation_parameters_dup(op_params); - } - - /* this condition is needed to avoid re-entering lock when - ruv state is updated */ + { + slapi_pblock_get (pb, SLAPI_OPERATION_PARAMETERS, &op_params); + opext->operation_parameters= operation_parameters_dup(op_params); + } + + /* this condition is needed to avoid re-entering backend serial lock + when ruv state is updated */ if (!operation_is_flag_set(op, OP_FLAG_REPL_FIXUP)) { - /* save replica generation in case it changes */ - opext->repl_gen = replica_get_generation (replica); + /* save replica generation in case it changes */ + opext->repl_gen = replica_get_generation (replica); } object_release (repl_obj); Index: repl5_replica.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_replica.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- repl5_replica.c 18 Oct 2007 00:08:31 -0000 1.15 +++ repl5_replica.c 18 Oct 2007 22:40:17 -0000 1.16 @@ -2258,7 +2258,8 @@ RUV_STORAGE_ENTRY_UNIQUEID, repl_get_plugin_identity (PLUGIN_MULTIMASTER_REPLICATION), /* Add OP_FLAG_TOMBSTONE_ENTRY so that this doesn't get logged in the Retro ChangeLog */ - OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP | OP_FLAG_TOMBSTONE_ENTRY); + OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP | OP_FLAG_TOMBSTONE_ENTRY | + OP_FLAG_REPL_RUV ); slapi_modify_internal_pb (pb); slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc); @@ -2732,7 +2733,8 @@ e, NULL /* controls */, repl_get_plugin_identity(PLUGIN_MULTIMASTER_REPLICATION), - OP_FLAG_TOMBSTONE_ENTRY | OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP); + OP_FLAG_TOMBSTONE_ENTRY | OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP | + OP_FLAG_REPL_RUV); slapi_add_internal_pb(pb); slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &return_value); if (return_value == LDAP_SUCCESS) @@ -3064,7 +3066,7 @@ NULL, /* controls */ RUV_STORAGE_ENTRY_UNIQUEID, repl_get_plugin_identity (PLUGIN_MULTIMASTER_REPLICATION), - OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP); + OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP | OP_FLAG_REPL_RUV); slapi_modify_internal_pb (pb); From fedora-directory-commits at redhat.com Thu Oct 18 22:40:20 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Thu, 18 Oct 2007 18:40:20 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd slapi-private.h, 1.19, 1.20 Message-ID: <200710182240.l9IMeKEh004954@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4834/slapd Modified Files: slapi-private.h Log Message: Resolves #329951 Summary: MMR: Supplier does not respond anymore after many operations (deletes) Description: introduce OP_FLAG_REPL_RUV. It's set in repl5_replica.c if the entry is RUV. The operation should not be blocked at the backend SERIAL lock (this is achieved by having OP_FLAG_REPL_FIXUP set in the operation flag). But updating RUV has nothing to do with VLV, thus if the flag is set, it skips the VLV indexing. Index: slapi-private.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-private.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- slapi-private.h 18 Oct 2007 00:08:34 -0000 1.19 +++ slapi-private.h 18 Oct 2007 22:40:18 -0000 1.20 @@ -382,27 +382,43 @@ /* operation.c */ -#define OP_FLAG_PS 0x00001 -#define OP_FLAG_PS_CHANGESONLY 0x00002 -#define OP_FLAG_GET_EFFECTIVE_RIGHTS 0x00004 -#define OP_FLAG_REPLICATED 0x00008 /* A Replicated Operation */ -#define OP_FLAG_REPL_FIXUP 0x00010 /* A Fixup Operation, generated as a - * consequence of a Replicated Operation. */ -#define OP_FLAG_INTERNAL 0x00020 /* An operation generated by the core - * server or a plugin. */ -#define OP_FLAG_ACTION_LOG_ACCESS 0x00040 -#define OP_FLAG_ACTION_LOG_AUDIT 0x00080 -#define OP_FLAG_ACTION_SCHEMA_CHECK 0x00100 -#define OP_FLAG_ACTION_LOG_CHANGES 0x00200 -#define OP_FLAG_ACTION_INVOKE_FOR_REPLOP 0x00400 -#define OP_FLAG_NEVER_CHAIN SLAPI_OP_FLAG_NEVER_CHAIN /* 0x0800 */ -#define OP_FLAG_TOMBSTONE_ENTRY 0x01000 -#define OP_FLAG_RESURECT_ENTRY 0x02000 -#define OP_FLAG_LEGACY_REPLICATION_DN 0x04000 /* Operation done by legacy replication DN */ -#define OP_FLAG_ACTION_NOLOG 0x08000 /* Do not log the entry in audit log or - * change log */ -#define OP_FLAG_SKIP_MODIFIED_ATTRS 0x10000 /* Do not update the modifiersname, - * modifiedtimestamp, etc. attributes */ +#define OP_FLAG_PS 0x00001 +#define OP_FLAG_PS_CHANGESONLY 0x00002 +#define OP_FLAG_GET_EFFECTIVE_RIGHTS 0x00004 +#define OP_FLAG_REPLICATED 0x00008 /* A Replicated Operation */ +#define OP_FLAG_REPL_FIXUP 0x00010 /* A Fixup Operation, + * generated as a consequence + * of a Replicated Operation. + */ +#define OP_FLAG_INTERNAL 0x00020 /* An operation generated by + * the core server or a plugin. + */ +#define OP_FLAG_ACTION_LOG_ACCESS 0x00040 +#define OP_FLAG_ACTION_LOG_AUDIT 0x00080 +#define OP_FLAG_ACTION_SCHEMA_CHECK 0x00100 +#define OP_FLAG_ACTION_LOG_CHANGES 0x00200 +#define OP_FLAG_ACTION_INVOKE_FOR_REPLOP 0x00400 +#define OP_FLAG_NEVER_CHAIN SLAPI_OP_FLAG_NEVER_CHAIN /* 0x0800 */ +#define OP_FLAG_TOMBSTONE_ENTRY 0x01000 +#define OP_FLAG_RESURECT_ENTRY 0x02000 +#define OP_FLAG_LEGACY_REPLICATION_DN 0x04000 /* Operation done by legacy + * replication DN + */ +#define OP_FLAG_ACTION_NOLOG 0x08000 /* Do not log the entry in + * audit log or change log + */ +#define OP_FLAG_SKIP_MODIFIED_ATTRS 0x10000 /* Do not update the + * modifiersname, + * modifiedtimestamp, etc. + * attributes + */ +#define OP_FLAG_REPL_RUV 0x20000 /* Flag to tell to the backend + * that the entry to be added/ + * modified is RUV. This info + * is used to skip VLV op. + * (see #329951) + */ + CSN *operation_get_csn(Slapi_Operation *op); void operation_set_csn(Slapi_Operation *op,CSN *csn); From fedora-directory-commits at redhat.com Thu Oct 18 22:40:20 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Thu, 18 Oct 2007 18:40:20 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm ldbm_add.c, 1.7, 1.8 ldbm_delete.c, 1.7, 1.8 ldbm_modify.c, 1.5, 1.6 ldbm_modrdn.c, 1.6, 1.7 Message-ID: <200710182240.l9IMeKpS004960@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4834/slapd/back-ldbm Modified Files: ldbm_add.c ldbm_delete.c ldbm_modify.c ldbm_modrdn.c Log Message: Resolves #329951 Summary: MMR: Supplier does not respond anymore after many operations (deletes) Description: introduce OP_FLAG_REPL_RUV. It's set in repl5_replica.c if the entry is RUV. The operation should not be blocked at the backend SERIAL lock (this is achieved by having OP_FLAG_REPL_FIXUP set in the operation flag). But updating RUV has nothing to do with VLV, thus if the flag is set, it skips the VLV indexing. Index: ldbm_add.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_add.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ldbm_add.c 1 Oct 2007 18:52:35 -0000 1.7 +++ ldbm_add.c 18 Oct 2007 22:40:18 -0000 1.8 @@ -104,6 +104,7 @@ int is_resurect_operation= 0; int is_tombstone_operation= 0; int is_fixup_operation= 0; + int is_ruv = 0; /* True if the current entry is RUV */ CSN *opcsn = NULL; entry_address addr; @@ -118,12 +119,13 @@ is_resurect_operation= operation_is_flag_set(operation,OP_FLAG_RESURECT_ENTRY); is_tombstone_operation= operation_is_flag_set(operation,OP_FLAG_TOMBSTONE_ENTRY); - is_fixup_operation = operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP); + is_fixup_operation = operation_is_flag_set(operation, OP_FLAG_REPL_FIXUP); + is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV); inst = (ldbm_instance *) be->be_instance_info; - - slapi_sdn_init(&sdn); - slapi_sdn_init(&parentsdn); + + slapi_sdn_init(&sdn); + slapi_sdn_init(&parentsdn); /* Get rid of ldbm backend attributes that you are not allowed to specify yourself */ slapi_entry_delete_values( e, hassubordinates, NULL ); @@ -145,7 +147,7 @@ dblock_acquired= 1; } - rc= 0; + rc= 0; /* * We are about to pass the last abandon test, so from now on we are @@ -166,8 +168,8 @@ rc= slapi_setbit_int(rc,SLAPI_RTN_BIT_FETCH_EXISTING_DN_ENTRY); } rc= slapi_setbit_int(rc,SLAPI_RTN_BIT_FETCH_EXISTING_UNIQUEID_ENTRY); - rc= slapi_setbit_int(rc,SLAPI_RTN_BIT_FETCH_PARENT_ENTRY); - while(rc!=0) + rc= slapi_setbit_int(rc,SLAPI_RTN_BIT_FETCH_PARENT_ENTRY); + while(rc!=0) { /* JCM - copying entries can be expensive... should optimize */ /* @@ -175,20 +177,20 @@ * backend pre-op plugin. To ensure a consistent snapshot of this state * we wrap the reading of the entry with the dblock. */ - if(slapi_isbitset_int(rc,SLAPI_RTN_BIT_FETCH_EXISTING_UNIQUEID_ENTRY)) + if(slapi_isbitset_int(rc,SLAPI_RTN_BIT_FETCH_EXISTING_UNIQUEID_ENTRY)) { - /* Check if an entry with the intended uniqueid already exists. */ + /* Check if an entry with the intended uniqueid already exists. */ done_with_pblock_entry(pb,SLAPI_ADD_EXISTING_UNIQUEID_ENTRY); /* Could be through this multiple times */ addr.dn = NULL; addr.uniqueid = (char*)slapi_entry_get_uniqueid(e); /* jcm - cast away const */ ldap_result_code= get_copy_of_entry(pb, &addr, &txn, SLAPI_ADD_EXISTING_UNIQUEID_ENTRY, !is_replicated_operation); } - if(slapi_isbitset_int(rc,SLAPI_RTN_BIT_FETCH_EXISTING_DN_ENTRY)) + if(slapi_isbitset_int(rc,SLAPI_RTN_BIT_FETCH_EXISTING_DN_ENTRY)) { slapi_pblock_get( pb, SLAPI_ADD_TARGET, &dn ); - slapi_sdn_set_dn_byref(&sdn, dn); + slapi_sdn_set_dn_byref(&sdn, dn); slapi_sdn_get_backend_parent(&sdn,&parentsdn,pb->pb_backend); - /* Check if an entry with the intended DN already exists. */ + /* Check if an entry with the intended DN already exists. */ done_with_pblock_entry(pb,SLAPI_ADD_EXISTING_DN_ENTRY); /* Could be through this multiple times */ addr.dn = dn; addr.uniqueid = NULL; @@ -206,24 +208,24 @@ /* need to set parentsdn or parentuniqueid if either is not set? */ } - /* Call the Backend Pre Add plugins */ + /* Call the Backend Pre Add plugins */ slapi_pblock_set(pb, SLAPI_RESULT_CODE, &ldap_result_code); - rc= plugin_call_plugins(pb, SLAPI_PLUGIN_BE_PRE_ADD_FN); - if(rc==-1) - { + rc= plugin_call_plugins(pb, SLAPI_PLUGIN_BE_PRE_ADD_FN); + if(rc==-1) + { /* * Plugin indicated some kind of failure, * or that this Operation became a No-Op. */ slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code); - goto error_return; - } + goto error_return; + } /* * (rc!=-1 && rc!= 0) means that the plugin changed things, so we go around * the loop once again to get the new present state. */ /* JCMREPL - Warning: A Plugin could cause an infinite loop by always returning a result code that requires some action. */ - } + } /* * Originally (in the U-M LDAP 3.3 code), there was a comment near this @@ -237,7 +239,7 @@ /* * Fetch the parent entry and acquire the cache lock. */ - if(have_parent_address(&parentsdn, operation->o_params.p.p_add.parentuniqueid)) + if(have_parent_address(&parentsdn, operation->o_params.p.p_add.parentuniqueid)) { addr.dn = (char*)slapi_sdn_get_dn (&parentsdn); addr.uniqueid = operation->o_params.p.p_add.parentuniqueid; @@ -255,13 +257,13 @@ modify_init(&parent_modify_c,parententry); } - /* Check if the entry we have been asked to add already exists */ + /* Check if the entry we have been asked to add already exists */ { Slapi_Entry *entry; slapi_pblock_get( pb, SLAPI_ADD_EXISTING_DN_ENTRY, &entry); if ( entry != NULL ) { - /* The entry already exists */ + /* The entry already exists */ ldap_result_code= LDAP_ALREADY_EXISTS; goto error_return; } @@ -283,7 +285,7 @@ if ( ancestorentry != NULL ) { int sentreferral= check_entry_for_referral(pb, ancestorentry->ep_entry, backentry_get_ndn(ancestorentry), "ldbm_back_add"); - cache_return( &inst->inst_cache, &ancestorentry ); + cache_return( &inst->inst_cache, &ancestorentry ); if(sentreferral) { ldap_result_code= -1; /* The result was sent by check_entry_for_referral */ @@ -316,7 +318,7 @@ tombstoneentry = find_entry2modify( pb, be, &addr, NULL ); if ( tombstoneentry==NULL ) { - ldap_result_code= -1; + ldap_result_code= -1; goto error_return; /* error result sent by find_entry2modify() */ } tombstone_in_cache = 1; @@ -324,7 +326,7 @@ addingentry = backentry_dup( tombstoneentry ); if ( addingentry==NULL ) { - ldap_result_code= LDAP_OPERATIONS_ERROR; + ldap_result_code= LDAP_OPERATIONS_ERROR; goto error_return; } /* @@ -405,8 +407,8 @@ addingentry = backentry_init( e ); if ( ( addingentry->ep_id = next_id( be ) ) >= MAXID ) { LDAPDebug( LDAP_DEBUG_ANY, - "add: maximum ID reached, cannot add entry to " - "backend '%s'", be->be_name, 0, 0 ); + "add: maximum ID reached, cannot add entry to " + "backend '%s'", be->be_name, 0, 0 ); ldap_result_code = LDAP_OPERATIONS_ERROR; goto error_return; } @@ -436,11 +438,11 @@ /* Directly add the entry as a tombstone */ /* * 1) If the entry has an existing DN, change it to be - * "nsuniqueid=, " + * "nsuniqueid=, " * 2) Add the objectclass value "tombstone" and arrange for only - * that value to be indexed. + * that value to be indexed. * 3) If the parent entry was found, set the nsparentuniqueid - * attribute to be the unique id of that parent. + * attribute to be the unique id of that parent. */ char *untombstoned_dn = slapi_entry_get_dn(e); if (NULL == untombstoned_dn) @@ -476,13 +478,13 @@ struct backentry *ancestorentry; LDAPDebug( LDAP_DEBUG_TRACE, - "parent does not exist, pdn = %s\n", - slapi_sdn_get_dn(&parentsdn), 0, 0 ); + "parent does not exist, pdn = %s\n", + slapi_sdn_get_dn(&parentsdn), 0, 0 ); ancestorentry = dn2ancestor(be, &parentsdn, &ancestordn, &txn, &err ); cache_return( &inst->inst_cache, &ancestorentry ); - ldap_result_code= LDAP_NO_SUCH_OBJECT; + ldap_result_code= LDAP_NO_SUCH_OBJECT; ldap_result_matcheddn= slapi_ch_strdup((char *)slapi_sdn_get_dn(&ancestordn)); /* jcm - cast away const. */ slapi_sdn_done(&ancestordn); goto error_return; @@ -502,8 +504,8 @@ if ( !isroot && !is_replicated_operation) { LDAPDebug( LDAP_DEBUG_TRACE, "no parent & not root\n", - 0, 0, 0 ); - ldap_result_code= LDAP_INSUFFICIENT_ACCESS; + 0, 0, 0 ); + ldap_result_code= LDAP_INSUFFICIENT_ACCESS; goto error_return; } parententry = NULL; @@ -527,7 +529,7 @@ /* * add the parentid, entryid and entrydn operational attributes */ - add_update_entry_operational_attributes(addingentry, pid); + add_update_entry_operational_attributes(addingentry, pid); } /* Tentatively add the entry to the cache. We do this after adding any @@ -560,7 +562,7 @@ retval = parent_update_on_childchange(&parent_modify_c,1,NULL); /* 1==add */\ /* The modify context now contains info needed later */ if (0 != retval) { - ldap_result_code= LDAP_OPERATIONS_ERROR; + ldap_result_code= LDAP_OPERATIONS_ERROR; goto error_return; } parent_found = 1; @@ -577,10 +579,10 @@ /* We're re-trying */ LDAPDebug( LDAP_DEBUG_TRACE, "Add Retrying Transaction\n", 0, 0, 0 ); #ifndef LDBM_NO_BACKOFF_DELAY - { - PRIntervalTime interval; - interval = PR_MillisecondsToInterval(slapi_rand() % 100); - DS_Sleep(interval); + { + PRIntervalTime interval; + interval = PR_MillisecondsToInterval(slapi_rand() % 100); + DS_Sleep(interval); } #endif } @@ -682,7 +684,7 @@ } if (retval != 0) { LDAPDebug( LDAP_DEBUG_ANY, "add: attempt to index %lu failed\n", - (u_long)addingentry->ep_id, 0, 0 ); + (u_long)addingentry->ep_id, 0, 0 ); if (LDBM_OS_ERR_IS_DISKFULL(retval)) { disk_full = 1; ldap_result_code= LDAP_OPERATIONS_ERROR; @@ -705,38 +707,41 @@ retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 ); if (LDBM_OS_ERR_IS_DISKFULL(retval)) { disk_full = 1; - ldap_result_code= LDAP_OPERATIONS_ERROR; + ldap_result_code= LDAP_OPERATIONS_ERROR; goto diskfull_return; } - ldap_result_code= LDAP_OPERATIONS_ERROR; + ldap_result_code= LDAP_OPERATIONS_ERROR; goto error_return; } } - /* - * Update the Virtual List View indexes - */ - retval= vlv_update_all_indexes(&txn, be, pb, NULL, addingentry); - if (DB_LOCK_DEADLOCK == retval) + /* + * Update the Virtual List View indexes + */ + if (!is_ruv) { - LDAPDebug( LDAP_DEBUG_ARGS, "add DEADLOCK vlv_update_index\n", 0, 0, 0 ); - /* Retry txn */ - continue; - } - if (0 != retval) { - LDAPDebug( LDAP_DEBUG_TRACE, "vlv_update_index failed, err=%d %s\n", - retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 ); - if (LDBM_OS_ERR_IS_DISKFULL(retval)) { - disk_full = 1; + retval= vlv_update_all_indexes(&txn, be, pb, NULL, addingentry); + if (DB_LOCK_DEADLOCK == retval) { + LDAPDebug( LDAP_DEBUG_ARGS, + "add DEADLOCK vlv_update_index\n", 0, 0, 0 ); + /* Retry txn */ + continue; + } + if (0 != retval) { + LDAPDebug( LDAP_DEBUG_TRACE, + "vlv_update_index failed, err=%d %s\n", + retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 ); + if (LDBM_OS_ERR_IS_DISKFULL(retval)) { + disk_full = 1; + ldap_result_code= LDAP_OPERATIONS_ERROR; + goto diskfull_return; + } ldap_result_code= LDAP_OPERATIONS_ERROR; - goto diskfull_return; + goto error_return; } - ldap_result_code= LDAP_OPERATIONS_ERROR; - goto error_return; } - if (retval == 0 ) { + if (retval == 0) { break; } - } if (retry_count == RETRY_TIMES) { /* Failed */ @@ -760,9 +765,9 @@ if (cache_replace( &inst->inst_cache, tombstoneentry, addingentry ) != 0 ) { /* This happens if the dn of addingentry already exists */ - ldap_result_code= LDAP_ALREADY_EXISTS; + ldap_result_code= LDAP_ALREADY_EXISTS; cache_unlock_entry( &inst->inst_cache, tombstoneentry ); - goto error_return; + goto error_return; } /* * The tombstone was locked down in the cache... we can @@ -844,9 +849,9 @@ { dblayer_unlock_backend(be); } - if(ldap_result_code!=-1) + if(ldap_result_code!=-1) { - slapi_send_ldap_result( pb, ldap_result_code, ldap_result_matcheddn, ldap_result_message, 0, NULL ); + slapi_send_ldap_result( pb, ldap_result_code, ldap_result_matcheddn, ldap_result_message, 0, NULL ); } slapi_sdn_done(&sdn); slapi_sdn_done(&parentsdn); Index: ldbm_delete.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_delete.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ldbm_delete.c 10 Nov 2006 23:45:39 -0000 1.7 +++ ldbm_delete.c 18 Oct 2007 22:40:18 -0000 1.8 @@ -73,6 +73,7 @@ Slapi_Operation *operation; CSN *opcsn = NULL; int is_fixup_operation = 0; + int is_ruv = 0; /* True if the current entry is RUV */ int is_replicated_operation= 0; int is_tombstone_entry = 0; /* True if the current entry is alreday a tombstone */ int delete_tombstone_entry = 0; /* We must remove the given tombstone entry from the DB */ @@ -95,7 +96,8 @@ slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_delete", "enter conn=%d op=%d\n", pb->pb_conn->c_connid, operation->o_opid); } - is_fixup_operation = operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP); + is_fixup_operation = operation_is_flag_set(operation, OP_FLAG_REPL_FIXUP); + is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV); delete_tombstone_entry = operation_is_flag_set(operation, OP_FLAG_TOMBSTONE_ENTRY); inst = (ldbm_instance *) be->be_instance_info; @@ -469,7 +471,8 @@ ldap_result_code= LDAP_OPERATIONS_ERROR; goto error_return; } - } else if (delete_tombstone_entry) + } /* create_tombstone_entry */ + else if (delete_tombstone_entry) { /* * We need to remove the Tombstone entry from the remaining indexes: @@ -521,7 +524,7 @@ goto error_return; } } - } + } /* delete_tombstone_entry */ if (parent_found) { /* Push out the db modifications from the parent entry */ @@ -536,32 +539,31 @@ LDAPDebug( LDAP_DEBUG_TRACE, "delete 3 BAD, err=%d %s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 ); if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1; - ldap_result_code= LDAP_OPERATIONS_ERROR; + ldap_result_code= LDAP_OPERATIONS_ERROR; goto error_return; } } /* * first check if searchentry needs to be removed * Remove the entry from the Virtual List View indexes. - * */ - if(!delete_tombstone_entry && - !vlv_delete_search_entry(pb,e->ep_entry,inst)) { + if (!delete_tombstone_entry && !is_ruv && + !vlv_delete_search_entry(pb,e->ep_entry,inst)) { retval = vlv_update_all_indexes(&txn, be, pb, e, NULL); + + if (DB_LOCK_DEADLOCK == retval) + { + LDAPDebug( LDAP_DEBUG_ARGS, "delete DEADLOCK vlv_update_index\n", 0, 0, 0 ); + /* Retry txn */ + continue; + } + if (retval != 0 ) { + if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1; + ldap_result_code= LDAP_OPERATIONS_ERROR; + goto error_return; + } } - - if (DB_LOCK_DEADLOCK == retval) - { - LDAPDebug( LDAP_DEBUG_ARGS, "delete DEADLOCK vlv_update_index\n", 0, 0, 0 ); - /* Retry txn */ - continue; - } - if (retval != 0 ) { - if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1; - ldap_result_code= LDAP_OPERATIONS_ERROR; - goto error_return; - } - if (retval == 0 ) { + if (retval == 0 ) { break; } } Index: ldbm_modify.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_modify.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ldbm_modify.c 10 Nov 2006 23:45:39 -0000 1.5 +++ ldbm_modify.c 18 Oct 2007 22:40:18 -0000 1.6 @@ -131,12 +131,18 @@ back_txn *txn) { static char *function_name = "modify_update_all"; + Slapi_Operation *operation; + int is_ruv = 0; /* True if the current entry is RUV */ int retval = 0; - /* - * Update the ID to Entry index. - * Note that id2entry_add replaces the entry, so the Entry ID stays the same. - */ + if (pb) { /* pb could be NULL if it's called from import */ + slapi_pblock_get( pb, SLAPI_OPERATION, &operation ); + is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV); + } + /* + * Update the ID to Entry index. + * Note that id2entry_add replaces the entry, so the Entry ID stays the same. + */ retval = id2entry_add( be, mc->new_entry, txn ); if ( 0 != retval ) { if (DB_LOCK_DEADLOCK != retval) @@ -153,13 +159,13 @@ } goto error; } - /* - * Remove the old entry from the Virtual List View indexes. - * Add the new entry to the Virtual List View indexes. + /* + * Remove the old entry from the Virtual List View indexes. + * Add the new entry to the Virtual List View indexes. * Because the VLV code calls slapi_filter_test(), which requires a pb (why?), * we allow the caller sans pb to get everything except vlv indexing. - */ - if (NULL != pb) { + */ + if (NULL != pb && !is_ruv) { retval= vlv_update_all_indexes(txn, be, pb, mc->old_entry, mc->new_entry); if ( 0 != retval ) { if (DB_LOCK_DEADLOCK != retval) @@ -189,7 +195,7 @@ char *errbuf = NULL; int retry_count = 0; int disk_full = 0; - int ldap_result_code= LDAP_SUCCESS; + int ldap_result_code= LDAP_SUCCESS; char *ldap_result_message= NULL; int rc = 0; Slapi_Operation *operation; @@ -198,6 +204,7 @@ int change_entry = 0; int ec_in_cache = 0; int is_fixup_operation= 0; + int is_ruv = 0; /* True if the current entry is RUV */ CSN *opcsn = NULL; int repl_op; @@ -208,7 +215,8 @@ slapi_pblock_get( pb, SLAPI_PARENT_TXN, (void**)&parent_txn ); slapi_pblock_get( pb, SLAPI_OPERATION, &operation ); slapi_pblock_get (pb, SLAPI_IS_REPLICATED_OPERATION, &repl_op); - is_fixup_operation = operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP); + is_fixup_operation = operation_is_flag_set(operation, OP_FLAG_REPL_FIXUP); + is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV); inst = (ldbm_instance *) be->be_instance_info; dblayer_txn_init(li,&txn); @@ -221,15 +229,14 @@ * operations that the URP code in the Replication * plugin generates. */ - if(SERIALLOCK(li) && !operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP)) - { + if(SERIALLOCK(li) && !operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP)) { dblayer_lock_backend(be); dblock_acquired= 1; } /* find and lock the entry we are about to modify */ if ( (e = find_entry2modify( pb, be, addr, NULL )) == NULL ) { - ldap_result_code= -1; + ldap_result_code= -1; goto error_return; /* error result sent by find_entry2modify() */ } @@ -260,7 +267,7 @@ /* create a copy of the entry and apply the changes to it */ if ( (ec = backentry_dup( e )) == NULL ) { - ldap_result_code= LDAP_OPERATIONS_ERROR; + ldap_result_code= LDAP_OPERATIONS_ERROR; goto error_return; } @@ -276,10 +283,10 @@ { Slapi_Mods smods; - CSN *csn = operation_get_csn(operation); + CSN *csn = operation_get_csn(operation); slapi_mods_init_byref(&smods,mods); if ( (change_entry = mods_have_effect (ec->ep_entry, &smods)) ) { - ldap_result_code = entry_apply_mods_wsi(ec->ep_entry, &smods, csn, operation_is_flag_set(operation,OP_FLAG_REPLICATED)); + ldap_result_code = entry_apply_mods_wsi(ec->ep_entry, &smods, csn, operation_is_flag_set(operation,OP_FLAG_REPLICATED)); /* * XXXmcs: it would be nice to get back an error message from * the above call so we could pass it along to the client, e.g., @@ -356,8 +363,8 @@ dblayer_txn_abort(li,&txn); LDAPDebug( LDAP_DEBUG_TRACE, "Modify Retrying Transaction\n", 0, 0, 0 ); #ifndef LDBM_NO_BACKOFF_DELAY - { - PRIntervalTime interval; + { + PRIntervalTime interval; interval = PR_MillisecondsToInterval(slapi_rand() % 100); DS_Sleep(interval); } @@ -373,10 +380,10 @@ goto error_return; } - /* - * Update the ID to Entry index. - * Note that id2entry_add replaces the entry, so the Entry ID stays the same. - */ + /* + * Update the ID to Entry index. + * Note that id2entry_add replaces the entry, so the Entry ID stays the same. + */ retval = id2entry_add( be, ec, &txn ); if (DB_LOCK_DEADLOCK == retval) { @@ -404,37 +411,41 @@ ldap_result_code= LDAP_OPERATIONS_ERROR; goto error_return; } - /* - * Remove the old entry from the Virtual List View indexes. - * Add the new entry to the Virtual List View indexes. - */ - retval= vlv_update_all_indexes(&txn, be, pb, e, ec); - if (DB_LOCK_DEADLOCK == retval) - { - /* Abort and re-try */ - continue; - } - if (0 != retval) { - LDAPDebug( LDAP_DEBUG_ANY, "vlv_update_index failed, err=%d %s\n", - retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 ); - if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1; - ldap_result_code= LDAP_OPERATIONS_ERROR; - goto error_return; - } + /* + * Remove the old entry from the Virtual List View indexes. + * Add the new entry to the Virtual List View indexes. + * If the entry is ruv, no need to update vlv. + */ + if (!is_ruv) { + retval= vlv_update_all_indexes(&txn, be, pb, e, ec); + if (DB_LOCK_DEADLOCK == retval) + { + /* Abort and re-try */ + continue; + } + if (0 != retval) { + LDAPDebug( LDAP_DEBUG_ANY, + "vlv_update_index failed, err=%d %s\n", + retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 ); + if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1; + ldap_result_code= LDAP_OPERATIONS_ERROR; + goto error_return; + } + } if (0 == retval) { break; } } if (retry_count == RETRY_TIMES) { LDAPDebug( LDAP_DEBUG_ANY, "Retry count exceeded in modify\n", 0, 0, 0 ); - ldap_result_code= LDAP_OPERATIONS_ERROR; + ldap_result_code= LDAP_OPERATIONS_ERROR; goto error_return; } if (cache_replace( &inst->inst_cache, e, ec ) != 0 ) { - ldap_result_code= LDAP_OPERATIONS_ERROR; - goto error_return; + ldap_result_code= LDAP_OPERATIONS_ERROR; + goto error_return; } postentry = slapi_entry_dup( ec->ep_entry ); @@ -473,7 +484,7 @@ } else { - backentry_free(&ec); + backentry_free(&ec); } if ( postentry != NULL ) { Index: ldbm_modrdn.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ldbm_modrdn.c 10 Nov 2006 23:45:39 -0000 1.6 +++ ldbm_modrdn.c 18 Oct 2007 22:40:18 -0000 1.7 @@ -113,7 +113,7 @@ slapi_pblock_get( pb, SLAPI_REQUESTOR_ISROOT, &isroot ); slapi_pblock_get( pb, SLAPI_OPERATION, &operation ); slapi_pblock_get( pb, SLAPI_IS_REPLICATED_OPERATION, &is_replicated_operation ); - is_fixup_operation = operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP); + is_fixup_operation = operation_is_flag_set(operation, OP_FLAG_REPL_FIXUP); if (pb->pb_conn) { @@ -1127,8 +1127,12 @@ ldbm_instance *inst; int retval= 0; char *msg; + Slapi_Operation *operation; + int is_ruv = 0; /* True if the current entry is RUV */ - slapi_pblock_get( pb, SLAPI_BACKEND, &be); + slapi_pblock_get( pb, SLAPI_BACKEND, &be ); + slapi_pblock_get( pb, SLAPI_OPERATION, &operation ); + is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV); inst = (ldbm_instance *) be->be_instance_info; /* @@ -1206,17 +1210,21 @@ /* * Remove the old entry from the Virtual List View indexes. * Add the new entry to the Virtual List View indexes. + * If ruv, we don't have to update vlv. */ - retval= vlv_update_all_indexes(ptxn, be, pb, e, ec); - if (DB_LOCK_DEADLOCK == retval) - { - /* Abort and re-try */ - goto error_return; - } - if (retval != 0) + if (!is_ruv) { - LDAPDebug( LDAP_DEBUG_TRACE, "vlv_update_all_indexes failed, err=%d %s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 ); - goto error_return; + retval= vlv_update_all_indexes(ptxn, be, pb, e, ec); + if (DB_LOCK_DEADLOCK == retval) + { + /* Abort and re-try */ + goto error_return; + } + if (retval != 0) + { + LDAPDebug( LDAP_DEBUG_TRACE, "vlv_update_all_indexes failed, err=%d %s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 ); + goto error_return; + } } if (cache_replace( &inst->inst_cache, e, ec ) != 0 ) { retval= -1; From fedora-directory-commits at redhat.com Thu Oct 18 23:49:35 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Thu, 18 Oct 2007 19:49:35 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/rsearch infadd.c, 1.5, 1.6 Message-ID: <200710182349.l9INnZSF013224@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13127 Modified Files: infadd.c Log Message: Resolves: #336871 Summary: infadd tool won't start. Fails to load data file (comment #4) Description: HP compiler does not like to have a function call in a constant expression. Index: infadd.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/infadd.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- infadd.c 18 Oct 2007 20:26:58 -0000 1.5 +++ infadd.c 18 Oct 2007 23:49:32 -0000 1.6 @@ -157,7 +157,7 @@ AddThread **threads; PRUint32 total = 0, ntotal = 0; int counter; - char familynames[strlen(TEMPLATEDIR) + 19], givennames[strlen(TEMPLATEDIR) + 18]; + char familynames[sizeof(TEMPLATEDIR) + 19], givennames[sizeof(TEMPLATEDIR) + 18]; srand(time(NULL)); if (argc < 2) { From fedora-directory-commits at redhat.com Fri Oct 19 01:50:17 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Thu, 18 Oct 2007 21:50:17 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSMigration.pm.in, 1.19, 1.20 Message-ID: <200710190150.l9J1oHND029935@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29918/ldapserver/ldap/admin/src/scripts Modified Files: DSMigration.pm.in Log Message: Resolves: bug 338991 Bug Description: obsolete values migrated to target instance Reviewed by: nhosoi (Thanks!) Fix Description: When fixing the attributes in the old entry, remove any obsolete attributes. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: DSMigration.pm.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSMigration.pm.in,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- DSMigration.pm.in 17 Oct 2007 15:56:53 -0000 1.19 +++ DSMigration.pm.in 19 Oct 2007 01:50:15 -0000 1.20 @@ -549,7 +549,11 @@ my ($ent, $mig, $inst) = @_; for my $attr (keys %{$ent}) { my $lcattr = lc $attr; - if ($transformAttr{$lcattr}) { + if ($ignoreOld{$lcattr}) { + debug(3, "fixAttrsInEntry: ignoring old invalid or obsolete attr $attr\n"); + $ent->remove($attr); + next; + } elsif ($transformAttr{$lcattr}) { my $newval = &{$transformAttr{$lcattr}}($ent, $attr, $mig, $inst); if (!$newval) { debug(2, "Removing attribute $attr from entry ", $ent->getDN(), "\n"); @@ -558,7 +562,7 @@ debug(2, "Setting new value $newval for attribute $attr in entry ", $ent->getDN(), "\n"); $ent->setValues($attr, $newval); } - } + } # else just keep as is } } From fedora-directory-commits at redhat.com Fri Oct 19 02:09:26 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Thu, 18 Oct 2007 22:09:26 -0400 Subject: [Fedora-directory-commits] ldapserver configure.ac, 1.41, 1.42 config.h.in, 1.10, 1.11 configure, 1.72, 1.73 Message-ID: <200710190209.l9J29Qpe004516@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4455 Modified Files: configure.ac config.h.in configure Log Message: Resolves: #339031 Summary: Solaris: warnings reported by the Solaris compiler Index: configure.ac =================================================================== RCS file: /cvs/dirsec/ldapserver/configure.ac,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- configure.ac 18 Oct 2007 00:08:26 -0000 1.41 +++ configure.ac 19 Oct 2007 02:09:23 -0000 1.42 @@ -310,6 +310,7 @@ AC_DEFINE([sunos5], [1], [SunOS5]) AC_DEFINE([OSVERSION], [509], [OS version]) AC_DEFINE([_REENTRANT], [1], [_REENTRANT]) + AC_DEFINE([NO_DOMAINNAME], [1], [no getdomainname]) dnl socket nsl and dl are required to link several programs and libdb LIBSOCKET=-lsocket AC_SUBST([LIBSOCKET], [$LIBSOCKET]) Index: config.h.in =================================================================== RCS file: /cvs/dirsec/ldapserver/config.h.in,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- config.h.in 18 Oct 2007 00:08:26 -0000 1.10 +++ config.h.in 19 Oct 2007 02:09:23 -0000 1.11 @@ -272,6 +272,9 @@ /* Linux */ #undef Linux +/* no getdomainname */ +#undef NO_DOMAINNAME + /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.72 retrieving revision 1.73 diff -u -r1.72 -r1.73 --- configure 18 Oct 2007 00:08:26 -0000 1.72 +++ configure 19 Oct 2007 02:09:23 -0000 1.73 @@ -23360,6 +23360,11 @@ #define _REENTRANT 1 _ACEOF + +cat >>confdefs.h <<\_ACEOF +#define NO_DOMAINNAME 1 +_ACEOF + LIBSOCKET=-lsocket LIBSOCKET=$LIBSOCKET From fedora-directory-commits at redhat.com Fri Oct 19 02:09:26 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Thu, 18 Oct 2007 22:09:26 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication cl5_api.c, 1.19, 1.20 windows_protocol_util.c, 1.37, 1.38 Message-ID: <200710190209.l9J29QxR004523@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4455/ldap/servers/plugins/replication Modified Files: cl5_api.c windows_protocol_util.c Log Message: Resolves: #339031 Summary: Solaris: warnings reported by the Solaris compiler Index: cl5_api.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/cl5_api.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- cl5_api.c 18 Oct 2007 00:08:31 -0000 1.19 +++ cl5_api.c 19 Oct 2007 02:09:24 -0000 1.20 @@ -43,6 +43,7 @@ /* cl5_api.c - implementation of 5.0 style changelog API */ +#include #include #include #if defined( OS_solaris ) || defined( hpux ) @@ -6451,8 +6452,8 @@ if (rc != 0) { slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBCloseFile: " - "failed to remove (%s) file; libdb error - %d (%s)\n", file->name, - rc, dblayer_strerror(rc)); + "failed to remove (%s) file; libdb error - %d (%s)\n", + fullpathname, rc, db_strerror(rc)); } } Index: windows_protocol_util.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_protocol_util.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- windows_protocol_util.c 18 Oct 2007 00:08:31 -0000 1.37 +++ windows_protocol_util.c 19 Oct 2007 02:09:24 -0000 1.38 @@ -2256,7 +2256,7 @@ * to trim the DN to only dc components. */ if (suffix = slapi_sdn_get_dn(windows_private_get_windows_subtree(prp->agmt))) { /* If this isn't found, it is treated as an error below. */ - suffix = (const char *) strcasestr(suffix,"dc="); + suffix = (const char *) PL_strcasestr(suffix,"dc="); } if (cn && guid && suffix) { From fedora-directory-commits at redhat.com Fri Oct 19 02:09:26 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Thu, 18 Oct 2007 22:09:26 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm back-ldbm.h, 1.11, 1.12 ldbm_attrcrypt.c, 1.10, 1.11 Message-ID: <200710190209.l9J29QXJ004530@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4455/ldap/servers/slapd/back-ldbm Modified Files: back-ldbm.h ldbm_attrcrypt.c Log Message: Resolves: #339031 Summary: Solaris: warnings reported by the Solaris compiler Index: back-ldbm.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/back-ldbm.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- back-ldbm.h 16 Oct 2007 17:30:58 -0000 1.11 +++ back-ldbm.h 19 Oct 2007 02:09:24 -0000 1.12 @@ -54,8 +54,10 @@ /* needed by at least HPUX and Solaris, to define off64_t */ #ifdef DB_USE_64LFS +#if !defined(_LARGEFILE64_SOURCE) #define _LARGEFILE64_SOURCE #endif +#endif /* A bunch of random system headers taken from all the source files, no source file should #include any system headers now */ Index: ldbm_attrcrypt.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ldbm_attrcrypt.c 18 Oct 2007 00:08:34 -0000 1.10 +++ ldbm_attrcrypt.c 19 Oct 2007 02:09:24 -0000 1.11 @@ -588,7 +588,7 @@ output_buffer_length = in_size + 16; output_buffer = (unsigned char *)slapi_ch_malloc(output_buffer_length); /* Now call NSS to do the cipher op */ - iv_item.data = "aaaaaaaaaaaaaaaa"; /* ptr to an array of IV bytes */ + iv_item.data = (unsigned char *)"aaaaaaaaaaaaaaaa"; /* ptr to an array of IV bytes */ iv_item.len = acs->ace->iv_length; /* length of the array of IV bytes */ security_parameter = slapd_pk11_ParamFromIV(acs->ace->cipher_mechanism, &iv_item); if (NULL == security_parameter) { From fedora-directory-commits at redhat.com Fri Oct 19 03:17:58 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Thu, 18 Oct 2007 23:17:58 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/ldif template-suffix-db.ldif.in, 1.1, 1.2 Message-ID: <200710190317.l9J3Hww3013534@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/ldif In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13517/ldapserver/ldap/ldif Modified Files: template-suffix-db.ldif.in Log Message: Resolves: bug 339041 Bug Description: migration : encryption key entries missing when source is 6.21 Reviewed by: self Fix Description: Just always create those entries when creating the backend. The server does this at startup, but I guess for this case that occurs too late in the startup process. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: template-suffix-db.ldif.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/ldif/template-suffix-db.ldif.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- template-suffix-db.ldif.in 19 Jun 2007 18:24:57 -0000 1.1 +++ template-suffix-db.ldif.in 19 Oct 2007 03:17:56 -0000 1.2 @@ -7,6 +7,16 @@ nsslapd-suffix: %ds_suffix% cn: %ds_bename% +dn: cn=encrypted attribute keys,cn=%ds_bename%,cn=ldbm database,cn=plugins,cn=config +objectClass: top +objectClass: extensibleObject +cn: encrypted attributes keys + +dn: cn=encrypted attributes,cn=%ds_bename%,cn=ldbm database,cn=plugins,cn=config +objectClass: top +objectClass: extensibleObject +cn: encrypted attributes + dn: cn="%ds_suffix%",cn=mapping tree,cn=config objectclass: top objectclass: extensibleObject From fedora-directory-commits at redhat.com Fri Oct 19 03:19:10 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Thu, 18 Oct 2007 23:19:10 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd ssl.c, 1.15, 1.16 Message-ID: <200710190319.l9J3JAma013560@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13543 Modified Files: ssl.c Log Message: Resolves: bug 336881 Bug Description: qualify warning message when cert8.db is missing Reviewed by: self Fix Description: Only warn when both cert8.db and cert7.db are missing. If cert7.db is there, NSS will automatically create cert8.db from it. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: ssl.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/ssl.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- ssl.c 18 Oct 2007 00:08:34 -0000 1.15 +++ ssl.c 19 Oct 2007 03:19:07 -0000 1.16 @@ -364,10 +364,15 @@ char *filename = slapi_ch_smprintf("%s/cert8.db", dir); PRStatus status = PR_Access(filename, PR_ACCESS_READ_OK); if (PR_SUCCESS != status) { - slapi_log_error(SLAPI_LOG_FATAL, "SSL Initialization", - "Warning: certificate DB file %s does not exist - SSL initialization will likely fail\n", - filename); - } + slapi_ch_free_string(&filename); + filename = slapi_ch_smprintf("%s/cert7.db", dir); + status = PR_Access(filename, PR_ACCESS_READ_OK); + if (PR_SUCCESS != status) { + slapi_log_error(SLAPI_LOG_FATAL, "SSL Initialization", + "Warning: certificate DB file cert8.db nor cert7.db exists - SSL initialization will likely fail\n", + filename); + } + } slapi_ch_free_string(&filename); } From fedora-directory-commits at redhat.com Fri Oct 19 15:36:03 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 19 Oct 2007 11:36:03 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl aclanom.c, 1.6, 1.7 acllas.c, 1.9, 1.10 Message-ID: <200710191536.l9JFa3T3021609@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21558/ldapserver/ldap/servers/plugins/acl Modified Files: aclanom.c acllas.c Log Message: Resolves: bug 297221 Description: rhds71 Malformed Dynamic Authorization Group makes Directory Server Crash Reviewed by: supplemental Fix Description: In some cases, it is ok if the filter is NULL. So just allow NULL in those cases. slapi_str2filter must take either NULL or a writable string, so make sure we pass those in correctly. Index: aclanom.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclanom.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- aclanom.c 10 Nov 2006 23:44:49 -0000 1.6 +++ aclanom.c 19 Oct 2007 15:36:01 -0000 1.7 @@ -238,8 +238,16 @@ } a_profile->anom_targetinfo[a_numacl].anom_filter = NULL; - if ( aci->targetFilterStr ) + if ( aci->targetFilterStr ) { a_profile->anom_targetinfo[a_numacl].anom_filter = slapi_str2filter ( aci->targetFilterStr ); + if (NULL == a_profile->anom_targetinfo[a_numacl].anom_filter) { + const char *dn = slapi_sdn_get_dn ( aci->aci_sdn ); + slapi_log_error(SLAPI_LOG_FATAL, plugin_name, + "Error: invalid filter [%s] in anonymous aci in entry [%s]\n", + aci->targetFilterStr, dn); + goto cleanup; + } + } i = 0; srcattrArray = aci->targetAttr; Index: acllas.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acllas.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- acllas.c 18 Oct 2007 22:25:13 -0000 1.9 +++ acllas.c 19 Oct 2007 15:36:01 -0000 1.10 @@ -3027,7 +3027,7 @@ /* Convert the filter string */ f = slapi_str2filter ( ludp->lud_filter ); - if (f == NULL) { /* bogus filter */ + if (ludp->lud_filter && (f == NULL)) { /* bogus filter */ slapi_log_error(SLAPI_LOG_FATAL, plugin_name, "DS_LASUserAttrEval: The member URL search filter in entry [%s] is not valid: [%s]\n", n_clientdn, ludp->lud_filter); @@ -3036,8 +3036,8 @@ } rc = ACL_TRUE; - if (0 != slapi_vattr_filter_test ( aclpb->aclpb_pblock, - aclpb->aclpb_client_entry, f, 0 /* no acces chk */ )) + if (f && (0 != slapi_vattr_filter_test ( aclpb->aclpb_pblock, + aclpb->aclpb_client_entry, f, 0 /* no acces chk */ ))) rc = ACL_FALSE; ldap_free_urldesc( ludp ); @@ -3843,6 +3843,8 @@ int rc = ACL_FALSE; Slapi_Filter *f = NULL; + PR_ASSERT(str); + if ((f = slapi_str2filter(str)) == NULL) { slapi_log_error(SLAPI_LOG_FATAL, plugin_name, "Warning: Bad targetfilter(%s) in aci: does not match\n", str); From fedora-directory-commits at redhat.com Fri Oct 19 15:36:03 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 19 Oct 2007 11:36:03 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/statechange statechange.c, 1.7, 1.8 Message-ID: <200710191536.l9JFa35M021615@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/statechange In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21558/ldapserver/ldap/servers/plugins/statechange Modified Files: statechange.c Log Message: Resolves: bug 297221 Description: rhds71 Malformed Dynamic Authorization Group makes Directory Server Crash Reviewed by: supplemental Fix Description: In some cases, it is ok if the filter is NULL. So just allow NULL in those cases. slapi_str2filter must take either NULL or a writable string, so make sure we pass those in correctly. Index: statechange.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/statechange/statechange.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- statechange.c 18 Oct 2007 22:25:14 -0000 1.7 +++ statechange.c 19 Oct 2007 15:36:01 -0000 1.8 @@ -331,7 +331,8 @@ item->dn = 0; item->filter = slapi_ch_strdup(filter); item->caller_data = caller_data; - if (NULL == (item->realfilter = slapi_str2filter(writable_filter))) { + if (writable_filter && + (NULL == (item->realfilter = slapi_str2filter(writable_filter)))) { slapi_log_error(SLAPI_LOG_FATAL, SCN_PLUGIN_SUBSYSTEM, "Error: invalid filter in statechange entry [%s]: [%s]\n", dn, filter); @@ -341,6 +342,8 @@ slapi_ch_free_string(&writable_filter); slapi_ch_free((void **)&item); return -1; + } else if (!writable_filter) { + item->realfilter = NULL; } item->func = func; From fedora-directory-commits at redhat.com Fri Oct 19 15:36:04 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 19 Oct 2007 11:36:04 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd plugin_internal_op.c, 1.9, 1.10 Message-ID: <200710191536.l9JFa4to021621@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21558/ldapserver/ldap/servers/slapd Modified Files: plugin_internal_op.c Log Message: Resolves: bug 297221 Description: rhds71 Malformed Dynamic Authorization Group makes Directory Server Crash Reviewed by: supplemental Fix Description: In some cases, it is ok if the filter is NULL. So just allow NULL in those cases. slapi_str2filter must take either NULL or a writable string, so make sure we pass those in correctly. Index: plugin_internal_op.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/plugin_internal_op.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- plugin_internal_op.c 18 Oct 2007 00:08:34 -0000 1.9 +++ plugin_internal_op.c 19 Oct 2007 15:36:01 -0000 1.10 @@ -719,7 +719,7 @@ op->o_search_entry_handler = internal_srch_entry_callback; op->o_search_referral_handler = internal_ref_entry_callback; - filter = slapi_str2filter(ifstr ? (fstr = slapi_ch_strdup(ifstr)) : ""); + filter = slapi_str2filter(ifstr ? (fstr = slapi_ch_strdup(ifstr)) : NULL); if(scope == LDAP_SCOPE_BASE) filter->f_flags |= (SLAPI_FILTER_LDAPSUBENTRY | SLAPI_FILTER_TOMBSTONE); if (NULL == filter) { From fedora-directory-commits at redhat.com Fri Oct 19 18:20:47 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 19 Oct 2007 14:20:47 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd ssl.c, 1.16, 1.17 Message-ID: <200710191820.l9JIKlRK030014@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29991 Modified Files: ssl.c Log Message: Resolves: bug 340211 Description: ssl acceptance tests are failing Fix Description: This isn't the full fix, but the error message should print out the directory where it was looking for the missing cert db files. Index: ssl.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/ssl.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- ssl.c 19 Oct 2007 03:19:07 -0000 1.16 +++ ssl.c 19 Oct 2007 18:20:45 -0000 1.17 @@ -369,8 +369,8 @@ status = PR_Access(filename, PR_ACCESS_READ_OK); if (PR_SUCCESS != status) { slapi_log_error(SLAPI_LOG_FATAL, "SSL Initialization", - "Warning: certificate DB file cert8.db nor cert7.db exists - SSL initialization will likely fail\n", - filename); + "Warning: certificate DB file cert8.db nor cert7.db exists in [%s] - SSL initialization will likely fail\n", + dir); } } slapi_ch_free_string(&filename); From fedora-directory-commits at redhat.com Fri Oct 19 18:48:30 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Fri, 19 Oct 2007 14:48:30 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd connection.c, 1.18, 1.19 Message-ID: <200710191848.l9JImUdx031935@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31841/ldap/servers/slapd Modified Files: connection.c Log Message: Resolves: 188320 Summary: Don't define _XOPEN_SOURCE_EXTENDED on HP-UX. Index: connection.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/connection.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- connection.c 18 Oct 2007 00:08:34 -0000 1.18 +++ connection.c 19 Oct 2007 18:48:27 -0000 1.19 @@ -254,7 +254,11 @@ /* try syscall since "from" was not given and PR_GetPeerName failed */ /* a corner case */ struct sockaddr_in addr; /* assuming IPv4 */ +#if ( defined( hpux ) ) + int addrlen; +#else socklen_t addrlen; +#endif addrlen = sizeof( addr ); memset( &addr, 0, addrlen ); @@ -309,7 +313,11 @@ /* try syscall since c_prfd == NULL */ /* a corner case */ struct sockaddr_in destaddr; /* assuming IPv4 */ +#if ( defined( hpux ) ) + int destaddrlen; +#else socklen_t destaddrlen; +#endif destaddrlen = sizeof( destaddr ); memset( &destaddr, 0, destaddrlen ); From fedora-directory-commits at redhat.com Fri Oct 19 18:48:29 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Fri, 19 Oct 2007 14:48:29 -0400 Subject: [Fedora-directory-commits] ldapserver Makefile.in, 1.77, 1.78 aclocal.m4, 1.56, 1.57 config.h.in, 1.11, 1.12 configure, 1.73, 1.74 configure.ac, 1.42, 1.43 ltmain.sh, 1.22, 1.23 Message-ID: <200710191848.l9JImTID031926@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31841 Modified Files: Makefile.in aclocal.m4 config.h.in configure configure.ac ltmain.sh Log Message: Resolves: 188320 Summary: Don't define _XOPEN_SOURCE_EXTENDED on HP-UX. Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.77 retrieving revision 1.78 diff -u -r1.77 -r1.78 --- Makefile.in 18 Oct 2007 00:08:26 -0000 1.77 +++ Makefile.in 19 Oct 2007 18:48:27 -0000 1.78 @@ -852,6 +852,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOLARIS_FALSE = @SOLARIS_FALSE@ Index: aclocal.m4 =================================================================== RCS file: /cvs/dirsec/ldapserver/aclocal.m4,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- aclocal.m4 18 Oct 2007 00:08:26 -0000 1.56 +++ aclocal.m4 19 Oct 2007 18:48:27 -0000 1.57 @@ -1578,10 +1578,27 @@ # before this can be enabled. hardcode_into_libs=yes + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -4288,6 +4305,9 @@ # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + # An ERE matcher. EGREP=$lt_EGREP @@ -4421,11 +4441,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) +predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) +postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -4437,7 +4457,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) +compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -4517,7 +4537,7 @@ link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -6353,6 +6373,7 @@ done done done +IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -6385,6 +6406,7 @@ done ]) SED=$lt_cv_path_SED +AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) Index: config.h.in =================================================================== RCS file: /cvs/dirsec/ldapserver/config.h.in,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- config.h.in 19 Oct 2007 02:09:23 -0000 1.11 +++ config.h.in 19 Oct 2007 18:48:27 -0000 1.12 @@ -347,9 +347,6 @@ /* SVID_GETTOD */ #undef _SVID_GETTOD -/* To use XOPEN getpeername */ -#undef _XOPEN_SOURCE_EXTENDED - /* SVR4 */ #undef __svr4 Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.73 retrieving revision 1.74 diff -u -r1.73 -r1.74 --- configure 19 Oct 2007 02:09:23 -0000 1.73 +++ configure 19 Oct 2007 18:48:27 -0000 1.74 @@ -465,7 +465,7 @@ #endif" ac_default_prefix=/opt/$PACKAGE_NAME -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 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 MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CX! XCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir mibdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec initconfigdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir sasl_path svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor 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 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 MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP! P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir mibdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec initconfigdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir sasl_path svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -3836,6 +3836,7 @@ done done done +IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -3870,6 +3871,7 @@ fi SED=$lt_cv_path_SED + echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 @@ -4310,7 +4312,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4313 "configure"' > conftest.$ac_ext + echo '#line 4315 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5445,7 +5447,7 @@ # Provide some information about the compiler. -echo "$as_me:5448:" \ +echo "$as_me:5450:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6508,11 +6510,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:6511: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6513: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6515: \$? = $ac_status" >&5 + echo "$as_me:6517: \$? = $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. @@ -6776,11 +6778,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:6779: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6781: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6783: \$? = $ac_status" >&5 + echo "$as_me:6785: \$? = $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. @@ -6880,11 +6882,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:6883: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6885: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6887: \$? = $ac_status" >&5 + echo "$as_me:6889: \$? = $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 @@ -8345,10 +8347,31 @@ # before this can be enabled. hardcode_into_libs=yes + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 8354 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -9225,7 +9248,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11694: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11672: \$? = $ac_status" >&5 + echo "$as_me:11698: \$? = $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. @@ -11769,11 +11795,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:11772: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11798: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11776: \$? = $ac_status" >&5 + echo "$as_me:11802: \$? = $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 @@ -12301,10 +12327,31 @@ # before this can be enabled. hardcode_into_libs=yes + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 12334 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -12688,6 +12735,9 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + # An ERE matcher. EGREP=$lt_EGREP @@ -12821,11 +12871,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects_CXX +predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects_CXX +postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -12837,7 +12887,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -12917,7 +12967,7 @@ link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -13339,11 +13389,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:13342: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13392: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13346: \$? = $ac_status" >&5 + echo "$as_me:13396: \$? = $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. @@ -13443,11 +13493,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:13446: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13496: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13450: \$? = $ac_status" >&5 + echo "$as_me:13500: \$? = $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 @@ -14888,10 +14938,31 @@ # before this can be enabled. hardcode_into_libs=yes + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 14945 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -15275,6 +15346,9 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + # An ERE matcher. EGREP=$lt_EGREP @@ -15408,11 +15482,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects_F77 +predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects_F77 +postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -15424,7 +15498,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_F77 +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -15504,7 +15578,7 @@ link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -15646,11 +15720,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:15649: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15723: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15653: \$? = $ac_status" >&5 + echo "$as_me:15727: \$? = $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. @@ -15914,11 +15988,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:15917: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15991: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15921: \$? = $ac_status" >&5 + echo "$as_me:15995: \$? = $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. @@ -16018,11 +16092,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:16021: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16095: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16025: \$? = $ac_status" >&5 + echo "$as_me:16099: \$? = $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 @@ -17483,10 +17557,31 @@ # before this can be enabled. hardcode_into_libs=yes + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 17564 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -17870,6 +17965,9 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + # An ERE matcher. EGREP=$lt_EGREP @@ -18003,11 +18101,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects_GCJ +predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects_GCJ +postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -18019,7 +18117,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -18099,7 +18197,7 @@ link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -18351,6 +18449,9 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_RC +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + # An ERE matcher. EGREP=$lt_EGREP @@ -18484,11 +18585,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects_RC +predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects_RC +postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -18500,7 +18601,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_RC +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -18580,7 +18681,7 @@ link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -23243,11 +23344,6 @@ #define _HPUX_SOURCE 1 _ACEOF - -cat >>confdefs.h <<\_ACEOF -#define _XOPEN_SOURCE_EXTENDED 1 -_ACEOF - # assume 64 bit perlexec='/opt/perl_64/bin/perl' platform="hpux" @@ -25957,6 +26053,7 @@ s, at CCDEPMODE@,$CCDEPMODE,;t t s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t +s, at SED@,$SED,;t t s, at EGREP@,$EGREP,;t t s, at LN_S@,$LN_S,;t t s, at ECHO@,$ECHO,;t t Index: configure.ac =================================================================== RCS file: /cvs/dirsec/ldapserver/configure.ac,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- configure.ac 19 Oct 2007 02:09:23 -0000 1.42 +++ configure.ac 19 Oct 2007 18:48:27 -0000 1.43 @@ -277,7 +277,6 @@ AC_DEFINE([OS_hpux], [1], [OS HP-UX]) AC_DEFINE([_POSIX_C_SOURCE], [199506L], [POSIX revision]) AC_DEFINE([_HPUX_SOURCE], [1], [Source namespace]) - AC_DEFINE([_XOPEN_SOURCE_EXTENDED], [1], [To use XOPEN getpeername]) # assume 64 bit perlexec='/opt/perl_64/bin/perl' platform="hpux" Index: ltmain.sh =================================================================== RCS file: /cvs/dirsec/ldapserver/ltmain.sh,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- ltmain.sh 18 Oct 2007 00:08:26 -0000 1.22 +++ ltmain.sh 19 Oct 2007 18:48:27 -0000 1.23 @@ -46,10 +46,16 @@ VERSION=1.5.22 TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes. -if test -n "${ZSH_VERSION+set}" ; then +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi # Check that we have a working $echo. @@ -105,12 +111,14 @@ # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). # We save the old values to restore during execute mode. -if test "${LC_ALL+set}" = set; then - save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL -fi -if test "${LANG+set}" = set; then - save_LANG="$LANG"; LANG=C; export LANG -fi +for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + fi" +done # Make sure IFS has a sensible default lt_nl=' @@ -136,6 +144,8 @@ preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 ##################################### # Shell function definitions: @@ -327,7 +337,17 @@ *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xdir="$my_gentop/$my_xlib" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" @@ -758,6 +778,7 @@ *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; + *.obj) xform=obj ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` @@ -1138,8 +1159,9 @@ for arg do case $arg in - -all-static | -static) - if test "X$arg" = "X-all-static"; then + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 fi @@ -1147,12 +1169,20 @@ dlopen_self=$dlopen_self_static fi prefer_static_libs=yes - else + ;; + -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built - fi + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac build_libtool_libs=no build_old_libs=yes break @@ -1712,7 +1742,7 @@ continue ;; - -static) + -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects @@ -2490,7 +2520,9 @@ if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. @@ -3186,7 +3218,7 @@ # which has an extra 1 added just for fun # case $version_type in - darwin|linux|osf|windows) + darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" @@ -3410,11 +3442,11 @@ fi # Eliminate all temporary directories. - for path in $notinst_path; do - lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - done +# for path in $notinst_path; do +# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` +# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` +# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` +# done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. @@ -3515,13 +3547,12 @@ int main() { return 0; } EOF $rm conftest - $LTCC $LTCFLAGS -o conftest conftest.c $deplibs - if test "$?" -eq 0 ; then + if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then ldd_output=`ldd conftest` for i in $deplibs; do name=`expr $i : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" -ne "0"; then + if test "$name" != "" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) @@ -3560,9 +3591,7 @@ # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" != "0"; then $rm conftest - $LTCC $LTCFLAGS -o conftest conftest.c $i - # Did it work? - if test "$?" -eq 0 ; then + if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in @@ -3594,7 +3623,7 @@ droppeddeps=yes $echo $echo "*** Warning! Library $i is needed by this library but I was not able to" - $echo "*** make it link in! You will probably need to install it or some" + $echo "*** make it link in! You will probably need to install it or some" $echo "*** library that it depends on before this library will be fully" $echo "*** functional. Installing it before continuing would be even better." fi @@ -4239,12 +4268,14 @@ reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then - eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" @@ -4692,16 +4723,16 @@ case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; @@ -4716,13 +4747,13 @@ # really was required. # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. @@ -4809,7 +4840,7 @@ if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= @@ -4846,7 +4877,7 @@ fi done relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. @@ -5253,6 +5284,18 @@ Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi + # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @@ -5395,7 +5438,7 @@ ;; esac $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else @@ -5581,7 +5624,7 @@ done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi @@ -5926,9 +5969,9 @@ if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 @@ -6137,7 +6180,7 @@ file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : @@ -6413,12 +6456,15 @@ fi # Restore saved environment variables - if test "${save_LC_ALL+set}" = set; then - LC_ALL="$save_LC_ALL"; export LC_ALL - fi - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - fi + for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + # Now prepare to actually exec the command. exec_cmd="\$cmd$args" @@ -6775,9 +6821,9 @@ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE + try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX - try to export only the symbols matching REGEX + try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened @@ -6791,9 +6837,11 @@ -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of libtool libraries + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] + specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. From fedora-directory-commits at redhat.com Fri Oct 19 19:01:18 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 19 Oct 2007 15:01:18 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl aclparse.c, 1.8, 1.9 Message-ID: <200710191901.l9JJ1IsH006243@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6224 Modified Files: aclparse.c Log Message: Resolves: bug 232910 Description: ACI targetattr list parser is whitespace sensitive Fix Description: I made it too sensitive. The parser should allow simple unquoted strings. However, if it begins with a quote, it must end with a quote. Index: aclparse.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclparse.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- aclparse.c 18 Oct 2007 20:55:10 -0000 1.8 +++ aclparse.c 19 Oct 2007 19:01:16 -0000 1.9 @@ -1234,14 +1234,21 @@ __acl_strip_leading_space(&s); __acl_strip_trailing_space(s); len = strlen(s); - if (*s == '"' && s[len-1] == '"') { - s[len-1] = '\0'; - s++; - } else { - slapi_log_error(SLAPI_LOG_FATAL, plugin_name, - "__aclp__init_targetattr: Error: The statement does not begin and end with a \": [%s]\n", - s); - return ACL_SYNTAX_ERR; + /* Simple targetattr statements may not be quoted e.g. + targetattr=* or targetattr=userPassword + if it begins with a quote, it must end with one as well + */ + if (*s == '"') { + s++; /* skip leading quote */ + if (s[len-1] == '"') { + s[len-1] = '\0'; /* trim trailing quote */ + } else { + /* error - if it begins with a quote, it must end with a quote */ + slapi_log_error(SLAPI_LOG_FATAL, plugin_name, + "__aclp__init_targetattr: Error: The statement does not begin and end with a \": [%s]\n", + attr_val); + return ACL_SYNTAX_ERR; + } } str = s; From fedora-directory-commits at redhat.com Fri Oct 19 20:05:14 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 19 Oct 2007 16:05:14 -0400 Subject: [Fedora-directory-commits] ldapserver/m4 db.m4,1.9,1.10 Message-ID: <200710192005.l9JK5ESo020095@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/m4 In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20058/ldapserver/m4 Modified Files: db.m4 Log Message: Resolves: bug 340361 Bug Description: build links wrong libdb on 64-bit systems Reviewed by: nhosoi (Thanks!) Fix Description: Once again, libtool attempts to be helpful but is instead harmful. If you have both db4-devel.i386 and db4-devel.x86_64 installed, this will install /usr/lib/libdb-4.N.la. If you use libtool to link with -ldb-4.N, and you do not specify a search path, libtool will attempt to find this library in it's default search path, which is something like /usr/lib/gcc/x86_64/blahblahblah/../../../lib. This will find /usr/lib/libdb-4.N.la and will use the information in that file and link the object with /usr/lib/libdb-4.N.so, instead of just passing -ldb-4.N through to the linker which is what it ought to do (darn libtool). In order to make libtool do the right thing, we must pass in -L$libdir -ldb-4.N to libtool so that it will use $libdir first in its search path. Platforms tested: RHEL5 x86_64, RHEL4 x86_64 Flag Day: yes - autotool file changes Doc impact: no Index: db.m4 =================================================================== RCS file: /cvs/dirsec/ldapserver/m4/db.m4,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- db.m4 20 Aug 2007 17:49:17 -0000 1.9 +++ db.m4 19 Oct 2007 20:05:12 -0000 1.10 @@ -30,6 +30,8 @@ if test -f "/usr/include/db.h"; then db_incdir="/usr/include" db_inc="-I/usr/include" + db_lib='-L$(libdir)' + db_libdir='$(libdir)' else AC_MSG_ERROR([db.h not found]) fi @@ -59,6 +61,8 @@ AC_MSG_RESULT([using /usr/include/db.h]) db_incdir="/usr/include" db_inc="-I/usr/include" + db_lib='-L$(libdir)' + db_libdir='$(libdir)' else AC_MSG_RESULT(no) AC_MSG_ERROR([db not found, specify with --with-db.]) From fedora-directory-commits at redhat.com Fri Oct 19 20:05:15 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 19 Oct 2007 16:05:15 -0400 Subject: [Fedora-directory-commits] ldapserver aclocal.m4, 1.57, 1.58 configure, 1.74, 1.75 missing, 1.42, 1.43 install-sh, 1.42, 1.43 depcomp, 1.42, 1.43 compile, 1.41, 1.42 Makefile.in, 1.78, 1.79 config.sub, 1.41, 1.42 config.guess, 1.41, 1.42 Message-ID: <200710192005.l9JK5Ftx020109@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20058/ldapserver Modified Files: aclocal.m4 configure missing install-sh depcomp compile Makefile.in config.sub config.guess Log Message: Resolves: bug 340361 Bug Description: build links wrong libdb on 64-bit systems Reviewed by: nhosoi (Thanks!) Fix Description: Once again, libtool attempts to be helpful but is instead harmful. If you have both db4-devel.i386 and db4-devel.x86_64 installed, this will install /usr/lib/libdb-4.N.la. If you use libtool to link with -ldb-4.N, and you do not specify a search path, libtool will attempt to find this library in it's default search path, which is something like /usr/lib/gcc/x86_64/blahblahblah/../../../lib. This will find /usr/lib/libdb-4.N.la and will use the information in that file and link the object with /usr/lib/libdb-4.N.so, instead of just passing -ldb-4.N through to the linker which is what it ought to do (darn libtool). In order to make libtool do the right thing, we must pass in -L$libdir -ldb-4.N to libtool so that it will use $libdir first in its search path. Platforms tested: RHEL5 x86_64, RHEL4 x86_64 Flag Day: yes - autotool file changes Doc impact: no Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.74 retrieving revision 1.75 diff -u -r1.74 -r1.75 --- configure 19 Oct 2007 18:48:27 -0000 1.74 +++ configure 19 Oct 2007 20:05:12 -0000 1.75 @@ -24169,6 +24169,8 @@ if test -f "/usr/include/db.h"; then db_incdir="/usr/include" db_inc="-I/usr/include" + db_lib='-L$(libdir)' + db_libdir='$(libdir)' else { { echo "$as_me:$LINENO: error: db.h not found" >&5 echo "$as_me: error: db.h not found" >&2;} @@ -24207,6 +24209,8 @@ echo "${ECHO_T}using /usr/include/db.h" >&6 db_incdir="/usr/include" db_inc="-I/usr/include" + db_lib='-L$(libdir)' + db_libdir='$(libdir)' else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 From fedora-directory-commits at redhat.com Fri Oct 19 22:14:59 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 19 Oct 2007 18:14:59 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl aclparse.c, 1.9, 1.10 Message-ID: <200710192214.l9JMEx2S005416@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5399 Modified Files: aclparse.c Log Message: Resolves: bug 232910 Description: ACI targetattr list parser is whitespace sensitive Fix Description: In addition to the previous fixes, test for quote at end of string before incrementing s - otherwise test will always fail. Index: aclparse.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclparse.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- aclparse.c 19 Oct 2007 19:01:16 -0000 1.9 +++ aclparse.c 19 Oct 2007 22:14:56 -0000 1.10 @@ -1239,16 +1239,16 @@ if it begins with a quote, it must end with one as well */ if (*s == '"') { + if (s[len-1] == '"') { + s[len-1] = '\0'; /* trim trailing quote */ + } else { + /* error - if it begins with a quote, it must end with a quote */ + slapi_log_error(SLAPI_LOG_FATAL, plugin_name, + "__aclp__init_targetattr: Error: The statement does not begin and end with a \": [%s]\n", + attr_val); + return ACL_SYNTAX_ERR; + } s++; /* skip leading quote */ - if (s[len-1] == '"') { - s[len-1] = '\0'; /* trim trailing quote */ - } else { - /* error - if it begins with a quote, it must end with a quote */ - slapi_log_error(SLAPI_LOG_FATAL, plugin_name, - "__aclp__init_targetattr: Error: The statement does not begin and end with a \": [%s]\n", - attr_val); - return ACL_SYNTAX_ERR; - } } str = s; From fedora-directory-commits at redhat.com Mon Oct 22 18:29:57 2007 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Mon, 22 Oct 2007 14:29:57 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/snmp main.c, 1.14, 1.15 Message-ID: <200710221829.l9MITvQR010052@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/snmp In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10019 Modified Files: main.c Log Message: Resolves: 344631 Summary: Corrected path generation for loading SNMP stats file. Index: main.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/main.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- main.c 18 Oct 2007 19:20:16 -0000 1.14 +++ main.c 22 Oct 2007 18:29:55 -0000 1.15 @@ -391,11 +391,12 @@ serv_p->port = atol(val); got_port = 1; } else if (strcmp(attr, "nsslapd-rundir") == 0) { - serv_p->stats_file = malloc(vlen + 13); + /* 8 = "/" + ".stats" + \0 */ + serv_p->stats_file = malloc(vlen + strlen(instancename) + 8); if (serv_p->stats_file != NULL) { - snprintf(serv_p->stats_file, vlen + 13, - "%s/%s.stats", instancename, val); - serv_p->stats_file[(vlen + 12)] = (char)0; + snprintf(serv_p->stats_file, vlen + strlen(instancename) + 8, + "%s/%s.stats", val, instancename); + serv_p->stats_file[(vlen + strlen(instancename) + 7)] = (char)0; } else { printf("ldap-agent: malloc error processing config file\n"); free(entry); From fedora-directory-commits at redhat.com Tue Oct 23 02:13:55 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 22 Oct 2007 22:13:55 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSMigration.pm.in, 1.20, 1.21 Message-ID: <200710230213.l9N2DtxX022238@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22221/ldapserver/ldap/admin/src/scripts Modified Files: DSMigration.pm.in Log Message: Resolves: bug 345711 Bug Description: migration : ignore idl switch value in 6.21 and earlier Reviewed by: nhosoi (Thanks!) Fix Description: If we are migrating a 6.21 or older database, we must not preserve the old idl switch setting, we must use the new default. We also have to use LDIF files for database migration as we cannot reuse the old binary database files. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: DSMigration.pm.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSMigration.pm.in,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- DSMigration.pm.in 19 Oct 2007 01:50:15 -0000 1.20 +++ DSMigration.pm.in 23 Oct 2007 02:13:53 -0000 1.21 @@ -134,6 +134,37 @@ 'aci' => 'aci' ); +sub getDBVERSION { + my $olddbdir = shift; + my $data = shift; + + open DBVERSION, "$olddbdir/DBVERSION" or + return ('error_reading_dbversion', $olddbdir, $!); + my $line = ; + close DBVERSION; + chomp($line); + my @foo = split("/", $line); + $data = \@foo; + return (); +} + +sub isOldDatabase { + my $olddbdir = shift; + my $errs = shift; # array ref + # check old DBVERSION file + my @verinfo; + if (@{$errs} = getDBVERSION($olddbdir, \@verinfo)) { + return 0; + } + + if ((($verinfo[0] =~ /^netscape/i) or ($verinfo[0] =~ /^iplanet/i)) and + (($verinfo[1] =~ /^6/) or ($verinfo[1] =~ /^5/) or ($verinfo[1] =~ /^4/))) { + return 1; + } + + return 0; +} + sub getNewDbDir { my ($ent, $attr, $mig, $inst) = @_; my $newval; @@ -217,7 +248,27 @@ # nsslapd-idl-switch # if not doing cross platform, meaning we just use the existing # database binaries, we must preserve whatever the old value is + # unless migrating from 6.21 or earlier, in which case we must + # be migrating from LDIF, and must use the new idl switch if (!$mig->{crossplatform}) { + # the given entry is the old entry - see if it has the nsslapd-directory + my $olddbdir = $ent->getValues('nsslapd-db-home-directory') || + $ent->getValues('nsslapd-directory') || + "$mig->{actualsroot}/$inst/db"; # old default db home directory + # replace the old sroot value with the actual physical location on the target/dest + $olddbdir =~ s/^$mig->{actualsroot}/$mig->{oldsroot}/; + my @errs; + my $isold = isOldDatabase($olddbdir, \@errs); + if (@errs) { + $mig->msg($FATAL, @errs); + return $newval; # use default new value + } elsif ($isold) { + debug(3, "The database in $olddbdir is too old to migrate the idl switch setting\n"); + return $newval; # use default new value + } + + # else the database could be in the new format already - preserve + # the user's old value $newval = $ent->getValues($attr); } @@ -241,35 +292,17 @@ 'nsslapd-idl-switch' => \&migIdlSwitch ); -sub getDBVERSION { - my $olddbdir = shift; - my $data = shift; - - open DBVERSION, "$olddbdir/DBVERSION" or - return ('error_reading_dbversion', $olddbdir, $!); - my $line = ; - close DBVERSION; - chomp($line); - my @foo = split("/", $line); - $data = \@foo; - return (); -} - sub copyDatabaseDirs { my $srcdir = shift; my $destdir = shift; my $filesonly = shift; my @errs; - # check old DBVERSION file - my @verinfo; - if (@errs = getDBVERSION($srcdir, \@verinfo)) { + my $isold = isOldDatabase($srcdir, \@errs); + if (@errs) { return @errs; - } - - if ((($verinfo[0] =~ /^netscape/i) or ($verinfo[0] =~ /^iplanet/i)) and - (($verinfo[1] =~ /^6/) or ($verinfo[1] =~ /^5/) or ($verinfo[1] =~ /^4/))) { - return ('error_database_too_old', $srcdir, @verinfo); + } elsif ($isold) { + return ('error_database_too_old', $olddbdir, @verinfo); } if (-d $srcdir && ! -d $destdir && !$filesonly) { From fedora-directory-commits at redhat.com Tue Oct 23 16:14:01 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 23 Oct 2007 12:14:01 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd log.c, 1.19, 1.20 Message-ID: <200710231614.l9NGE1Qb002162@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1693 Modified Files: log.c Log Message: Resolves: #188320 Summary: HP-UX: warnings reported by the HP-UX compiler (Comment #25,26) Change description: moved the DEBUG_TRACE to the place before deleting the physical log file. Index: log.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/log.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- log.c 18 Oct 2007 00:08:34 -0000 1.19 +++ log.c 23 Oct 2007 16:13:58 -0000 1.20 @@ -3145,6 +3145,10 @@ return 0; } } + LDAPDebug(LDAP_DEBUG_TRACE, + "LOGINFO:Removing file:%s.%s because of (%s)\n", + loginfo.log_error_file, tbuf, + logstr); if (p_delete_logp == delete_logp) { /* then we are deleteing the first one */ @@ -3159,11 +3163,6 @@ if (PR_Delete(buffer) != PR_SUCCESS) { LDAPDebug(LDAP_DEBUG_ANY, "LOGINFO:Unable to remove file:%s.%s\n", loginfo.log_audit_file, tbuf,0); - } else { - LDAPDebug(LDAP_DEBUG_TRACE, - "LOGINFO:Removed file:%s.%s because of (%s)\n", - loginfo.log_error_file, tbuf, - logstr); } slapi_ch_free((void**)&delete_logp); loginfo.log_numof_error_logs--; From fedora-directory-commits at redhat.com Wed Oct 24 18:41:17 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 24 Oct 2007 14:41:17 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/syntaxes value.c, 1.8, 1.9 Message-ID: <200710241841.l9OIfHQo014647@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14369/ldap/servers/plugins/syntaxes Modified Files: value.c Log Message: Resolves: #339791 Summary: rhds71sp1 rhel3u6 - ns-slapd process dies with segmentation fault Description: ldap_utf8prev, LDAP_UTF8PREV, and LDAP_UTF8DEC were sometimes used without checking the returned pointer going back beyond the beginning of the string. Index: value.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes/value.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- value.c 2 Oct 2007 18:39:50 -0000 1.8 +++ value.c 24 Oct 2007 18:41:15 -0000 1.9 @@ -88,13 +88,14 @@ */ void value_normalize( - char *s, - int syntax, + char *s, + int syntax, int trim_spaces ) { - char *d; - int prevspace, curspace; + char *head = s; + char *d; + int prevspace, curspace; if ( ! (syntax & SYNTAX_CIS) && ! (syntax & SYNTAX_CES) ) { return; @@ -107,10 +108,10 @@ d = s; if (trim_spaces) { - /* strip leading blanks */ - while (utf8isspace_fast(s)) { - LDAP_UTF8INC(s); - } + /* strip leading blanks */ + while (utf8isspace_fast(s)) { + LDAP_UTF8INC(s); + } } /* for int syntax, look for leading sign, then trim 0s */ @@ -167,8 +168,8 @@ /* compress multiple blanks */ if ( prevspace && curspace ) { - LDAP_UTF8INC(s); - continue; + LDAP_UTF8INC(s); + continue; } prevspace = curspace; if ( syntax & SYNTAX_CIS ) { @@ -177,28 +178,28 @@ s += ssz; d += dsz; } else { - char *np; - int sz; + char *np; + int sz; - np = ldap_utf8next(s); - if (np == NULL || np == s) break; - sz = np - s; - memmove(d,s,sz); - d += sz; - s += sz; + np = ldap_utf8next(s); + if (np == NULL || np == s) break; + sz = np - s; + memmove(d,s,sz); + d += sz; + s += sz; } } *d = '\0'; /* strip trailing blanks */ if (prevspace && trim_spaces) { - char *nd; + char *nd; - nd = ldap_utf8prev(d); - while (nd && utf8isspace_fast(nd)) { - d = nd; - nd = ldap_utf8prev(d); - *d = '\0'; - } + nd = ldap_utf8prev(d); + while (nd && nd >= head && utf8isspace_fast(nd)) { + d = nd; + nd = ldap_utf8prev(d); + *d = '\0'; + } } } From fedora-directory-commits at redhat.com Wed Oct 24 18:41:17 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 24 Oct 2007 14:41:17 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl acllas.c, 1.10, 1.11 aclparse.c, 1.10, 1.11 Message-ID: <200710241841.l9OIfIkT014654@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14369/ldap/servers/plugins/acl Modified Files: acllas.c aclparse.c Log Message: Resolves: #339791 Summary: rhds71sp1 rhel3u6 - ns-slapd process dies with segmentation fault Description: ldap_utf8prev, LDAP_UTF8PREV, and LDAP_UTF8DEC were sometimes used without checking the returned pointer going back beyond the beginning of the string. Index: acllas.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acllas.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- acllas.c 19 Oct 2007 15:36:01 -0000 1.10 +++ acllas.c 24 Oct 2007 18:41:15 -0000 1.11 @@ -562,7 +562,10 @@ /* ignore trailing whitespace */ len = strlen(user); ptr = user+len-1; - while(ldap_utf8isspace(ptr)){ *ptr = '\0'; LDAP_UTF8DEC(ptr); } + while(ptr >= user && ldap_utf8isspace(ptr)) { + *ptr = '\0'; + LDAP_UTF8DEC(ptr); + } } /* @@ -806,7 +809,10 @@ /* ignore trailing whitespace */ len = strlen(groupName); ptr = groupName+len-1; - while(ldap_utf8isspace(ptr)) { *ptr = '\0'; LDAP_UTF8DEC(ptr); } + while(ptr >= groupName && ldap_utf8isspace(ptr)) { + *ptr = '\0'; + LDAP_UTF8DEC(ptr); + } } /* @@ -966,7 +972,10 @@ /* ignore trailing whitespace */ len = strlen(role); ptr = role+len-1; - while(ldap_utf8isspace(ptr)) { *ptr = '\0'; LDAP_UTF8DEC(ptr); } + while(ptr >= role && ldap_utf8isspace(ptr)) { + *ptr = '\0'; + LDAP_UTF8DEC(ptr); + } } /* @@ -1118,7 +1127,10 @@ while(ldap_utf8isspace(attrName)) LDAP_UTF8INC(attrName); len = strlen(attrName); ptr = attrName+len-1; - while(ldap_utf8isspace(ptr)) { *ptr = '\0'; LDAP_UTF8DEC(ptr); } + while(ptr >= attrName && ldap_utf8isspace(ptr)) { + *ptr = '\0'; + LDAP_UTF8DEC(ptr); + } /* See if we have a parent[2].attr" rule */ @@ -1346,7 +1358,10 @@ while(ldap_utf8isspace(attr)) LDAP_UTF8INC(attr); len = strlen(attr); ptr = attr+len-1; - while(ldap_utf8isspace(ptr)) { *ptr = '\0'; LDAP_UTF8DEC(ptr); } + while(ptr >= attr && ldap_utf8isspace(ptr)) { + *ptr = '\0'; + LDAP_UTF8DEC(ptr); + } slapi_log_error( SLAPI_LOG_ACL, plugin_name, "DS_LASAuthMethodEval:authtype:%s authmethod:%s\n", @@ -2124,7 +2139,10 @@ while(ldap_utf8isspace(attrName)) LDAP_UTF8INC(attrName); len = strlen(attrName); ptr = attrName+len-1; - while(ldap_utf8isspace(ptr)) { *ptr = '\0'; LDAP_UTF8DEC(ptr); } + while(ptr >= attrName && ldap_utf8isspace(ptr)) { + *ptr = '\0'; + LDAP_UTF8DEC(ptr); + } slapi_log_error( SLAPI_LOG_ACL, plugin_name,"Attr:%s\n" , attrName, 0,0); Index: aclparse.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclparse.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- aclparse.c 19 Oct 2007 22:14:56 -0000 1.10 +++ aclparse.c 24 Oct 2007 18:41:15 -0000 1.11 @@ -464,7 +464,7 @@ char *next; next = s + 12; s--; - while (s != str && ldap_utf8isspace(s)) LDAP_UTF8DEC(s); + while (s > str && ldap_utf8isspace(s)) LDAP_UTF8DEC(s); if (s && *s == ';') { /* We don't support authenticate stuff */ return ACL_INVALID_AUTHORIZATION; @@ -1542,9 +1542,12 @@ if (*str) { /* ignore trailing whitespace */ - len = strlen(str); - ptr = str+len-1; - while(ldap_utf8isspace(ptr)){ *ptr = '\0'; LDAP_UTF8DEC(ptr); } + len = strlen(str); + ptr = str+len-1; + while(ptr >= str && ldap_utf8isspace(ptr)) { + *ptr = '\0'; + LDAP_UTF8DEC(ptr); + } } } From fedora-directory-commits at redhat.com Thu Oct 25 18:12:01 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Thu, 25 Oct 2007 14:12:01 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSMigration.pm.in, 1.21, 1.22 Message-ID: <200710251812.l9PIC1al004871@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4852 Modified Files: DSMigration.pm.in Log Message: Resolves: bug 345711 Description: migration : ignore idl switch value in 6.21 and earlier Fix Description: Fix the error message Index: DSMigration.pm.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSMigration.pm.in,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- DSMigration.pm.in 23 Oct 2007 02:13:53 -0000 1.21 +++ DSMigration.pm.in 25 Oct 2007 18:11:59 -0000 1.22 @@ -302,7 +302,7 @@ if (@errs) { return @errs; } elsif ($isold) { - return ('error_database_too_old', $olddbdir, @verinfo); + return ('error_database_too_old', $srcdir); } if (-d $srcdir && ! -d $destdir && !$filesonly) { From fedora-directory-commits at redhat.com Fri Oct 26 08:10:03 2007 From: fedora-directory-commits at redhat.com (VIAGRA ® Official Site) Date: Fri, 26 Oct 2007 04:10:03 -0400 Subject: [Fedora-directory-commits] Lovers package at discount price! Message-ID: <20071026-71003.74981.qmail@rrcs-76-79-239-121.west.biz.rr.com> An HTML attachment was scrubbed... URL: From fedora-directory-commits at redhat.com Fri Oct 26 22:00:34 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 26 Oct 2007 18:00:34 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts migrate-ds.res, 1.7, 1.8 Message-ID: <200710262200.l9QM0YPk023881@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23864 Modified Files: migrate-ds.res Log Message: Resolves: Bug 345711 Description: migration : ignore idl switch value in 6.21 and earlier Fix Description: Fix the error message Index: migrate-ds.res =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/migrate-ds.res,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- migrate-ds.res 17 Oct 2007 15:56:53 -0000 1.7 +++ migrate-ds.res 26 Oct 2007 22:00:32 -0000 1.8 @@ -26,7 +26,7 @@ error_removing_index_file = Could not remove the index file '%s'. Error: %s\n\n error_recreating_index_file = Could not re-create the index file '%s'. Error: %s\n\n error_reading_dbversion = Could not read the old database version information from '%s'. Error: %s\n\n -error_database_too_old = The database at '%s' is version '%s/%s'.\ +error_database_too_old = The database at '%s' is too old to be migrated as a binary copy. You must export to LDIF.\n\n This version cannot be migrated using the database binaries. You must\ first convert the databases to LDIF format and use the cross platform\ migration procedure. This procedure is documented in the migration\ From fedora-directory-commits at redhat.com Fri Oct 26 22:04:40 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 26 Oct 2007 18:04:40 -0400 Subject: [Fedora-directory-commits] ldapserver Makefile.am, 1.63, 1.64 Makefile.in, 1.79, 1.80 aclocal.m4, 1.58, 1.59 configure, 1.75, 1.76 missing, 1.43, 1.44 install-sh, 1.43, 1.44 depcomp, 1.43, 1.44 compile, 1.42, 1.43 config.sub, 1.42, 1.43 config.guess, 1.42, 1.43 Message-ID: <200710262204.l9QM4eMF030243@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30194/ldapserver Modified Files: Makefile.am Makefile.in aclocal.m4 configure missing install-sh depcomp compile config.sub config.guess Log Message: Resolves: bug 353071 Description: Need to support mail server schema Fix Description: There are customers who are using the mail schema, so we need to keep it in the product. Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.am,v retrieving revision 1.63 retrieving revision 1.64 diff -u -r1.63 -r1.64 --- Makefile.am 18 Oct 2007 00:08:26 -0000 1.63 +++ Makefile.am 26 Oct 2007 22:04:37 -0000 1.64 @@ -173,6 +173,7 @@ $(srcdir)/ldap/schema/50ns-admin.ldif \ $(srcdir)/ldap/schema/50ns-certificate.ldif \ $(srcdir)/ldap/schema/50ns-directory.ldif \ + $(srcdir)/ldap/schema/50ns-mail.ldif \ $(srcdir)/ldap/schema/50ns-value.ldif \ $(srcdir)/ldap/schema/50ns-web.ldif \ $(srcdir)/ldap/schema/60pam-plugin.ldif \ Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.79 retrieving revision 1.80 diff -u -r1.79 -r1.80 --- Makefile.in 19 Oct 2007 20:05:12 -0000 1.79 +++ Makefile.in 26 Oct 2007 22:04:37 -0000 1.80 @@ -1088,6 +1088,7 @@ $(srcdir)/ldap/schema/50ns-admin.ldif \ $(srcdir)/ldap/schema/50ns-certificate.ldif \ $(srcdir)/ldap/schema/50ns-directory.ldif \ + $(srcdir)/ldap/schema/50ns-mail.ldif \ $(srcdir)/ldap/schema/50ns-value.ldif \ $(srcdir)/ldap/schema/50ns-web.ldif \ $(srcdir)/ldap/schema/60pam-plugin.ldif \ From fedora-directory-commits at redhat.com Fri Oct 26 22:04:40 2007 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 26 Oct 2007 18:04:40 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/schema 50ns-mail.ldif, 1.5, 1.6 Message-ID: <200710262204.l9QM4eb9030247@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/schema In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30194/ldapserver/ldap/schema Added Files: 50ns-mail.ldif Log Message: Resolves: bug 353071 Description: Need to support mail server schema Fix Description: There are customers who are using the mail schema, so we need to keep it in the product. Index: 50ns-mail.ldif =================================================================== RCS file: 50ns-mail.ldif diff -N 50ns-mail.ldif --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ 50ns-mail.ldif 26 Oct 2007 22:04:38 -0000 1.6 @@ -0,0 +1,80 @@ +# +# BEGIN COPYRIGHT BLOCK +# This Program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; version 2 of the License. +# +# This Program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple +# Place, Suite 330, Boston, MA 02111-1307 USA. +# +# In addition, as a special exception, Red Hat, Inc. gives You the additional +# right to link the code of this Program with code not covered under the GNU +# General Public License ("Non-GPL Code") and to distribute linked combinations +# including the two, subject to the limitations in this paragraph. Non-GPL Code +# permitted under this exception must only link to the code of this Program +# through those well defined interfaces identified in the file named EXCEPTION +# found in the source code files (the "Approved Interfaces"). The files of +# Non-GPL Code may instantiate templates or use macros or inline functions from +# the Approved Interfaces without causing the resulting work to be covered by +# the GNU General Public License. Only Red Hat, Inc. may make changes or +# additions to the list of Approved Interfaces. You must obey the GNU General +# Public License in all respects for all of the Program code and other code used +# in conjunction with the Program except the Non-GPL Code covered by this +# exception. If you modify this file, you may extend this exception to your +# version of the file, but you are not obligated to do so. If you do not wish to +# provide this exception without modification, you must delete this exception +# statement from your version and license this file solely under the GPL without +# exception. +# +# +# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. +# Copyright (C) 2005 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK +# +# +# Schema for Netscape Messaging Server 4.x. Some attributes are also +# used by NMS 5.x +# +dn: cn=schema +attributeTypes: ( 2.16.840.1.113730.3.1.16 NAME ( 'mailDeliveryOption' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.707 NAME ( 'vacationstartdate' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.18 NAME ( 'mailHost' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.33 NAME ( 'mgrpModerator' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.25 NAME ( 'mgrpDeliverTo' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( mgrpApprovePassword-oid NAME ( 'mgrpApprovePassword' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.31 NAME ( 'mailEnhancedUniqueMember' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.781 NAME ( 'mgrpAddHeader' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.22 NAME ( 'mgrpAllowedBroadcaster' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.30 NAME ( 'mgrpRFC822MailMember' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( nsmsgNumMsgQuota-oid NAME ( 'nsmsgNumMsgQuota' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.13 NAME ( 'mailAlternateAddress' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.708 NAME ( 'vacationenddate' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.20 NAME ( 'mailProgramDeliveryInfo' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.801 NAME ( 'mgrpRemoveHeader' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.12 NAME ( 'mailAccessDomain' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.14 NAME ( 'mailAutoReplyMode' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.15 NAME ( 'mailAutoReplyText' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.21 NAME ( 'mailQuota' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.788 NAME ( 'mgrpBroadcasterPolicy' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.24 NAME ( 'mailRoutingAddress' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.19 NAME ( 'mailMessageStore' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.520 NAME ( 'nswmExtendedUserPrefs' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.26 NAME ( 'mgrpErrorsTo' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.23 NAME ( 'mgrpAllowedDomain' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.28 NAME ( 'mgrpMsgRejectAction' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( nsmsgDisallowAccess-oid NAME ( 'nsmsgDisallowAccess' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.17 NAME ( 'mailForwardingAddress' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.32 NAME ( 'mgrpMsgMaxSize' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.29 NAME ( 'mgrpMsgRejectText' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'Netscape Messaging Server 4.x' ) +attributeTypes: ( 2.16.840.1.113730.3.1.789 NAME ( 'mgrpNoDuplicateChecks' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Messaging Server 4.x' ) +objectclasses: ( 2.16.840.1.113730.3.2.3 NAME 'mailRecipient' DESC '' SUP top AUXILIARY MUST ( objectClass ) MAY ( cn $ mail $ mailAlternateAddress $ mailHost $ mailRoutingAddress $ mailAccessDomain $ mailAutoReplyMode $ mailAutoReplyText $ mailDeliveryOption $ mailForwardingAddress $ mailMessageStore $ mailProgramDeliveryInfo $ mailQuota $ multiLineDescription $ uid $ userPassword ) X-ORIGIN 'Netscape Messaging Server 4.x' ) +objectclasses: ( 2.16.840.113730.3.2.37 NAME 'nsMessagingServerUser' DESC '' SUP top AUXILIARY MUST ( objectClass ) MAY ( cn $ mailAccessDomain $ mailAutoReplyMode $ mailAutoReplyText $ mailDeliveryOption $ mailForwardingAddress $ mailMessageStore $ mailProgramDeliveryInfo $ mailQuota $ nsmsgDisallowAccess $ nsmsgNumMsgQuota $ nswmExtendedUserPrefs $ vacationstartdate $ vacationenddate ) X-ORIGIN 'Netscape Messaging Server 4.x' ) +objectclasses: ( 2.16.840.1.113730.3.2.4 NAME 'mailGroup' DESC '' SUP top AUXILIARY MUST ( objectClass ) MAY ( cn $ mail $ mailAlternateAddress $ mailHost $ mailRoutingAddress $ mgrpAddHeader $ mgrpAllowedBroadcaster $ mgrpAllowedDomain $ mgrpApprovePassword $ mgrpBroadcasterPolicy $ mgrpDeliverTo $ mgrpErrorsTo $ mgrpModerator $ mgrpMsgMaxSize $ mgrpMsgRejectAction $ mgrpMsgRejectText $ mgrpNoDuplicateChecks $ mgrpRemoveHeader $ mgrpRFC822MailMember $ owner ) X-ORIGIN 'Netscape Messaging Server 4.x' ) +objectclasses: ( 2.16.840.1.113730.3.2.5 NAME 'groupOfMailEnhancedUniqueNames' DESC '' SUP top AUXILIARY MUST ( objectClass $ cn ) MAY ( businessCategory $ description $ mailEnhancedUniqueMember $ o $ ou $ owner $ seeAlso ) X-ORIGIN 'Netscape Messaging Server 4.x' ) +objectclasses: ( 2.16.840.1.113730.3.2.24 NAME 'netscapeMailServer' DESC '' SUP top AUXILIARY MUST ( objectClass ) X-ORIGIN 'Netscape Messaging Server 4.x' ) From fedora-directory-commits at redhat.com Wed Oct 31 05:30:56 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 31 Oct 2007 01:30:56 -0400 Subject: [Fedora-directory-commits] adminserver/include/libadmin libadmin.h, 1.8, 1.9 Message-ID: <200710310530.l9V5UulB023030@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/adminserver/include/libadmin In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22940/include/libadmin Modified Files: libadmin.h Log Message: Resolves: #357501 Summary: Console/admin express: can't view log files Description: Implemented getLogDir to get the log dir from the server's config info. To share psetHasObjectClass, moved it from security.c to lib/libadmin/util.c. Index: libadmin.h =================================================================== RCS file: /cvs/dirsec/adminserver/include/libadmin/libadmin.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- libadmin.h 11 May 2007 19:44:05 -0000 1.8 +++ libadmin.h 31 Oct 2007 05:30:54 -0000 1.9 @@ -578,6 +578,9 @@ NSAPI_PUBLIC int util_verify_file_or_dir(const char *path, PRFileType, const char *child, size_t, PRFileType); +NSAPI_PUBLIC int +util_psetHasObjectClass(PsetHndl pset, const char *ocname); + NSPR_END_EXTERN_C #endif /* libadmin_h */ From fedora-directory-commits at redhat.com Wed Oct 31 05:30:57 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 31 Oct 2007 01:30:57 -0400 Subject: [Fedora-directory-commits] adminserver/lib/libadmin util.c, 1.9, 1.10 Message-ID: <200710310530.l9V5UvUJ023038@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/adminserver/lib/libadmin In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22940/lib/libadmin Modified Files: util.c Log Message: Resolves: #357501 Summary: Console/admin express: can't view log files Description: Implemented getLogDir to get the log dir from the server's config info. To share psetHasObjectClass, moved it from security.c to lib/libadmin/util.c. Index: util.c =================================================================== RCS file: /cvs/dirsec/adminserver/lib/libadmin/util.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- util.c 11 May 2007 19:44:05 -0000 1.9 +++ util.c 31 Oct 2007 05:30:54 -0000 1.10 @@ -1349,72 +1349,90 @@ PRStatus status = PR_GetFileInfo(name, &fileinfo); ret = ((status == PR_SUCCESS) && (fileinfo.type == filetype)); if (ret) { - /* checks out ok - let's split it into the base name and the parent dir, - open the parent dir, and see if the base name exists in the parent dir - */ - char *copy = PL_strdup(name); - size_t len = strlen(copy); - char *ptr = ©[len-1]; - /* get the basename - a really bad name may look like - /path/foo/// or even ///////////////// */ - for (; (ptr > copy) && (*ptr == '/'); --ptr) { - /* do nothing */ - } - if ((ptr == copy) && (*ptr == '/')) { - /* bad - string consists of nothing but '/' */ - ptr = NULL; - ret = 0; - } else { - PRDir *pdir; - PRDirEntry *pent; + /* checks out ok - let's split it into the base name and the parent dir, + open the parent dir, and see if the base name exists in the parent dir + */ + char *copy = PL_strdup(name); + size_t len = strlen(copy); + char *ptr = ©[len-1]; + /* get the basename - a really bad name may look like + /path/foo/// or even ///////////////// */ + for (; (ptr > copy) && (*ptr == '/'); --ptr) { + /* do nothing */ + } + if ((ptr == copy) && (*ptr == '/')) { + /* bad - string consists of nothing but '/' */ + ptr = NULL; + ret = 0; + } else { + PRDir *pdir; + PRDirEntry *pent; - ret = 0; - if (*ptr == '/') { - *ptr = 0; /* terminate the string at the first trailing '/' */ - } - ptr = strrchr(copy, '/'); - if (!ptr) { - ptr = copy; - copy = PL_strdup("."); - } else { - *ptr = 0; - ++ptr; - ptr = PL_strdup(ptr); - } - /* copy now points at the parent, ptr at the child */ - if (pdir = PR_OpenDir(copy)) { - for(pent = PR_ReadDir(pdir, PR_SKIP_BOTH); pent && !ret; - pent = PR_ReadDir(pdir, PR_SKIP_BOTH)) { - ret = !strcmp(pent->name, ptr); - } - PR_CloseDir(pdir); - } - if (ret && childname && (filetype == PR_FILE_DIRECTORY)) { - ret = 0; - /* we've verified that name is a valid directory - see if - the given filename exists in that directory */ - if (pdir = PR_OpenDir(name)) { - for(pent = PR_ReadDir(pdir, PR_SKIP_BOTH); pent && !ret; - pent = PR_ReadDir(pdir, PR_SKIP_BOTH)) { - if (childlen > 0) { - ret = !strncmp(pent->name, childname, childlen); - } else { - ret = !strcmp(pent->name, childname); - } - } - PR_CloseDir(pdir); - if (ret) { - /* child exists - check type */ - char *fullname = PR_smprintf("%s%c%s", name, FILE_PATHSEP, childname); - status = PR_GetFileInfo(fullname, &fileinfo); - ret = ((status == PR_SUCCESS) && (fileinfo.type == childtype)); - PR_smprintf_free(fullname); - } - } - } - } - PL_strfree(copy); - PL_strfree(ptr); + ret = 0; + if (*ptr == '/') { + *ptr = 0; /* terminate the string at the first trailing '/' */ + } + ptr = strrchr(copy, '/'); + if (!ptr) { + ptr = copy; + copy = PL_strdup("."); + } else { + *ptr = 0; + ++ptr; + ptr = PL_strdup(ptr); + } + /* copy now points at the parent, ptr at the child */ + if (pdir = PR_OpenDir(copy)) { + for(pent = PR_ReadDir(pdir, PR_SKIP_BOTH); pent && !ret; + pent = PR_ReadDir(pdir, PR_SKIP_BOTH)) { + ret = !strcmp(pent->name, ptr); + } + PR_CloseDir(pdir); + } + if (ret && childname && (filetype == PR_FILE_DIRECTORY)) { + ret = 0; + /* we've verified that name is a valid directory - see if + the given filename exists in that directory */ + if (pdir = PR_OpenDir(name)) { + for(pent = PR_ReadDir(pdir, PR_SKIP_BOTH); pent && !ret; + pent = PR_ReadDir(pdir, PR_SKIP_BOTH)) { + if (childlen > 0) { + ret = !strncmp(pent->name, childname, childlen); + } else { + ret = !strcmp(pent->name, childname); + } + } + PR_CloseDir(pdir); + if (ret) { + /* child exists - check type */ + char *fullname = PR_smprintf("%s%c%s", name, FILE_PATHSEP, childname); + status = PR_GetFileInfo(fullname, &fileinfo); + ret = ((status == PR_SUCCESS) && (fileinfo.type == childtype)); + PR_smprintf_free(fullname); + } + } + } + } + PL_strfree(copy); + PL_strfree(ptr); } return ret; } + +NSAPI_PUBLIC int +util_psetHasObjectClass(PsetHndl pset, const char *ocname) +{ + int rval = 0; + char *val = NULL; + ValueType nodeObjectClass = psetGetObjectClass(pset, "" /* use root node */, &rval); + ValueType iter = nodeObjectClass; + + rval = 0; + while ((!rval) && ((val = *iter++))) { + rval = !PL_strcasecmp(ocname, val); + } + + deleteValue(nodeObjectClass); + return rval; +} + From fedora-directory-commits at redhat.com Wed Oct 31 05:30:56 2007 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 31 Oct 2007 01:30:56 -0400 Subject: [Fedora-directory-commits] adminserver/admserv/cgi-src40 viewlog.c, 1.9, 1.10 security.c, 1.11, 1.12 cgicommon.h, 1.1, 1.2 Message-ID: <200710310530.l9V5UuFf023025@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/adminserver/admserv/cgi-src40 In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22940/admserv/cgi-src40 Modified Files: viewlog.c security.c cgicommon.h Log Message: Resolves: #357501 Summary: Console/admin express: can't view log files Description: Implemented getLogDir to get the log dir from the server's config info. To share psetHasObjectClass, moved it from security.c to lib/libadmin/util.c. Index: viewlog.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/viewlog.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- viewlog.c 27 Jun 2007 22:24:59 -0000 1.9 +++ viewlog.c 31 Oct 2007 05:30:53 -0000 1.10 @@ -56,19 +56,19 @@ #define RESOURCE_FILE "viewlog" #define resource_key(a,b) a b -#define DBT_INV_NUMBER resource_key(RESOURCE_FILE, "1") -#define DBT_INV_NUMBER_DESC resource_key(RESOURCE_FILE, "2") -#define DBT_SUBTITLE resource_key(RESOURCE_FILE, "3") -#define DBT_WITH resource_key(RESOURCE_FILE, "4") -#define DBT_NO_DIR resource_key(RESOURCE_FILE, "5") -#define DBT_NO_DIR_DESC resource_key(RESOURCE_FILE, "6") -#define DBT_NO_FILE resource_key(RESOURCE_FILE, "7") -#define DBT_NO_FILE_DESC resource_key(RESOURCE_FILE, "8") -#define DBT_NO_DIR_FOUND resource_key(RESOURCE_FILE, "9") -#define DBT_NO_ID resource_key(RESOURCE_FILE, "10") -#define DBT_NO_ID_DESC resource_key(RESOURCE_FILE, "11") -#define DBT_INV_NOHTML resource_key(RESOURCE_FILE, "12") -#define DBT_INV_NOHTML_DESC resource_key(RESOURCE_FILE, "13") +#define DBT_INV_NUMBER resource_key(RESOURCE_FILE, "1") +#define DBT_INV_NUMBER_DESC resource_key(RESOURCE_FILE, "2") +#define DBT_SUBTITLE resource_key(RESOURCE_FILE, "3") +#define DBT_WITH resource_key(RESOURCE_FILE, "4") +#define DBT_NO_DIR resource_key(RESOURCE_FILE, "5") +#define DBT_NO_DIR_DESC resource_key(RESOURCE_FILE, "6") +#define DBT_NO_FILE resource_key(RESOURCE_FILE, "7") +#define DBT_NO_FILE_DESC resource_key(RESOURCE_FILE, "8") +#define DBT_NO_DIR_FOUND resource_key(RESOURCE_FILE, "9") +#define DBT_NO_ID resource_key(RESOURCE_FILE, "10") +#define DBT_NO_ID_DESC resource_key(RESOURCE_FILE, "11") +#define DBT_INV_NOHTML resource_key(RESOURCE_FILE, "12") +#define DBT_INV_NOHTML_DESC resource_key(RESOURCE_FILE, "13") /* html resource */ #define DBT_DISPLAY_LOGFILE_SELECT_BEGIN resource_key(RESOURCE_FILE, "20") @@ -107,23 +107,23 @@ while(fgets(line, sizeof(line), cmd)) { if(strncmp(line, "format=", 7)) if((!str) || (strstr(line, str))) { - count++; - if(count<=num) { - if(!buffer) - buffer = (char **)MALLOC(sizeof(char *)); - else - buffer = (char **)REALLOC(buffer, count*(sizeof(char *))); - } - else - FREE(buffer[replace]); - temp = strlen(line); - line[temp-1] = ' '; - line[temp] = '\n'; - line[temp+1] = '\0'; - buffer[replace] = STRDUP(line); - if(replace == (num-1)) - replace=0; - else replace++; + count++; + if(count<=num) { + if(!buffer) + buffer = (char **)MALLOC(sizeof(char *)); + else + buffer = (char **)REALLOC(buffer, count*(sizeof(char *))); + } + else + FREE(buffer[replace]); + temp = strlen(line); + line[temp-1] = ' '; + line[temp] = '\n'; + line[temp+1] = '\0'; + buffer[replace] = STRDUP(line); + if(replace == (num-1)) + replace=0; + else replace++; } } if(count < num) { /* could not find num entries */ @@ -133,7 +133,7 @@ /* replace is at the first entry to output */ for(temp=0; temp