[Fedora-directory-commits] adminserver/pkg/el4 fedora-ds-admin.spec, NONE, 1.1
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/adminserver/pkg/el4
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10461/el4
Added Files:
fedora-ds-admin.spec
Log Message:
added spec files
--- NEW FILE fedora-ds-admin.spec ---
%define shortname fedora-ds
%define pkgname dirsrv
Summary: Fedora Administration Server (admin)
Name: fedora-ds-admin
Version: 1.1.0
Release: 1.15%{?dist}
License: GPL
URL: http://directory.fedoraproject.org/
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: dirsec-nspr-devel >= 4.6.4
BuildRequires: dirsec-nss-devel >= 3.11.4
BuildRequires: svrcore-devel >= 4.0.3
BuildRequires: mozldap6-devel >= 6.0.4
BuildRequires: cyrus-sasl-devel >= 2.1.19
BuildRequires: icu >= 3.4
BuildRequires: libicu-devel >= 3.4
BuildRequires: httpd-devel
BuildRequires: apr-devel
BuildRequires: fortitude-mod_nss
BuildRequires: adminutil-devel
Requires: fedora-ds-base
Requires: fortitude-mod_nss
# the following are needed for some of our scripts
Requires: perl-Mozilla-LDAP
# for the init script
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
Source0: %{name}-%{version}.tar.bz2
# fedora-ds-cvs.sh should be used to generate the source tarball from CVS
Source1: %{name}-cvs.sh
%description
Fedora Administration Server is an HTTP agent that provides management features
for Fedora Directory Server. It provides some management web apps that can
be used through a web browser. It provides the authentication, access control,
and CGI utilities used by the console.
%prep
%setup -q -n %{name}-%{version}
%build
%configure --disable-rpath --with-fortitude
# Generate symbolic info for debuggers
export XCFLAGS=$RPM_OPT_FLAGS
%ifarch x86_64 ppc64 ia64 s390x sparc64
export USE_64=1
%endif
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR="$RPM_BUILD_ROOT" install
# make console jars directory
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/html/java
#remove libtool and static libs
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/*.so
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/modules/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/modules/*.la
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/chkconfig --add %{pkgname}-admin
/sbin/ldconfig
%preun
if [ $1 = 0 ]; then
/sbin/service %{pkgname}-admin stop >/dev/null 2>&1 || :
/sbin/chkconfig --del %{pkgname}-admin
fi
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc LICENSE
%dir %{_sysconfdir}/%{pkgname}/admin-serv
%config(noreplace)%{_sysconfdir}/%{pkgname}/admin-serv/*.conf
%{_datadir}/%{pkgname}
%{_initrddir}/%{pkgname}-admin
%{_sysconfdir}/sysconfig/%{pkgname}-admin
%{_sbindir}/*
%{_libdir}/*.so.*
%{_libdir}/%{pkgname}
%changelog
* Mon Oct 15 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.15
- fix bogus dist macro
- change mozldap6 to mozldap
* Thu Oct 11 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.14
- make admin server work with SELinux enabled
- fix wording errors in setup
* Mon Oct 8 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.13
- added /etc/sysconfig/dirsrv-admin the file that allows you to set
- the environment used to start up the admin server (e.g. keytab, ulimit, etc.)
- the initscript and admin start script use this file now
- This version also has a fix to print the correct error message if the admin
- server cannot be contacted during setup or migration.
* Thu Sep 27 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.12
- fix a couple of migration issues, including the rpath $libdir problem
- allow ds_remove from console to remove instances
* Wed Sep 19 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.11
- one line fix to fix of 295001 - console.conf clobbered
* Tue Sep 18 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.10
- fixed migration issue bugzilla 295001 - console.conf clobbered
* Fri Sep 14 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.9
- fix several more migration problems
* Fri Sep 14 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.8
- fix migration - servers are started as they are migrated now
* Tue Aug 21 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.7
- Fix the with-fhs-opt configure flag
* Fri Aug 17 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.6
- remove curses
- make mod_admserv link against sasl
- add the usual .m4 files to mod_admserv instead of having all of
- the component logic in configure.in
* Thu Aug 16 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.5
- incorporate Noriko's migration fix
* Wed Aug 15 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.4
- address several migration issues
* Mon Aug 13 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.3
- there is no devel package, so remove unused .so files
* Mon Aug 13 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.2
- forgot to tag the modules
* Fri Aug 10 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.1
- get rid of cvsdate
- use pkgname of dirsrv for filesystem path naming
- get rid of devel package
- simplify files section
* Fri Aug 10 2007 Noriko Hosoi <nhosoi(a)redhat.com> - 1.1.0-0.3.20070810
- updated to latest sources
- upgraded the mozldap6 version to 6.0.4
* Wed Aug 8 2007 Noriko Hosoi <nhosoi(a)redhat.com> - 1.1.0-0.2.20070808
- updated to latest sources -- bug fixes in the setup scripts
* Mon Aug 6 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-0.1.20070806
- updated to latest sources
* Thu Aug 2 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-0.4.20070802
- There are no files in bindir anymore
* Thu Aug 2 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-0.3.20070802
- forgot to prepend build root to java dir creation
* Thu Aug 2 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-0.2.20070802
- forgot to add mod_admserv and mod_restartd to source
* Thu Aug 2 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-0.1.20070802
- updated to latest sources - fix build breakage
- add console jars dir under html
* Mon Jul 23 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-0.1.20070725
- Initial version based on fedora-ds-base.spec
16 years, 5 months
[Fedora-directory-commits] adminserver/pkg fedora-ds-admin.spec, NONE, 1.1
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/adminserver/pkg
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10461
Added Files:
fedora-ds-admin.spec
Log Message:
added spec files
--- NEW FILE fedora-ds-admin.spec ---
%define shortname fedora-ds
%define pkgname dirsrv
Summary: Fedora Administration Server (admin)
Name: fedora-ds-admin
Version: 1.1.0
Release: 1.15%{?dist}
License: GPL
URL: http://directory.fedoraproject.org/
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: nspr-devel >= 4.6.4
BuildRequires: nss-devel >= 3.11.4
BuildRequires: svrcore-devel >= 4.0.3
BuildRequires: mozldap-devel >= 6.0.4
BuildRequires: cyrus-sasl-devel >= 2.1.19
BuildRequires: icu >= 3.4
BuildRequires: libicu-devel >= 3.4
BuildRequires: httpd-devel
BuildRequires: apr-devel
BuildRequires: mod_nss
BuildRequires: adminutil-devel
Requires: fedora-ds-base
Requires: mod_nss
# the following are needed for some of our scripts
Requires: perl-Mozilla-LDAP
# for the init script
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
Source0: %{name}-%{version}.tar.bz2
# fedora-ds-cvs.sh should be used to generate the source tarball from CVS
Source1: %{name}-cvs.sh
%description
Fedora Administration Server is an HTTP agent that provides management features
for Fedora Directory Server. It provides some management web apps that can
be used through a web browser. It provides the authentication, access control,
and CGI utilities used by the console.
%prep
%setup -q -n %{name}-%{version}
%build
%configure --disable-rpath
# Generate symbolic info for debuggers
export XCFLAGS=$RPM_OPT_FLAGS
%ifarch x86_64 ppc64 ia64 s390x sparc64
export USE_64=1
%endif
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR="$RPM_BUILD_ROOT" install
# make console jars directory
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/html/java
#remove libtool and static libs
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/*.so
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/modules/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/modules/*.la
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/chkconfig --add %{pkgname}-admin
/sbin/ldconfig
%preun
if [ $1 = 0 ]; then
/sbin/service %{pkgname}-admin stop >/dev/null 2>&1 || :
/sbin/chkconfig --del %{pkgname}-admin
fi
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc LICENSE
%dir %{_sysconfdir}/%{pkgname}/admin-serv
%config(noreplace)%{_sysconfdir}/%{pkgname}/admin-serv/*.conf
%{_datadir}/%{pkgname}
%{_initrddir}/%{pkgname}-admin
%{_sysconfdir}/sysconfig/%{pkgname}-admin
%{_sbindir}/*
%{_libdir}/*.so.*
%{_libdir}/%{pkgname}
%changelog
* Mon Oct 15 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.15
- fix bogus dist macro
- change mozldap6 to mozldap
* Thu Oct 11 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.14
- make admin server work with SELinux enabled
- fix wording errors in setup
* Mon Oct 8 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.13
- added /etc/sysconfig/dirsrv-admin the file that allows you to set
- the environment used to start up the admin server (e.g. keytab, ulimit, etc.)
- the initscript and admin start script use this file now
- This version also has a fix to print the correct error message if the admin
- server cannot be contacted during setup or migration.
* Thu Sep 27 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.12
- fix a couple of migration issues, including the rpath $libdir problem
- allow ds_remove from console to remove instances
* Wed Sep 19 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.11
- one line fix to fix of 295001 - console.conf clobbered
* Tue Sep 18 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.10
- fixed migration issue bugzilla 295001 - console.conf clobbered
* Fri Sep 14 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.9
- fix several more migration problems
* Fri Sep 14 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.8
- fix migration - servers are started as they are migrated now
* Tue Aug 21 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.7
- Fix the with-fhs-opt configure flag
* Fri Aug 17 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.6
- remove curses
- make mod_admserv link against sasl
- add the usual .m4 files to mod_admserv instead of having all of
- the component logic in configure.in
* Thu Aug 16 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.5
- incorporate Noriko's migration fix
* Wed Aug 15 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.4
- address several migration issues
* Mon Aug 13 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.3
- there is no devel package, so remove unused .so files
* Mon Aug 13 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.2
- forgot to tag the modules
* Fri Aug 10 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-1.1
- get rid of cvsdate
- use pkgname of dirsrv for filesystem path naming
- get rid of devel package
- simplify files section
* Fri Aug 10 2007 Noriko Hosoi <nhosoi(a)redhat.com> - 1.1.0-0.3.20070810
- updated to latest sources
- upgraded the mozldap6 version to 6.0.4
* Wed Aug 8 2007 Noriko Hosoi <nhosoi(a)redhat.com> - 1.1.0-0.2.20070808
- updated to latest sources -- bug fixes in the setup scripts
* Mon Aug 6 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-0.1.20070806
- updated to latest sources
* Thu Aug 2 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-0.4.20070802
- There are no files in bindir anymore
* Thu Aug 2 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-0.3.20070802
- forgot to prepend build root to java dir creation
* Thu Aug 2 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-0.2.20070802
- forgot to add mod_admserv and mod_restartd to source
* Thu Aug 2 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-0.1.20070802
- updated to latest sources - fix build breakage
- add console jars dir under html
* Mon Jul 23 2007 Rich Megginson <rmeggins(a)redhat.com> - 1.1.0-0.1.20070725
- Initial version based on fedora-ds-base.spec
16 years, 5 months
[Fedora-directory-commits] ldapserver configure, 1.76, 1.77 configure.ac, 1.43, 1.44 aclocal.m4, 1.59, 1.60 missing, 1.44, 1.45 install-sh, 1.44, 1.45 depcomp, 1.44, 1.45 compile, 1.43, 1.44 config.sub, 1.43, 1.44 config.guess, 1.43, 1.44 Makefile.in, 1.80, 1.81
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23009/ldapserver
Modified Files:
configure configure.ac aclocal.m4 missing install-sh depcomp
compile config.sub config.guess Makefile.in
Log Message:
bump source code version to 1.1.0 beta 2
Index: configure
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- configure 26 Oct 2007 22:04:37 -0000 1.76
+++ configure 7 Nov 2007 15:08:21 -0000 1.77
@@ -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 1.1.0b2.
#
# Report bugs to <http://bugzilla.redhat.com/>.
#
@@ -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='1.1.0b2'
+PACKAGE_STRING='dirsrv 1.1.0b2'
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 1.1.0b1 to adapt to many kinds of systems.
+\`configure' configures dirsrv 1.1.0b2 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 1.1.0b2:";;
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 1.1.0b2
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 1.1.0b2, 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='1.1.0b2'
cat >>confdefs.h <<_ACEOF
@@ -25741,7 +25741,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 1.1.0b2, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -25804,7 +25804,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-dirsrv config.status 1.1.0b1
+dirsrv config.status 1.1.0b2
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Index: configure.ac
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure.ac,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- configure.ac 19 Oct 2007 18:48:27 -0000 1.43
+++ configure.ac 7 Nov 2007 15:08:21 -0000 1.44
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
# This version is the version returned by ns-slapd -v
-AC_INIT([dirsrv], [1.1.0b1], [http://bugzilla.redhat.com/])
+AC_INIT([dirsrv], [1.1.0b2], [http://bugzilla.redhat.com/])
# AC_CONFIG_HEADER must be called right after AC_INIT.
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.9 foreign subdir-objects])
16 years, 5 months
[Fedora-directory-commits] adminserver/admserv/cgi-src40 ds_create.in, 1.5, 1.6
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/adminserver/admserv/cgi-src40
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6264/adminserver/admserv/cgi-src40
Modified Files:
ds_create.in
Log Message:
Resolves: bug 367941
Bug Description: On HPUX, Unable to create a 2nd instance of DS using console
Reviewed by: nhosoi, nkinder (Thanks!)
Fix Description: We weren't looking in the with-fhs-opt location for the start-slapd script. But we shouldn't call this script directly anyway, we should use the DSCreate::startServer method.
Platforms tested: HP-UX
Flag Day: no
Doc impact: no
QA impact: This impacts instance creation with the console on all platforms, so we'll have to test those.
New Tests integrated into TET: none
Index: ds_create.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/ds_create.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ds_create.in 2 Aug 2007 14:44:10 -0000 1.5
+++ ds_create.in 6 Nov 2007 18:16:02 -0000 1.6
@@ -72,24 +72,10 @@
my $servid = $query->param('servid');
if (!defined($start_server) or $start_server) {
- # ok to use here because not only will createDSInstance have validated that
- # servid contains only good characters, but we test for the existence
- # of this file first
- my $prog = "@dslibdir@/slapd-$servid/start-slapd";
- if (-x $prog) {
- $? = 0;
- # run the CGI
- my $output = `$prog 2>&1`;
- my $status = $?;
- if ($status) {
- print "Content-type: text/plain\n\n";
- print "NMC_ErrInfo: Could not start directory server: $output\n";
- print "NMC_Status: $status\n";
- exit $status;
- }
- } else {
+ $inf->{slapd}->{start_server} = 1;
+ if (@errs = DSCreate::startServer($inf)) {
print "Content-type: text/plain\n\n";
- print "NMC_ErrInfo: The program $prog does not exist\n";
+ print "NMC_ErrInfo: ", $res->getText(@errs), "\n";
print "NMC_Status: 1\n";
exit 1;
}
16 years, 5 months
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts template-verify-db.pl.in, 1.8, 1.9
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4861
Modified Files:
template-verify-db.pl.in
Log Message:
Resolves: #367671
Summary: verify-db.pl : can't find dbverify (comment #5)
Fix: added the inst_dir to PATH to tell verify-db.pl where dbverify is located.
Index: template-verify-db.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-verify-db.pl.in,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- template-verify-db.pl.in 7 Sep 2007 19:08:45 -0000 1.8
+++ template-verify-db.pl.in 6 Nov 2007 18:13:57 -0000 1.9
@@ -169,7 +169,7 @@
my $dbdirs = getDbDir($startpoint);
my $prefix = "{{DS-ROOT}}";
-$ENV{'PATH'} = "$prefix@db_bindir@:$prefix/usr/bin:@db_bindir@:/usr/bin";
+$ENV{'PATH'} = "{{SERVER-DIR}}/{{PRODUCT-NAME}}-{{SERV-ID}}:$prefix@db_bindir@:$prefix/usr/bin:@db_bindir@:/usr/bin";
$ENV{'LD_LIBRARY_PATH'} = "@db_libdir@:@libdir@";
$ENV{'SHLIB_PATH'} = "@db_libdir@:@libdir@";
16 years, 5 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd vattr.c, 1.7, 1.8
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9625
Modified Files:
vattr.c
Log Message:
Resolves: #193724
Summary: "nested" filtered roles result in deadlock
Description: Function slapi_vattr_values_get_sp used to use the context
allocated on the stack. Changed it to call vattr_context_new to set the
locally created pblock (local_pb). The pblock is used to pass the context
loop info as the stack gets deeper to prevent the stack overflow. At the
end of this function slapi_vattr_values_get_sp, slapi_pblock_destroy is
called if the context is local (use_local_ctx). The function cleans up
pb_vattr_context internally.
Index: vattr.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/vattr.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- vattr.c 12 Oct 2007 18:03:42 -0000 1.7
+++ vattr.c 1 Nov 2007 20:24:07 -0000 1.8
@@ -630,163 +630,162 @@
*/
SLAPI_DEPRECATED int
slapi_vattr_values_get_sp(vattr_context *c,
- /* Entry we're interested in */ Slapi_Entry *e,
- /* attr type name */ char *type,
- /* pointer to result set */ Slapi_ValueSet** results,
- int *type_name_disposition,
- char** actual_type_name, int flags,
- int *buffer_flags)
-{
-
- PRBool use_local_ctx=PR_FALSE;
- vattr_context ctx;
- int rc = 0;
- int sp_bit = 0; /* Set if an SP supplied an answer */
- vattr_sp_handle_list *list = NULL;
-
- vattr_get_thang my_get = {0};
-
- if (c != NULL) {
- rc = vattr_context_grok(&c);
- if (0 != rc) {
- if(!vattr_context_is_loop_msg_displayed(&c))
- {
- /* Print a handy error log message */
- LDAPDebug(LDAP_DEBUG_ANY,"Detected virtual attribute loop in get on entry %s, attribute %s\n", slapi_entry_get_dn_const(e), type, 0);
- vattr_context_set_loop_msg_displayed(&c);
- }
- return rc;
- }
- } else {
- use_local_ctx=PR_TRUE;
- ctx.vattr_context_loop_count=1;
- ctx.error_displayed = 0;
- }
-
- /* For attributes which are in the entry, we just need to get to the Slapi_Attr structure and yank out the slapi_value_set
- structure. We either return a pointer directly to it, or we copy it, depending upon whether the caller asked us to try to
- avoid copying.
- */
-
- /* First grok the entry, and remember what we saw. This call does no more than walk down the entry attribute list, do some string compares and copy pointers. */
- vattr_helper_get_entry_conts(e,type, &my_get);
- /* Having done that, we now consult the attribute map to find service providers who are interested */
- /* Look for attribute in the map */
- if(!(flags & SLAPI_REALATTRS_ONLY))
- {
- list = vattr_map_sp_getlist(type);
- if (list) {
- vattr_sp_handle *current_handle = NULL;
- void *hint = NULL;
- /* first lets consult the cache to save work */
- int cache_status;
-
- cache_status =
- slapi_entry_vattrcache_find_values_and_type(e, type,
- results,
- actual_type_name);
- switch(cache_status)
- {
- case SLAPI_ENTRY_VATTR_RESOLVED_EXISTS: /* cached vattr */
- {
- sp_bit = 1;
-
- /* Complete analysis of type matching */
- if ( 0 == slapi_attr_type_cmp( type , *actual_type_name, SLAPI_TYPE_CMP_EXACT) )
- {
- *type_name_disposition = SLAPI_VIRTUALATTRS_TYPE_NAME_MATCHED_EXACTLY_OR_ALIAS;
- } else {
- *type_name_disposition = SLAPI_VIRTUALATTRS_TYPE_NAME_MATCHED_SUBTYPE;
- }
-
- break;
- }
-
- case SLAPI_ENTRY_VATTR_RESOLVED_ABSENT: /* does not exist */
- break; /* look in entry */
-
- case SLAPI_ENTRY_VATTR_NOT_RESOLVED: /* not resolved */
- default: /* any other result, resolve */
- {
- for (current_handle = vattr_map_sp_first(list,&hint); current_handle; current_handle = vattr_map_sp_next(current_handle,&hint))
- {
- if (use_local_ctx)
- {
- rc = vattr_call_sp_get_value(current_handle,&ctx,e,&my_get,type,results,type_name_disposition,actual_type_name,flags,buffer_flags, hint);
- }
- else
- {
- /* call this SP */
- rc = vattr_call_sp_get_value(current_handle,c,e,&my_get,type,results,type_name_disposition,actual_type_name,flags,buffer_flags, hint);
- }
-
- if (0 == rc)
- {
- sp_bit = 1;
- break;
- }
- }
-
- if(!sp_bit)
- {
- /* clean up, we have failed and must now examine the
- * entry itself
- * But first lets cache the no result
- * Creates the type (if necessary).
- */
- slapi_entry_vattrcache_merge_sv(e, type, NULL );
-
- }
- else
- {
- /*
- * we need to cache the virtual attribute
- * creates the type (if necessary) and dups
- * results.
- */
- slapi_entry_vattrcache_merge_sv(e, *actual_type_name,
- *results );
- }
-
- break;
- }
- }
- }
- }
- /* If no SP supplied the answer, take it from the entry */
- if (!sp_bit && !(flags & SLAPI_VIRTUALATTRS_ONLY))
- {
- rc = 0; /* reset return code (cause an sp must have failed) */
- *type_name_disposition = my_get.get_name_disposition;
-
- if (my_get.get_present) {
- if (flags & SLAPI_VIRTUALATTRS_REQUEST_POINTERS) {
- *results = my_get.get_present_values;
- *actual_type_name = my_get.get_type_name;
- } else {
- *results = valueset_dup(my_get.get_present_values);
- if (NULL == *results) {
- rc = ENOMEM;
- } else {
- *actual_type_name = slapi_ch_strdup(my_get.get_type_name);
- if (NULL == *actual_type_name) {
- rc = ENOMEM;
- }
- }
- }
- if (flags & SLAPI_VIRTUALATTRS_REQUEST_POINTERS) {
- *buffer_flags = SLAPI_VIRTUALATTRS_RETURNED_POINTERS;
- } else {
- *buffer_flags = SLAPI_VIRTUALATTRS_RETURNED_COPIES;
- }
- } else {
- rc = SLAPI_VIRTUALATTRS_NOT_FOUND;
- }
- }
- if (!use_local_ctx) {
- vattr_context_ungrok(&c);
- }
- return rc;
+ /* Entry we're interested in */ Slapi_Entry *e,
+ /* attr type name */ char *type,
+ /* pointer to result set */ Slapi_ValueSet** results,
+ int *type_name_disposition,
+ char** actual_type_name, int flags,
+ int *buffer_flags)
+{
+ PRBool use_local_ctx = PR_FALSE;
+ Slapi_PBlock *local_pb = NULL;
+ vattr_context *ctx = NULL;
+ int rc = 0;
+ int sp_bit = 0; /* Set if an SP supplied an answer */
+ vattr_sp_handle_list *list = NULL;
+
+ vattr_get_thang my_get = {0};
+
+ if (c != NULL) {
+ rc = vattr_context_grok(&c);
+ if (0 != rc) {
+ if(!vattr_context_is_loop_msg_displayed(&c))
+ {
+ /* Print a handy error log message */
+ LDAPDebug(LDAP_DEBUG_ANY,
+ "Detected virtual attribute loop in get on entry %s, attribute %s\n",
+ slapi_entry_get_dn_const(e), type, 0);
+ vattr_context_set_loop_msg_displayed(&c);
+ }
+ return rc;
+ }
+ ctx = c;
+ } else {
+ use_local_ctx = PR_TRUE;
+ local_pb = slapi_pblock_new();
+ ctx = vattr_context_new( local_pb );
+ ctx->vattr_context_loop_count = 1;
+ ctx->error_displayed = 0;
+ }
+
+ /* For attributes which are in the entry, we just need to get to the Slapi_Attr structure and yank out the slapi_value_set
+ structure. We either return a pointer directly to it, or we copy it, depending upon whether the caller asked us to try to
+ avoid copying.
+ */
+
+ /* First grok the entry, and remember what we saw. This call does no more than walk down the entry attribute list, do some string compares and copy pointers. */
+ vattr_helper_get_entry_conts(e,type, &my_get);
+ /* Having done that, we now consult the attribute map to find service providers who are interested */
+ /* Look for attribute in the map */
+ if(!(flags & SLAPI_REALATTRS_ONLY))
+ {
+ list = vattr_map_sp_getlist(type);
+ if (list) {
+ vattr_sp_handle *current_handle = NULL;
+ void *hint = NULL;
+ /* first lets consult the cache to save work */
+ int cache_status;
+
+ cache_status =
+ slapi_entry_vattrcache_find_values_and_type(e, type,
+ results,
+ actual_type_name);
+ switch(cache_status)
+ {
+ case SLAPI_ENTRY_VATTR_RESOLVED_EXISTS: /* cached vattr */
+ {
+ sp_bit = 1;
+
+ /* Complete analysis of type matching */
+ if ( 0 == slapi_attr_type_cmp( type , *actual_type_name, SLAPI_TYPE_CMP_EXACT) )
+ {
+ *type_name_disposition = SLAPI_VIRTUALATTRS_TYPE_NAME_MATCHED_EXACTLY_OR_ALIAS;
+ } else {
+ *type_name_disposition = SLAPI_VIRTUALATTRS_TYPE_NAME_MATCHED_SUBTYPE;
+ }
+
+ break;
+ }
+
+ case SLAPI_ENTRY_VATTR_RESOLVED_ABSENT: /* does not exist */
+ break; /* look in entry */
+
+ case SLAPI_ENTRY_VATTR_NOT_RESOLVED: /* not resolved */
+ default: /* any other result, resolve */
+ {
+ for (current_handle = vattr_map_sp_first(list,&hint); current_handle; current_handle = vattr_map_sp_next(current_handle,&hint))
+ {
+ rc = vattr_call_sp_get_value(current_handle,ctx,e,&my_get,type,results,type_name_disposition,actual_type_name,flags,buffer_flags, hint);
+ if (0 == rc)
+ {
+ sp_bit = 1;
+ break;
+ }
+ }
+
+ if(!sp_bit)
+ {
+ /* clean up, we have failed and must now examine the
+ * entry itself
+ * But first lets cache the no result
+ * Creates the type (if necessary).
+ */
+ slapi_entry_vattrcache_merge_sv(e, type, NULL );
+
+ }
+ else
+ {
+ /*
+ * we need to cache the virtual attribute
+ * creates the type (if necessary) and dups
+ * results.
+ */
+ slapi_entry_vattrcache_merge_sv(e, *actual_type_name,
+ *results );
+ }
+
+ break;
+ }
+ }
+ }
+ }
+ /* If no SP supplied the answer, take it from the entry */
+ if (!sp_bit && !(flags & SLAPI_VIRTUALATTRS_ONLY))
+ {
+ rc = 0; /* reset return code (cause an sp must have failed) */
+ *type_name_disposition = my_get.get_name_disposition;
+
+ if (my_get.get_present) {
+ if (flags & SLAPI_VIRTUALATTRS_REQUEST_POINTERS) {
+ *results = my_get.get_present_values;
+ *actual_type_name = my_get.get_type_name;
+ } else {
+ *results = valueset_dup(my_get.get_present_values);
+ if (NULL == *results) {
+ rc = ENOMEM;
+ } else {
+ *actual_type_name = slapi_ch_strdup(my_get.get_type_name);
+ if (NULL == *actual_type_name) {
+ rc = ENOMEM;
+ }
+ }
+ }
+ if (flags & SLAPI_VIRTUALATTRS_REQUEST_POINTERS) {
+ *buffer_flags = SLAPI_VIRTUALATTRS_RETURNED_POINTERS;
+ } else {
+ *buffer_flags = SLAPI_VIRTUALATTRS_RETURNED_COPIES;
+ }
+ } else {
+ rc = SLAPI_VIRTUALATTRS_NOT_FOUND;
+ }
+ }
+ if (use_local_ctx) {
+ /* slapi_pblock_destroy cleans up pb_vattr_context, as well */
+ slapi_pblock_destroy(local_pb);
+ } else {
+ vattr_context_ungrok(&c);
+ }
+ return rc;
}
/*
16 years, 5 months