[Fedora-directory-commits] mod_admserv mod_admserv.c,1.29,1.30
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/mod_admserv
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23269
Modified Files:
mod_admserv.c
Log Message:
Resolves: bug 244937
Description: mod_admserv: Should do client TLS/SSL init even if mod_nss not used
Fix Description: The way the code currently works is that mod_admserv let's mod_nss do all of the NSS initialization. But mod_nss is only used when the admin server is also a TLS/SSL server. mod_admserv still needs to do NSS initialization when it is a TLS/SSL client (e.g. of the config DS using LDAPS). This fix allows mod_admserv to do the client side TLS/SSL init.
Platforms tested: RHEL4
Flag Day: no
Doc impact: no
Index: mod_admserv.c
===================================================================
RCS file: /cvs/dirsec/mod_admserv/mod_admserv.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- mod_admserv.c 11 May 2007 19:46:36 -0000 1.29
+++ mod_admserv.c 19 Jun 2007 23:31:12 -0000 1.30
@@ -751,12 +751,18 @@
}
static int
-sslinit()
+sslinit(AdmldapInfo info, const char *configdir)
{
if (!NSS_IsInitialized()) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, 0 /* status */, NULL,
- "sslinit: mod_nss has not been started and initialized: cannot start server");
- exit(1);
+ /* mod_nss is used when we are a TLS/SSL server - mod_nss starts up before we do
+ and will set up all of the TLS/SSL stuff */
+ /* if we are acting as simply a TLS/SSL client to the directory server,
+ we still have to perform our own TLS/SSL client init */
+ if (ADMSSL_Init(info, configdir, 0)) {
+ ap_log_error(APLOG_MARK, APLOG_CRIT, 0 /* status */, NULL,
+ "sslinit: NSS is required to use LDAPS, but security initialization failed. Cannot start server");
+ exit(1);
+ }
} else {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0 /* status */, NULL,
"sslinit: mod_nss has been started and initialized");
@@ -794,7 +800,7 @@
}
if (admldapGetSecurity(info)) {
- sslinit();
+ sslinit(info, configdir);
if (admldapBuildInfoSSL(info, &error)) {
} else {
char *host = admldapGetHost(info);
@@ -1371,7 +1377,7 @@
}
if (admldapGetSecurity(ldapInfo)) {
- sslinit();
+ sslinit(ldapInfo, admroot);
}
destroyAdmldap(ldapInfo);
@@ -2035,7 +2041,7 @@
}
if (admldapGetSecurity(info)) {
- sslinit();
+ sslinit(info, configdir);
if (admldapBuildInfoSSL(info, &error)) {
} else {
ap_log_error(APLOG_MARK, APLOG_CRIT, 0, base_server,
16 years, 10 months
[Fedora-directory-commits] ldapserver/ldap/admin/src ds_newinst.pl.in, 1.8, 1.9
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22769
Modified Files:
ds_newinst.pl.in
Log Message:
Resolves: bug 237356
Bug Description: Move DS Admin Code into Admin Server - admin server setup
Fix Description: Allow the use of '-' and '_' in section and parameter names when passing in inf parameters via the command line.
Platforms tested: RHEL4
Flag Day: no
Doc impact: no
Index: ds_newinst.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/ds_newinst.pl.in,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ds_newinst.pl.in 15 Jun 2007 22:11:15 -0000 1.8
+++ ds_newinst.pl.in 19 Jun 2007 23:24:58 -0000 1.9
@@ -189,7 +189,7 @@
# process command line arguments
for (@ARGV) {
- if (/^(\w+)\.(\w+)=(.*)$/) { # e.g. section.param=value
+ if (/^([\w_-]+)\.([\w_-]+)=(.*)$/) { # e.g. section.param=value
$table{$1}->{$2} = $3;
} else { # file?
readInfFile($_);
16 years, 10 months
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts Setup.pm.in, 1.4, 1.5
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22769/scripts
Modified Files:
Setup.pm.in
Log Message:
Resolves: bug 237356
Bug Description: Move DS Admin Code into Admin Server - admin server setup
Fix Description: Allow the use of '-' and '_' in section and parameter names when passing in inf parameters via the command line.
Platforms tested: RHEL4
Flag Day: no
Doc impact: no
Index: Setup.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Setup.pm.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Setup.pm.in 19 Jun 2007 18:24:57 -0000 1.4
+++ Setup.pm.in 19 Jun 2007 23:24:58 -0000 1.5
@@ -148,7 +148,7 @@
# arguments override those passed in via an inf file - this
# allows the reuse of .inf files with some parameters overridden
for (@ARGV) {
- if (/^(\w_-+)\.(\w_-+)=(.*)$/) { # e.g. section.param=value
+ if (/^([\w_-]+)\.([\w_-]+)=(.*)$/) { # e.g. section.param=value
$self->{inf}->{$1}->{$2} = $3;
} else { # error
print STDERR "Error: unknown command line option $_\n";
16 years, 10 months
[Fedora-directory-commits] adminserver/admserv/newinst/src ConfigDSDialogs.pm, 1.2, 1.3
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/adminserver/admserv/newinst/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21115
Modified Files:
ConfigDSDialogs.pm
Log Message:
Resolves: #237356
Summary: Move DS Admin Code into Admin Server
Description: fixing Administration Domain [com] ===> Administration Domain [<domainname>]
Index: ConfigDSDialogs.pm
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/ConfigDSDialogs.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ConfigDSDialogs.pm 19 Jun 2007 18:32:28 -0000 1.2
+++ ConfigDSDialogs.pm 19 Jun 2007 23:06:43 -0000 1.3
@@ -111,7 +111,7 @@
if (!defined($admindomain)) {
$admindomain = $self->{manager}->{inf}->{General}->{FullMachineName} ||
hostfqdn;
- $admindomain =~ s/^.*\.//; # just the domain part
+ $admindomain =~ s/^[^\.]*\.//; # just the domain part
}
return $admindomain;
} else { # the CA cert
@@ -242,7 +242,7 @@
if (!defined($admindomain)) {
$admindomain = $self->{manager}->{inf}->{General}->{FullMachineName} ||
hostfqdn;
- $admindomain =~ s/^.*\.//; # just the domain part
+ $admindomain =~ s/^[^\.]*\.//; # just the domain part
}
return $admindomain;
},
16 years, 10 months
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSDialogs.pm, 1.1, 1.2
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20883
Modified Files:
DSDialogs.pm
Log Message:
Resolves: #237356
Summary: Move DS Admin Code into Admin Server
Description: fixing the default suffix: dc=<host>, dc=<dc1>, dc=<dc2>, dc=<dc3> ===> dc=<dc1>, dc=<dc2>, dc=<dc3>
Index: DSDialogs.pm
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSDialogs.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DSDialogs.pm 8 Jun 2007 01:09:16 -0000 1.1
+++ DSDialogs.pm 19 Jun 2007 23:05:08 -0000 1.2
@@ -122,6 +122,7 @@
if (!defined($suffix)) {
$suffix = hostfqdn;
}
+ $suffix =~ s/^[^\.]*\.//; # just the domain part
# convert fqdn to dc= domain components
$suffix = "dc=$suffix";
$suffix =~ s/\./, dc=/g;
16 years, 10 months
[Fedora-directory-commits] adminserver/m4 fhs.m4,1.1,1.2
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/adminserver/m4
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11758/m4
Modified Files:
fhs.m4
Log Message:
Resolves #244715
Summary: Admin Server support --with-fhs-opt
Description:
1. Adjust the Admin Server's prefix to the Directory Server's including the support for "--with-fhs-opt"
2. Fixed a bug: Default prefix (AX_PREFIX_DEFAULT) does not get PACKAGE_BASE_NAME value.
Index: fhs.m4
===================================================================
RCS file: /cvs/dirsec/adminserver/m4/fhs.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- fhs.m4 9 May 2007 00:26:38 -0000 1.1
+++ fhs.m4 19 Jun 2007 20:49:55 -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))
@@ -32,3 +33,19 @@
AC_DEFINE([IS_FHS], [1], [Use FHS layout])
fi
+# check for --with-fhs-opt
+AC_MSG_CHECKING(for --with-fhs-opt)
+AC_ARG_WITH(fhs-opt, [ --with-fhs-opt Use FHS optional layout],
+[
+ with_fhs_opt=yes
+ AC_MSG_RESULT(yes)
+],
+AC_MSG_RESULT(no))
+
+if test "$with_fhs_opt" = "yes"; then
+ AC_DEFINE([IS_FHS_OPT], [1], [Use FHS optional layout])
+fi
+
+if test "$with_fhs" = "yes" -a "$with_fhs_opt" = "yes"; then
+ AC_MSG_ERROR([Can't set both --with-fhs and --with-fhs-opt. Please only use one of these options.])
+fi
16 years, 11 months
[Fedora-directory-commits] adminserver Makefile.am, 1.11, 1.12 configure.ac, 1.7, 1.8 Makefile.in, 1.11, 1.12 aclocal.m4, 1.8, 1.9 config.h.in, 1.1, 1.2 configure, 1.10, 1.11
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/adminserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11758
Modified Files:
Makefile.am configure.ac Makefile.in aclocal.m4 config.h.in
configure
Log Message:
Resolves #244715
Summary: Admin Server support --with-fhs-opt
Description:
1. Adjust the Admin Server's prefix to the Directory Server's including the support for "--with-fhs-opt"
2. Fixed a bug: Default prefix (AX_PREFIX_DEFAULT) does not get PACKAGE_BASE_NAME value.
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/adminserver/Makefile.am,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Makefile.am 19 Jun 2007 18:32:27 -0000 1.11
+++ Makefile.am 19 Jun 2007 20:49:55 -0000 1.12
@@ -411,7 +411,6 @@
-e 's,@helpdir\@,$(helpdir),g' \
-e 's,@mimemagic\@,$(mimemagic),g' \
-e 's,@initdir\@,$(initdir),g' \
- -e 's,@shared_lib_suffix\@,$(shared_lib_suffix),g' \
-e 's,@perldir\@,$(perldir),g' \
-e 's,@infdir\@,$(infdir),g' \
-e 's,@ldifdir\@,$(ldifdir),g'
Index: configure.ac
===================================================================
RCS file: /cvs/dirsec/adminserver/configure.ac,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- configure.ac 15 Jun 2007 22:16:28 -0000 1.7
+++ configure.ac 19 Jun 2007 20:49:55 -0000 1.8
@@ -58,8 +58,9 @@
AC_CHECK_LIB([curses], [printw], [curses_lib=-lcurses]))
PACKAGE_BASE_NAME=`echo $PACKAGE_NAME | sed -e s/-admin//`
-# the default prefix - override with --prefix or --with-fhs
-AC_PREFIX_DEFAULT([/opt/$PACKAGE_BASE_NAME])
+AC_SUBST(PACKAGE_BASE_NAME)
+# the default prefix - override with --prefix or --with-fhs or --with-fhs-opt
+AC_PREFIX_DEFAULT([/opt/@PACKAGE_BASE_NAME@])
brand=fedora
capbrand=Fedora
@@ -70,17 +71,38 @@
# installation paths - by default, configure will just
# use /usr as the prefix for everything, which means
# /usr/etc and /usr/var. FHS sez to use /etc and /var.
-if test "$with_fhs" = "yes"; then
- ac_default_prefix=/usr
- prefix=$ac_default_prefix
- exec_prefix=$prefix
-dnl as opposed to the default /usr/etc
- sysconfdir='/etc'
-dnl as opposed to the default /usr/var
- localstatedir='/var'
+# The with-fhs-opt option will use the
+# prefix, but it's sysconfdir and localstatedir will be
+# /etc/opt, and /var/opt.
+if test "$with_fhs_opt" = "yes"; then
+ # Override sysconfdir and localstatedir if FHS optional
+ # package was requested.
+ sysconfdir='/etc/opt'
+ localstatedir='/var/opt'
+ # relative to datadir
+ infdir=/inf
+ htmldir=/html
+ icondir=/icons
+ manualdir=/manual
+ ldifdir=/data
+else
+ if test "$with_fhs" = "yes"; then
+ ac_default_prefix=/usr
+ prefix=$ac_default_prefix
+ exec_prefix=$prefix
+ dnl as opposed to the default /usr/etc
+ sysconfdir='/etc'
+ dnl as opposed to the default /usr/var
+ localstatedir='/var'
+ fi
+# relative to datadir
+ infdir=/$PACKAGE_BASE_NAME/inf
+ htmldir=/$PACKAGE_BASE_NAME/html
+ icondir=/$PACKAGE_BASE_NAME/icons
+ manualdir=/$PACKAGE_BASE_NAME/manual
+ ldifdir=/$PACKAGE_BASE_NAME/data
fi
-shared_lib_suffix=.so
initdir=/rc.d
case $host in
*-*-linux*)
@@ -89,7 +111,6 @@
ia64-hp-hpux*)
;;
hppa*-hp-hpux*)
- shared_lib_suffix=.sl
;;
sparc-sun-solaris*)
initdir=/init.d
@@ -97,7 +118,6 @@
*)
esac
AC_SUBST(initdir)
-AC_SUBST(shared_lib_suffix)
# Check for web server
m4_include(m4/httpd.m4)
@@ -136,13 +156,6 @@
])
AC_SUBST(instconfigdir)
-# relative to datadir
-htmldir=/$PACKAGE_BASE_NAME/html
-icondir=/$PACKAGE_BASE_NAME/icons
-manualdir=/$PACKAGE_BASE_NAME/manual
-ldifdir=/$PACKAGE_BASE_NAME/data
-infdir=/$PACKAGE_BASE_NAME/inf
-
# CGI program directory, relative to libdir
cgibindir=/$PACKAGE_BASE_NAME/cgi-bin
@@ -166,7 +179,6 @@
# write out paths for binary components
AC_SUBST(PACKAGE_NAME)
-AC_SUBST(PACKAGE_BASE_NAME)
AC_SUBST(nspr_inc)
AC_SUBST(nspr_lib)
AC_SUBST(nspr_libdir)
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/adminserver/Makefile.in,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Makefile.in 19 Jun 2007 18:32:27 -0000 1.11
+++ Makefile.in 19 Jun 2007 20:49:55 -0000 1.12
@@ -417,7 +417,6 @@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
-SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -513,7 +512,6 @@
setuputil_inc = @setuputil_inc@
setuputil_lib = @setuputil_lib@
setuputil_libdir = @setuputil_libdir@
-shared_lib_suffix = @shared_lib_suffix@
sharedstatedir = @sharedstatedir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
@@ -832,7 +830,6 @@
-e 's,@helpdir\@,$(helpdir),g' \
-e 's,@mimemagic\@,$(mimemagic),g' \
-e 's,@initdir\@,$(initdir),g' \
- -e 's,@shared_lib_suffix\@,$(shared_lib_suffix),g' \
-e 's,@perldir\@,$(perldir),g' \
-e 's,@infdir\@,$(infdir),g' \
-e 's,@ldifdir\@,$(ldifdir),g'
Index: aclocal.m4
===================================================================
RCS file: /cvs/dirsec/adminserver/aclocal.m4,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- aclocal.m4 19 Jun 2007 18:32:27 -0000 1.8
+++ aclocal.m4 19 Jun 2007 20:49:55 -0000 1.9
@@ -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/adminserver/config.h.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- config.h.in 9 May 2007 00:26:29 -0000 1.1
+++ config.h.in 19 Jun 2007 20:49:55 -0000 1.2
@@ -215,6 +215,9 @@
/* Use FHS layout */
#undef IS_FHS
+/* Use FHS optional layout */
+#undef IS_FHS_OPT
+
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
slash. */
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
Index: configure
===================================================================
RCS file: /cvs/dirsec/adminserver/configure,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- configure 19 Jun 2007 18:32:27 -0000 1.10
+++ configure 19 Jun 2007 20:49:55 -0000 1.11
@@ -465,10 +465,10 @@
# include <unistd.h>
#endif"
-ac_default_prefix=/opt/$PACKAGE_BASE_NAME
+ac_default_prefix=/opt/@PACKAGE_BASE_NAME@
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 initdir shared_lib_suffix HTTPD APXS PKG_CONFIG ICU_CONFIG nsspcache instconfigdir PACKAGE_BASE_NAME nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir adminutil_inc adminutil_lib adminutil_libdir adminutil_ver setuputil_lib setuputil_libdir setuputil_inc setuputil_bin icu_lib icu_libdir icu_inc icu_bin curses_lib instancename cgibindir cmdbindir moddir modnssbindir propertydir htmldir icondir manualdir httpdconf mimemagic httpduser httpdgroup logdir 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 EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CX!
XCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS PACKAGE_BASE_NAME initdir HTTPD APXS PKG_CONFIG ICU_CONFIG nsspcache instconfigdir nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir adminutil_inc adminutil_lib adminutil_libdir adminutil_ver setuputil_lib setuputil_libdir setuputil_inc setuputil_bin icu_lib icu_libdir icu_inc icu_bin curses_lib instancename cgibindir cmdbindir moddir modnssbindir propertydir htmldir icondir manualdir httpdconf mimemagic httpduser httpdgroup logdir 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.
@@ -1051,6 +1051,7 @@
--with-tags[=TAGS]
include additional configurations [automatic]
--with-fhs Use FHS layout
+ --with-fhs-opt Use FHS optional layout
--with-nspr=PATH Netscape Portable Runtime (NSPR) directory
--with-nspr-inc=PATH Netscape Portable Runtime (NSPR) include file directory
--with-nspr-lib=PATH Netscape Portable Runtime (NSPR) library directory
@@ -3824,7 +3825,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
@@ -3859,7 +3859,6 @@
fi
SED=$lt_cv_path_SED
-
echo "$as_me:$LINENO: result: $SED" >&5
echo "${ECHO_T}$SED" >&6
@@ -4300,7 +4299,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4303 "configure"' > conftest.$ac_ext
+ echo '#line 4302 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5435,7 +5434,7 @@
# Provide some information about the compiler.
-echo "$as_me:5438:" \
+echo "$as_me:5437:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -6498,11 +6497,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:6501: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6500: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6505: \$? = $ac_status" >&5
+ echo "$as_me:6504: \$? = $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.
@@ -6766,11 +6765,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:6769: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6768: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6773: \$? = $ac_status" >&5
+ echo "$as_me:6772: \$? = $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.
@@ -6870,11 +6869,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:6873: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6872: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6877: \$? = $ac_status" >&5
+ echo "$as_me:6876: \$? = $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
@@ -8335,31 +8334,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 8342 "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
@@ -9236,7 +9214,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9239 "configure"
+#line 9217 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9336,7 +9314,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9339 "configure"
+#line 9317 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9667,9 +9645,6 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
# An ERE matcher.
EGREP=$lt_EGREP
@@ -9803,11 +9778,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=\`echo $lt_predep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_predep_objects
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=\`echo $lt_postdep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_postdep_objects
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -9819,7 +9794,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 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_compiler_lib_search_path
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -9899,7 +9874,7 @@
link_all_deplibs=$link_all_deplibs
# 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
@@ -11679,11 +11654,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:11682: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11657: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11686: \$? = $ac_status" >&5
+ echo "$as_me:11661: \$? = $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.
@@ -11783,11 +11758,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:11786: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11761: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11790: \$? = $ac_status" >&5
+ echo "$as_me:11765: \$? = $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
@@ -12315,31 +12290,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 12322 "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
@@ -12723,9 +12677,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
@@ -12859,11 +12810,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.
@@ -12875,7 +12826,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
@@ -12955,7 +12906,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
@@ -13377,11 +13328,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:13380: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13331: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13384: \$? = $ac_status" >&5
+ echo "$as_me:13335: \$? = $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.
@@ -13481,11 +13432,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:13484: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13435: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13488: \$? = $ac_status" >&5
+ echo "$as_me:13439: \$? = $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
@@ -14926,31 +14877,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 14933 "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
@@ -15334,9 +15264,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
@@ -15470,11 +15397,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.
@@ -15486,7 +15413,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
@@ -15566,7 +15493,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
@@ -15708,11 +15635,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:15711: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15638: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15715: \$? = $ac_status" >&5
+ echo "$as_me:15642: \$? = $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.
@@ -15976,11 +15903,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:15979: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15906: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15983: \$? = $ac_status" >&5
+ echo "$as_me:15910: \$? = $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.
@@ -16080,11 +16007,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:16083: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16010: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16087: \$? = $ac_status" >&5
+ echo "$as_me:16014: \$? = $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
@@ -17545,31 +17472,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 17552 "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
@@ -17953,9 +17859,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
@@ -18089,11 +17992,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.
@@ -18105,7 +18008,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
@@ -18185,7 +18088,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
@@ -18437,9 +18340,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
@@ -18573,11 +18473,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.
@@ -18589,7 +18489,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
@@ -18669,7 +18569,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
@@ -23230,7 +23130,8 @@
PACKAGE_BASE_NAME=`echo $PACKAGE_NAME | sed -e s/-admin//`
-# the default prefix - override with --prefix or --with-fhs
+
+# the default prefix - override with --prefix or --with-fhs or --with-fhs-opt
brand=fedora
@@ -23269,6 +23170,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
@@ -23283,20 +23186,71 @@
fi
+# check for --with-fhs-opt
+echo "$as_me:$LINENO: checking for --with-fhs-opt" >&5
+echo $ECHO_N "checking for --with-fhs-opt... $ECHO_C" >&6
+
+# Check whether --with-fhs-opt or --without-fhs-opt was given.
+if test "${with_fhs_opt+set}" = set; then
+ withval="$with_fhs_opt"
+
+ with_fhs_opt=yes
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
+
+if test "$with_fhs_opt" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define IS_FHS_OPT 1
+_ACEOF
+
+fi
+
+if test "$with_fhs" = "yes" -a "$with_fhs_opt" = "yes"; then
+ { { echo "$as_me:$LINENO: error: Can't set both --with-fhs and --with-fhs-opt. Please only use one of these options." >&5
+echo "$as_me: error: Can't set both --with-fhs and --with-fhs-opt. Please only use one of these options." >&2;}
+ { (exit 1); exit 1; }; }
+fi
# installation paths - by default, configure will just
# use /usr as the prefix for everything, which means
# /usr/etc and /usr/var. FHS sez to use /etc and /var.
-if test "$with_fhs" = "yes"; then
- ac_default_prefix=/usr
- prefix=$ac_default_prefix
- exec_prefix=$prefix
- sysconfdir='/etc'
- localstatedir='/var'
+# The with-fhs-opt option will use the
+# prefix, but it's sysconfdir and localstatedir will be
+# /etc/opt, and /var/opt.
+if test "$with_fhs_opt" = "yes"; then
+ # Override sysconfdir and localstatedir if FHS optional
+ # package was requested.
+ sysconfdir='/etc/opt'
+ localstatedir='/var/opt'
+ # relative to datadir
+ infdir=/inf
+ htmldir=/html
+ icondir=/icons
+ manualdir=/manual
+ ldifdir=/data
+else
+ if test "$with_fhs" = "yes"; then
+ ac_default_prefix=/usr
+ prefix=$ac_default_prefix
+ exec_prefix=$prefix
+ sysconfdir='/etc'
+ localstatedir='/var'
+ fi
+# relative to datadir
+ infdir=/$PACKAGE_BASE_NAME/inf
+ htmldir=/$PACKAGE_BASE_NAME/html
+ icondir=/$PACKAGE_BASE_NAME/icons
+ manualdir=/$PACKAGE_BASE_NAME/manual
+ ldifdir=/$PACKAGE_BASE_NAME/data
fi
-shared_lib_suffix=.so
initdir=/rc.d
case $host in
*-*-linux*)
@@ -23305,7 +23259,6 @@
ia64-hp-hpux*)
;;
hppa*-hp-hpux*)
- shared_lib_suffix=.sl
;;
sparc-sun-solaris*)
initdir=/init.d
@@ -23314,7 +23267,6 @@
esac
-
# Check for web server
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2006 Red Hat, Inc.
@@ -24730,13 +24682,6 @@
fi;
-# relative to datadir
-htmldir=/$PACKAGE_BASE_NAME/html
-icondir=/$PACKAGE_BASE_NAME/icons
-manualdir=/$PACKAGE_BASE_NAME/manual
-ldifdir=/$PACKAGE_BASE_NAME/data
-infdir=/$PACKAGE_BASE_NAME/inf
-
# CGI program directory, relative to libdir
cgibindir=/$PACKAGE_BASE_NAME/cgi-bin
@@ -24783,7 +24728,6 @@
-
# write out paths for data/config files
@@ -25614,7 +25558,6 @@
s,@CCDEPMODE@,$CCDEPMODE,;t t
s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
-s,@SED@,$SED,;t t
s,@EGREP@,$EGREP,;t t
s,@LN_S@,$LN_S,;t t
s,@ECHO@,$ECHO,;t t
@@ -25629,15 +25572,14 @@
s,@ac_ct_F77@,$ac_ct_F77,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
+s,@PACKAGE_BASE_NAME@,$PACKAGE_BASE_NAME,;t t
s,@initdir@,$initdir,;t t
-s,@shared_lib_suffix@,$shared_lib_suffix,;t t
s,@HTTPD@,$HTTPD,;t t
s,@APXS@,$APXS,;t t
s,@PKG_CONFIG@,$PKG_CONFIG,;t t
s,@ICU_CONFIG@,$ICU_CONFIG,;t t
s,@nsspcache@,$nsspcache,;t t
s,@instconfigdir@,$instconfigdir,;t t
-s,@PACKAGE_BASE_NAME@,$PACKAGE_BASE_NAME,;t t
s,@nspr_inc@,$nspr_inc,;t t
s,@nspr_lib@,$nspr_lib,;t t
s,@nspr_libdir@,$nspr_libdir,;t t
16 years, 11 months
[Fedora-directory-commits] adminserver Makefile.am, 1.10, 1.11 aclocal.m4, 1.7, 1.8 configure, 1.9, 1.10 missing, 1.5, 1.6 install-sh, 1.5, 1.6 depcomp, 1.5, 1.6 config.sub, 1.5, 1.6 config.guess, 1.5, 1.6 compile, 1.5, 1.6 Makefile.in, 1.10, 1.11
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/adminserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16478/adminserver
Modified Files:
Makefile.am aclocal.m4 configure missing install-sh depcomp
config.sub config.guess compile Makefile.in
Log Message:
Resolves: bug 237356
Bug Description: Move DS Admin Code into Admin Server - admin server setup
Reviewed by: nhosoi (Thanks!)
Fix Description: This implements support for admin server configuration and reconfiguration, so that we can remove setuputil related code from admserv/newinst/src. The basic flow is this:
Ask user basic information.
Ask user if they want to either use an existing config ds or setup a new one. If the user selects No, the code will gather information, create the directory server, and set it up to be the configuration DS. Otherwise, it will just create the directory server and register it with the existing config DS. The code will also create and setup and start the admin server, or reconfigure it and restart it as needed. Note that setup-ds-admin.pl assumes that a config DS is to be used. If you want to setup a directory server instance without using a config ds, use setup-ds.pl instead.
Platforms tested: RHEL4
Flag Day: Yes - autotool changes
Doc impact: Yes.
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/adminserver/Makefile.am,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Makefile.am 15 Jun 2007 22:16:28 -0000 1.10
+++ Makefile.am 19 Jun 2007 18:32:27 -0000 1.11
@@ -133,7 +133,9 @@
inf_DATA = admserv/newinst/src/admin.inf \
admserv/newinst/common/setup.inf \
admserv/newinst/src/register_param.map \
- admserv/newinst/src/configdsroot.map
+ admserv/newinst/src/configdsroot.map \
+ admserv/newinst/src/adminserver.map \
+ admserv/newinst/src/dirserver.map
cgibin_PROGRAMS = mergeConfig admpw security ugdsconfig ReadLog start_config_ds \
config statpingserv viewdata dsconfig monreplication restartsrv \
@@ -151,6 +153,7 @@
perl_SCRIPTS = admserv/newinst/src/ASDialogs.pm \
admserv/newinst/src/AdminUtil.pm \
+ admserv/newinst/src/AdminServer.pm \
admserv/newinst/src/ConfigDSDialogs.pm
libds_admin_serv_la_SOURCES = $(libbase_a_SOURCES) $(libsi18n_a_SOURCES) $(libadmin_a_SOURCES)
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/adminserver/Makefile.in,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Makefile.in 15 Jun 2007 22:16:28 -0000 1.10
+++ Makefile.in 19 Jun 2007 18:32:27 -0000 1.11
@@ -601,7 +601,9 @@
inf_DATA = admserv/newinst/src/admin.inf \
admserv/newinst/common/setup.inf \
admserv/newinst/src/register_param.map \
- admserv/newinst/src/configdsroot.map
+ admserv/newinst/src/configdsroot.map \
+ admserv/newinst/src/adminserver.map \
+ admserv/newinst/src/dirserver.map
bin_SCRIPTS = admserv/newinst/src/register_server.pl
cgibin_SCRIPTS = admserv/cgi-src40/Cgi.pm
@@ -609,6 +611,7 @@
cmdbin_SCRIPTS = admserv/newinst/src/setup-ds-admin.pl
perl_SCRIPTS = admserv/newinst/src/ASDialogs.pm \
admserv/newinst/src/AdminUtil.pm \
+ admserv/newinst/src/AdminServer.pm \
admserv/newinst/src/ConfigDSDialogs.pm
libds_admin_serv_la_SOURCES = $(libbase_a_SOURCES) $(libsi18n_a_SOURCES) $(libadmin_a_SOURCES)
16 years, 11 months
[Fedora-directory-commits] adminserver/admserv/newinst/src AdminServer.pm.in, NONE, 1.1 adminserver.map.in, NONE, 1.1 dirserver.map.in, NONE, 1.1 ASDialogs.pm.in, 1.2, 1.3 AdminUtil.pm.in, 1.1, 1.2 ConfigDSDialogs.pm, 1.1, 1.2 setup-ds-admin.pl.in, 1.2, 1.3 setup-ds-admin.res.in, 1.2, 1.3
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/adminserver/admserv/newinst/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16478/adminserver/admserv/newinst/src
Modified Files:
ASDialogs.pm.in AdminUtil.pm.in ConfigDSDialogs.pm
setup-ds-admin.pl.in setup-ds-admin.res.in
Added Files:
AdminServer.pm.in adminserver.map.in dirserver.map.in
Log Message:
Resolves: bug 237356
Bug Description: Move DS Admin Code into Admin Server - admin server setup
Reviewed by: nhosoi (Thanks!)
Fix Description: This implements support for admin server configuration and reconfiguration, so that we can remove setuputil related code from admserv/newinst/src. The basic flow is this:
Ask user basic information.
Ask user if they want to either use an existing config ds or setup a new one. If the user selects No, the code will gather information, create the directory server, and set it up to be the configuration DS. Otherwise, it will just create the directory server and register it with the existing config DS. The code will also create and setup and start the admin server, or reconfigure it and restart it as needed. Note that setup-ds-admin.pl assumes that a config DS is to be used. If you want to setup a directory server instance without using a config ds, use setup-ds.pl instead.
Platforms tested: RHEL4
Flag Day: Yes - autotool changes
Doc impact: Yes.
--- NEW FILE AdminServer.pm.in ---
# 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) 2007 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK
#
package AdminServer;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(createAdminServer reconfigAdminServer registerDSWithConfigDS);
@EXPORT_OK = qw(createAdminServer reconfigAdminServer registerDSWithConfigDS);
use File::Path;
# tempfiles
use File::Temp qw(tempfile tempdir);
# load perldap
use Mozilla::LDAP::Conn;
use Mozilla::LDAP::Utils qw(normalizeDN);
use Mozilla::LDAP::API qw(ldap_url_parse);
use Mozilla::LDAP::LDIF;
use Util;
use Inf;
use Setup;
use AdminUtil;
sub checkRequiredParameters {
my $setup = shift;
for my $asparam (qw(Port SysUser ServerAdminID ServerAdminPwd)) {
if (!defined($setup->{inf}->{admin}->{$asparam})) {
$setup->msg($FATAL, "missing_adminserver_param", $asparam);
return 0;
}
}
for my $general (qw(SuiteSpotUserID SuiteSpotGroup ConfigDirectoryLdapURL)) {
if (!defined($setup->{inf}->{General}->{$general})) {
$setup->msg($FATAL, "missing_general_param", $general);
return 0;
}
}
return 1;
}
sub createASFilesAndDirs {
my $setup = shift;
my $configdir = shift;
my $securitydir = shift;
my $logdir = shift;
my $rundir = shift;
my $uid = getpwnam $setup->{inf}->{admin}->{SysUser};
my $gid = getgrnam $setup->{inf}->{General}->{SuiteSpotGroup};
$setup->msg('create_adminserver_filesdirs');
# these paths are owned exclusively by admin sever
for ($configdir, $securitydir, $logdir) {
$! = 0; # clear errno
if (! -d $_) {
mkpath($_, 1, 0700);
} else {
chmod 0700, $_;
}
if (! -d $_) {
$setup->msg($FATAL, 'error_creating_directory', $_, $!);
return 0;
}
$! = 0; # clear errno
chown $uid, -1, $_;
if ($!) {
$setup->msg($FATAL, 'error_chowning_directory', $_,
$setup->{inf}->{admin}->{SysUser}, $!);
return 0;
}
}
# these paths are shared by SuiteSpotGroup members
$! = 0; # clear errno
if (! -d $rundir) {
mkpath($rundir, 0, 0770);
} else {
chmod 0770, $rundir;
}
if (! -d $rundir) {
$setup->msg($FATAL, 'error_creating_directory', $rundir, $!);
return 0;
}
$! = 0; # clear errno
chown -1, $gid, $rundir;
if ($!) {
$setup->msg($FATAL, 'error_chgrping_directory', $rundir,
$setup->{inf}->{General}->{SuiteSpotGroup}, $!);
return 0;
}
my @start_slapd;
if ($setup->{inf}->{slapd}->{SlapdConfigForMC} =~ /yes/i) {
my $slapdid = $setup->{inf}->{slapd}->{ServerIdentifier};
@start_slapd = ('ldapStart', "slapd-$slapdid/start-slapd");
}
$setup->msg('updating_admconf');
my $rc = updateAdmConf({ldapurl => $setup->{inf}->{General}->{ConfigDirectoryLdapURL},
SuiteSpotUserID => $setup->{inf}->{General}->{SuiteSpotUserID},
SuiteSpotGroup => $setup->{inf}->{General}->{SuiteSpotGroup},
sysuser => $setup->{inf}->{admin}->{SysUser},
sysgroup => $setup->{inf}->{General}->{SuiteSpotGroup},
AdminDomain => $setup->{inf}->{General}->{AdminDomain},
@start_slapd},
$configdir);
if (!$rc) {
$setup->msg($FATAL, 'error_updating_admconf', $!);
return 0;
}
$setup->msg('updating_admpw');
$rc = updateAdmpw($setup->{inf}->{admin}->{ServerAdminID},
$setup->{inf}->{admin}->{ServerAdminPwd},
$configdir);
if (!$rc) {
$setup->msg($FATAL, 'error_updating_admpw');
return 0;
}
return 1;
}
# This is how we extract the sie and isie as the as entries are
# being added
sub registercb {
my ($context, $entry) = @_;
my $rc = check_and_add_entry([$context->{conn}], $entry);
my $setup = $context->{setup};
if ($rc) {
if ($entry->hasValue('objectclass', 'nsApplication', 1)) {
$context->{isie} = $entry->getDN();
} elsif ($entry->hasValue('objectclass', 'nsAdminServer', 1)) {
$context->{sie} = $entry->getDN();
}
if ($context->{sie}) {
$rc = updateLocalConf($entry, $context->{sie}, $context->{localfh});
if (!$rc) {
$setup->msg($FATAL, 'error_updating_localconf_entry', $entry->getDN());
}
}
} else {
$setup->msg($FATAL, 'error_adding_adminserver_config_entry', $entry->getDN());
}
return $rc;
}
sub registerASWithConfigDS {
my $setup = shift;
my $inf = $setup->{inf};
my $configdir = shift;
my @errs;
$setup->msg('registering_adminserver');
# open a connection to the configuration directory server
my $conn = getConfigDSConn($inf->{General}->{ConfigDirectoryLdapURL},
$inf->{General}->{ConfigDirectoryAdminID},
$inf->{General}->{ConfigDirectoryAdminPwd},
$configdir, \@errs);
if (@errs) {
$setup->msg($FATAL, @errs);
return 0;
}
# add the Admin Server configuration entries
my @ldiffiles = ("@ldifdir(a)/20asdata.ldif.tmpl",
"@ldifdir(a)/21astasks.ldif.tmpl",
"@ldifdir(a)/22ascommands.ldif.tmpl"
);
my $setupinf = new Inf("@infdir(a)/setup.inf");
my $admininf = new Inf("@infdir(a)/admin.inf");
my $mapper = new Inf("@infdir(a)/adminserver.map");
$mapper = process_maptbl($mapper, ($inf, $admininf, $setupinf));
if (!$mapper) {
$conn->close();
$setup->msg($FATAL, 'error_creating_adminserver_maptbl');
return 0;
}
# context will get filled in with isie and sie in registercb
my $localconf = "$configdir/local.conf";
my $isnew;
if (! -f $localconf) {
$isnew = 1;
}
if (!open(LOCALCONF, ">$localconf")) {
$setup->msg($FATAL, 'error_updating_localconf', $localconf, $!);
return 0;
}
my $context = {conn => $conn, localfh => \*LOCALCONF, setup => $setup};
getMappedEntries($mapper, \@ldiffiles, \®istercb, $context);
close(LOCALCONF);
if ($isnew) {
my $admConf = getAdmConf($configdir);
my $uid = getpwnam $admConf->{sysuser};
chmod 0600, "$localconf";
chown $uid, -1, "$localconf";
}
$setup->msg('updating_admconf_configds');
if ($context->{sie} or $context->{isie}) {
if (!updateAdmConf({sie => $context->{sie},
isie => $context->{isie},
userdn => $conn->{adminbinddn}},
$configdir)) {
$setup->msg($FATAL, 'error_updating_admconf', $!);
return 0;
}
}
$conn->close();
return 1;
}
# update other config files - these are the fields which users typically want to
# change during an install or an upgrade, that also must be synced to the Apache
# style config files - we use the config CGI in command line mode because it
# already has all of the logic to update the files correctly */
sub updateHttpConfFiles {
my $serverAddress = shift;
my $port = shift;
my $configdir = shift;
my $origport = shift;
my $admConf = getAdmConf($configdir);
my $user = $admConf->{sysuser};
my $cmd = "@cgibindir@/config op=set configuration.nsSuiteSpotUser=\"$user\"";
if ($origport && ($port != $origport)) {
$cmd .= " configuration.nsServerPort=\"$port\"";
}
if ($serverAddress) {
$cmd .= " configuration.nsServerAddress=\"$serverAddress\"";
}
if (system($cmd)) {
return 0;
}
return 1;
}
sub startAdminServer {
my $setup = shift;
my $configdir = shift;
my $logdir = shift;
my $rundir = shift;
my $isrunning;
$pidfile = "$rundir/@pidfile@";
if (-f $pidfile) {
open(PIDFILE, $pidfile);
my $pid = <PIDFILE>;
close(PIDFILE);
if (kill 0, $pid) {
$isrunning = 1;
}
}
my ($fh, $filename) = tempfile("asstartupXXXXXX", UNLINK => 1,
SUFFIX => ".log", DIR => File::Spec->tmpdir);
close($fh);
my $rc;
if ($isrunning) {
$setup->msg('restarting_adminserver');
$rc = system("@cmdbindir@/restart-ds-admin > $filename 2>&1");
} else {
$setup->msg('starting_adminserver');
$rc = system("@cmdbindir@/start-ds-admin > $filename 2>&1");
}
open(STARTLOG, "$filename");
while (<STARTLOG>) {
$setup->msg('adminserver_startup_output', $_);
}
close(STARTLOG);
unlink($filename);
if ($rc) {
$setup->msg($FATAL, 'error_starting_adminserver', $rc);
return 0;
}
$setup->msg('success_starting_adminserver');
return 1;
}
sub createAdminServer {
my $setup = shift;
my $reconfig = shift;
# setup has inf, res, and log
if ($reconfig) {
$setup->msg('begin_reconfig_adminserver');
} else {
$setup->msg('begin_create_adminserver');
}
if (!checkRequiredParameters($setup)) {
return 0;
}
my $configdir = $setup->{inf}->{admin}->{config_dir} ||
$ENV{ADMSERV_CONF_DIR} ||
$setup->{configdir} . "/admin-serv";
my $securitydir = $setup->{inf}->{admin}->{security_dir} ||
$configdir;
my $logdir = $setup->{inf}->{admin}->{log_dir} ||
$ENV{ADMSERV_LOG_DIR} ||
"@logdir@";
my $rundir = $setup->{inf}->{admin}->{run_dir} ||
$ENV{ADMSERV_PID_DIR} ||
"@piddir@";
if (!createASFilesAndDirs($setup, $configdir, $securitydir, $logdir, $rundir)) {
return 0;
}
if (!registerASWithConfigDS($setup, $configdir)) {
return 0;
}
$setup->msg('updating_httpconf');
if (!updateHttpConfFiles($setup->{inf}->{admin}->{ServerIpAddress},
$setup->{inf}->{admin}->{Port},
$configdir, $setup->{asorigport})) {
$setup->msg($FATAL, 'error_updating_httpconf');
return 0;
}
if (!startAdminServer($setup, $configdir, $logdir, $rundir)) {
return 0;
}
if ($reconfig) {
$setup->msg('end_reconfig_adminserver');
} else {
$setup->msg('end_create_adminserver');
}
return 1;
}
sub reconfigAdminServer {
my $setup = shift;
return createAdminServer($setup, 1);
}
sub registerDSWithConfigDS {
my $setup = shift;
my $inf = $setup->{inf};
my $configdir = shift;
my @errs;
$setup->msg('registering_dirserver');
# open a connection to the configuration directory server
my $conn = getConfigDSConn($inf->{General}->{ConfigDirectoryLdapURL},
$inf->{General}->{ConfigDirectoryAdminID},
$inf->{General}->{ConfigDirectoryAdminPwd},
$configdir, \@errs);
if (@errs) {
$setup->msg($FATAL, @errs);
return 0;
}
# add the Admin Server configuration entries
my @ldiffiles = ("@ldifdir(a)/10dsdata.ldif.tmpl",
"@ldifdir(a)/11dstasks.ldif.tmpl"
);
my $setupinf = new Inf("@infdir(a)/setup.inf");
my $slapdinf = new Inf("@infdir(a)/slapd.inf");
my $mapper = new Inf("@infdir(a)/dirserver.map");
$mapper = process_maptbl($mapper, ($inf, $slapdinf, $setupinf));
if (!$mapper) {
$conn->close();
$setup->msg($FATAL, 'error_creating_dirserver_maptbl');
return 0;
}
my $context = [$conn];
getMappedEntries($mapper, \@ldiffiles, \&check_and_add_entry, $context);
$conn->close();
return 1;
}
--- NEW FILE adminserver.map.in ---
# 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) 2007 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK
#
# register_param.map:
# This file is used by the register_server.pl script to register the server
# info to the Configuration Directory Server. The server info is stored in
# the (template) ldif files located in @ldifdir@. In case a server entry has
# %...% format parameters, this map table is used to resolve it and replace
# the parameter with the value defined in this file.
#
# [Parameter resolution rules]
# * If the right-hand value is in ` (backquote), the value is eval'ed by perl.
# The output should be stored in $returnvalue to pass to the internal hash.
# * If the right-hand value is in " (doublequote), the value is passed as is.
# * If the right-hand value is not in any quote, the value should be found
# in either of the setup inf file (static) or the install inf file (dynamic).
# * Variables surrounded by @ (e.g., @configdir@) are replaced with the
# system path at the compile time.
# * The right-hand value can contain variables surrounded by % (e.g., %asid%)
# which refers the right-hand value (key) of this map file.
#
fqdn = FullMachineName
domain = AdminDomain
brand = Brand
normbrand = NormBrand
hostname = `use Net::Domain qw(hostname); $returnvalue = hostname();`
vendor = Vendor
asid = `use Net::Domain qw(hostname); $returnvalue = hostname();`
as_port = Port
admpw = "@configdir@/admpw"
as_error = "@logdir@/errors"
as_access = "@logdir@/access"
as_pid = "@pidfile@"
as_console_jar = "%normbrand%-admserv-%as_version%.jar"
as_help_path = "@helpdir@"
as_user = SysUser
as_version = Version
as_buildnum = BuildNumber
as_installedlocation = "AS INSTALLED LOCATION -- replace me"
as_serverroot = "AS SERVER ROOT-- replace me"
as_sie = "cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot"
--- NEW FILE dirserver.map.in ---
# 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) 2007 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK
#
# register_param.map:
# This file is used by the register_server.pl script to register the server
# info to the Configuration Directory Server. The server info is stored in
# the (template) ldif files located in @ldifdir@. In case a server entry has
# %...% format parameters, this map table is used to resolve it and replace
# the parameter with the value defined in this file.
#
# [Parameter resolution rules]
# * If the right-hand value is in ` (backquote), the value is eval'ed by perl.
# The output should be stored in $returnvalue to pass to the internal hash.
# * If the right-hand value is in " (doublequote), the value is passed as is.
# * If the right-hand value is not in any quote, the value should be found
# in either of the setup inf file (static) or the install inf file (dynamic).
# * Variables surrounded by @ (e.g., @configdir@) are replaced with the
# system path at the compile time.
# * The right-hand value can contain variables surrounded by % (e.g., %asid%)
# which refers the right-hand value (key) of this map file.
#
fqdn = FullMachineName
domain = AdminDomain
brand = Brand
normbrand = NormBrand
vendor = Vendor
configroot = "CONFIG ROOT -- replace me"
asid = `use Net::Domain qw(hostname); $returnvalue = hostname();`
as_sie = "cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot"
ds_version = Version
dsid = ServerIdentifier
ds_user = SuiteSpotUserID
ds_port = ServerPort
ds_secure_port ="636"
rootdn = RootDN
ds_suffix = Suffix
ds_buildnum = BuildNumber
ds_console_jar ="%normbrand%-ds-%ds_version%.jar"
ds_installedlocation = "DS INSTALLED LOCATION -- replace me"
ds_serverroot = "DS SERVER ROOT-- replace me"
ds_sie = "cn=slapd-%dsid%, cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot"
Index: ASDialogs.pm.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/ASDialogs.pm.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ASDialogs.pm.in 15 Jun 2007 22:16:28 -0000 1.2
+++ ASDialogs.pm.in 19 Jun 2007 18:32:28 -0000 1.3
@@ -76,8 +76,10 @@
if (!defined($port)) {
$port = @admservport@;
}
- if (!portAvailable($port)) {
- $port = getAvailablePort();
+ if (!$self->{manager}->{setup}->{reconfigas}) {
+ if (!portAvailable($port)) {
+ $port = getAvailablePort();
+ }
}
return $port;
},
@@ -85,9 +87,10 @@
my $self = shift;
my $ans = shift;
my $res = $DialogManager::SAME;
+ my $reconf = $self->{manager}->{setup}->{reconfigas};
if ($ans !~ /\d+/) {
$self->{manager}->alert("dialog_asport_error", $ans);
- } elsif (!portAvailable($ans)) {
+ } elsif (!$reconf && !portAvailable($ans)) {
$self->{manager}->alert("dialog_asport_error", $ans);
} else {
$res = $DialogManager::NEXT;
Index: AdminUtil.pm.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/AdminUtil.pm.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AdminUtil.pm.in 15 Jun 2007 22:16:28 -0000 1.1
+++ AdminUtil.pm.in 19 Jun 2007 18:32:28 -0000 1.2
@@ -39,51 +39,40 @@
package AdminUtil;
require Exporter;
@ISA = qw(Exporter);
-@EXPORT = qw(getConf createConfigDS);
-@EXPORT_OK = qw(getConf createConfigDS);
+@EXPORT = qw(getAdmConf getConfigDSConn createConfigDS updateAdmConf updateAdmpw updateLocalConf);
+@EXPORT_OK = qw(getAdmConf getConfigDSConn createConfigDS updateAdmConf updateAdmpw updateLocalConf);
# load perldap
use Mozilla::LDAP::Conn;
use Mozilla::LDAP::Utils qw(normalizeDN);
-use Mozilla::LDAP::API qw(ldap_url_parse);
-use Mozilla::LDAP::LDIF;
+use Mozilla::LDAP::API qw(:constant ldap_url_parse ldap_explode_dn);
+use Mozilla::LDAP::LDIF qw(enlist_values);
use Util;
use Inf;
+use strict;
+
# get the adminutil client configuration (adm.conf)
# the file is in LDIF format
# just return as a hash ref for easy key/value access
# single valued attributes will have a single string value
# multi valued attributes will have an array ref value
-sub getConf {
- my $dir = shift;
+sub getAdmConf {
+ my $dir = shift || "@configdir@";
my $ret = {};
- if (! -d $dir) {
- warn "Config directory $dir does not exist";
- return $ret;
- }
- $dir = "$dir/admin-serv";
- if (! -d $dir) {
- warn "Config directory $dir does not exist";
- return $ret;
- }
my $fname = "$dir/adm.conf";
if (-f $fname) {
open( ADMCONF, "$fname" ) || die "Can't open $fname: $!";
- my $in = new Mozilla::LDAP::LDIF(*ADMCONF);
- while (my $ent = readOneEntry $in) {
- foreach my $attr (keys %{$ent}) {
- my @vals = $ent->getValues($attr);
- if (@vals > 1) {
- $ret->{$attr} = \@vals; # value is array ref
- } else {
- $ret->{$attr} = $vals[0]; # value is single string
- }
- }
+ my $in = Mozilla::LDAP::LDIF->new(*ADMCONF, \&read_file_URL_or_name);
+ my @records = $in->get(undef); # read to end of file
+ close(ADMCONF);
+ @records = enlist_values(@records);
+ for (@records) { # there should only be 1 record
+ my %h = @{$_}; # cast $_ to an array and use that to init hash
+ $ret = \%h;
}
- close ADMCONF;
$ret->{configdir} = $dir;
}
@@ -93,12 +82,20 @@
# pset info is from the local.conf file, also in LDIF format
sub getPset {
my $admConf = shift;
+ my $configdir;
+ if ($admConf) {
+ if (ref($admConf)) {
+ $configdir = $admConf->{configdir} || "@configdir@";
+ } else {
+ $configdir = $admConf || "@configdir@";
+ }
+ }
my $ret = {};
- my $fname = "$admConf->{configdir}/local.conf";
+ my $fname = "$configdir/local.conf";
if (-f $fname) {
open( LOCALCONF, "$fname" ) || die "Can't open $fname: $!";
my $in = new Mozilla::LDAP::LDIF(*LOCALCONF);
- while ($ent = readOneEntry $in) {
+ while (my $ent = readOneEntry $in) {
foreach my $attr (keys %{$ent}) {
my @vals = $ent->getValues($attr);
if (@vals > 1) {
@@ -116,11 +113,19 @@
sub getAdmpw {
my $admConf = shift;
+ my $configdir;
+ if ($admConf) {
+ if (ref($admConf)) {
+ $configdir = $admConf->{configdir} || "@configdir@";
+ } else {
+ $configdir = $admConf || "@configdir@";
+ }
+ }
my $ret = {};
- my $fname = "$admConf->{configdir}/admpw";
+ my $fname = "$configdir/admpw";
if (-f $fname) {
open( ADMPW, "$fname" ) || die "Can't open $fname: $!";
- while (my $line = <ADMPW>) {
+ while (<ADMPW>) {
($ret->{ServerAdminID}, $ret->{ServerAdminPwd}) = split /:/;
last;
}
@@ -144,6 +149,12 @@
my $errs = shift; # for output errs - an array ref
my $certdir;
+ if (!$url or !$id) {
+ my $admConf = getAdmConf($configdir);
+ $url = $url || $admConf->{ldapurl};
+ $id = $id || $admConf->{userdn};
+ }
+
my $h = ldap_url_parse($url);
my $host = $h->{host};
my $port = $h->{port};
@@ -192,8 +203,13 @@
} else {
push @{$errs}, 'configds_bind_error', $id, $url, (($errstr eq "Success") ? 'unknown error' : $errstr);
}
+ return $conn;
}
+ $conn->setDefaultRebindProc($id, $pwd, LDAP_AUTH_SIMPLE);
+ # store the binddn for later use
+ $conn->{adminbinddn} = $id;
+
return $conn;
}
@@ -216,18 +232,18 @@
# and make it into a configuration directory server
sub createConfigDS {
my $inf = shift;
- my $res = shift;
+ my $errs = shift;
# open a connection to the directory server
my $conn = new Mozilla::LDAP::Conn($inf->{General}->{FullMachineName},
$inf->{slapd}->{ServerPort},
$inf->{slapd}->{RootDN},
- $inf->{slapd}->{RootDNPwd});
+ $inf->{slapd}->{RootDNPwd},
+ $inf->{General}->{certdir});
# add the NetscapeRoot suffix
- my @errs = addSuffix($conn, "o=NetscapeRoot", "NetscapeRoot");
- if (@errs) {
- print $res->getText(@errs);
+ @{$errs} = addSuffix($conn, "o=NetscapeRoot", "NetscapeRoot");
+ if (@{$errs}) {
$conn->close();
return 0;
}
@@ -244,13 +260,136 @@
$mapper = process_maptbl($mapper, ($inf, $dsinf, $admininf, $setupinf));
if (!$mapper) {
$conn->close();
- print $res->getText('error_creating_configds_maptbl');
+ @{$errs} = ('error_creating_configds_maptbl');
return 0;
}
getMappedEntries($mapper, \@ldiffiles, \&check_and_add_entry,
- [$conn, 1]);
+ [$conn]);
$conn->close();
return 1;
}
+
+sub updateAdmConf {
+ my $params = shift; # hashref
+ my $configdir = shift || "@configdir@";
+ my $admConf = getAdmConf($configdir);
+ my $isnew = 0;
+ if (!$admConf || !%{$admConf}) {
+ $isnew = 1; # create it
+ }
+
+ # update values in admConf with the passed in params
+ while (my ($key,$val) = each %{$params}) {
+ $admConf->{$key} = $val;
+ }
+
+ # write it out
+ my $filename = "$configdir/adm.conf";
+ delete $admConf->{configdir}; # don't write this
+ open(ADMCONF, "> $filename") || die "Can't write $filename: $!";
+ while (my ($key,$val) = each %{$admConf}) {
+ if (ref($val)) {
+ for my $vv (@{$val}) {
+ print ADMCONF "$key: $vv\n";
+ }
+ } else {
+ print ADMCONF "$key: $val\n";
+ }
+ }
+ close(ADMCONF);
+
+ if ($isnew) {
+ my $uid = getpwnam $admConf->{sysuser};
+ chmod 0600, "$filename";
+ chown $uid, -1, "$filename";
+ }
+
+ return 1;
+}
+
+sub updateAdmpw {
+ my $userid = shift;
+ my $pwd = shift;
+ my $configdir = shift || "@configdir@";
+ my $filename = "$configdir/admpw";
+ my $isnew = 0;
+ if (! -f $filename) {
+ $isnew = 1;
+ }
+
+ $pwd = getHashedPassword($pwd, "SHA");
+
+ open(ADMPW, ">$filename") or die "Error: can't write file $filename: $!";
+ print ADMPW "$userid:$pwd\n";
+ close(ADMPW);
+
+ if ($isnew) {
+ my $admConf = getAdmConf($configdir);
+ my $uid = getpwnam $admConf->{sysuser};
+ chmod 0600, "$filename";
+ chown $uid, -1, "$filename";
+ }
+
+ return 1;
+}
+
+# this is the prefix used for attribute names in the pset file
+sub getAttrNamePrefix {
+ my $dn = shift;
+ my $rootdn = shift; # the sie DN
+
+ my @dnList = ldap_explode_dn($dn, 1);
+ my @rootdnList = ldap_explode_dn($rootdn, 1);
+
+ my $attrLen = scalar(@dnList) - scalar(@rootdnList);
+ my $attrName = "";
+ while ($attrLen > 0) {
+ if ($attrLen == 1) {
+ $attrName .= $dnList[0];
+ } else {
+ $attrName .= $dnList[$attrLen-1] . ".";
+ }
+ $attrLen--;
+ }
+
+ return $attrName;
+}
+
+# these are attributes not written to the pset
+my %nopsetattrs = (
+ cn => 'cn',
+ aci => 'aci'
+);
+
+# This is only used during setup.
+# When the admin server is running, changes
+# occur online, and the file contains a cache
+# of those changes
+# but during setup, we need to create the
+# local.conf as a bootstrap for the server
+sub updateLocalConf {
+ my $entry = shift;
+ my $siedn = shift;
+ my $localfh = shift;
+
+ # convert entry to pset format
+ my $prefix = getAttrNamePrefix($entry->getDN(), $siedn);
+
+ # write values to file
+ foreach my $attr (keys %{$entry}) {
+ next if $nopsetattrs{lc($attr)};
+ my $attrName;
+ if ($prefix) {
+ $attrName = $prefix . "." . $attr;
+ } else {
+ $attrName = $attr;
+ }
+ foreach my $val ($entry->getValues($attr)) {
+ print $localfh "$attrName: $val\n";
+ }
+ }
+
+ return 1;
+}
Index: ConfigDSDialogs.pm
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/ConfigDSDialogs.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ConfigDSDialogs.pm 15 Jun 2007 22:16:28 -0000 1.1
+++ ConfigDSDialogs.pm 19 Jun 2007 18:32:28 -0000 1.2
@@ -83,7 +83,7 @@
}
my $configdsinfo = new Dialog (
- $TYPICAL,
+ $EXPRESS,
'dialog_configdsinfo_text',
sub {
my $self = shift;
@@ -264,7 +264,7 @@
);
my $useconfigds = new DialogYesNo (
- $TYPICAL,
+ $EXPRESS,
'dialog_useconfigds_text',
sub {
my $self = shift;
Index: setup-ds-admin.pl.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/setup-ds-admin.pl.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- setup-ds-admin.pl.in 15 Jun 2007 22:16:28 -0000 1.2
+++ setup-ds-admin.pl.in 19 Jun 2007 18:32:28 -0000 1.3
@@ -47,17 +47,18 @@
use Resource;
use DialogManager;
use AdminUtil;
-
-my $setup = new Setup;
+use AdminServer;
my $res = new Resource("@propertydir(a)/setup-ds.res",
"@propertydir(a)/setup-ds-admin.res");
+my $setup = new Setup($res);
+
# see what directory server instances we already have configured
my @dirservers = $setup->getDirServers();
# see if there is already a configds
-my $admConf = AdminUtil::getConf($setup->{configdir});
+my $admConf = AdminUtil::getAdmConf("$setup->{configdir}/admin-serv");
# set defaults
if ($admConf && %{$admConf}) {
@@ -71,8 +72,9 @@
# read additional config from config DS
my $pset = AdminUtil::getPset($admConf);
if ($pset && %{$pset}) {
- $setup->{inf}->{admin}->{Port} = $pset->{"configuration.nsServerPort"};
- $setup->{inf}->{admin}->{ServerIpAddress} = $pset->{"configuration.nsServerAddress"};
+ $setup->{inf}->{admin}->{Port} = $pset->{"configuration.nsserverport"};
+ $setup->{asorigport} = $pset->{"configuration.nsserverport"}; # save orig. port
+ $setup->{inf}->{admin}->{ServerIpAddress} = $pset->{"configuration.nsserveraddress"};
}
my $admpw = AdminUtil::getAdmpw($admConf);
if ($admpw && %{$admpw}) {
@@ -83,6 +85,7 @@
# default to using the existing config DS
$setup->{inf}->{slapd}->{UseExistingMC} = 1;
$setup->{inf}->{slapd}->{SlapdConfigForMC} = 0;
+ $setup->{reconfigas} = 1; # allow AS reconfig
}
if (!$setup->{silent}) {
@@ -105,13 +108,13 @@
sub {
my $self = shift;
my $ans = shift;
- my $res = $self->handleResponse($ans);
- if ($res == $DialogManager::NEXT) {
+ my $resp = $self->handleResponse($ans);
+ if ($resp == $DialogManager::NEXT) {
if (!$self->isYes()) {
- $res = $DialogManager::BACK;
+ $resp = $DialogManager::BACK;
}
}
- return $res;
+ return $resp;
},
['dialog_readytoproceed_prompt'],
);
@@ -123,8 +126,6 @@
if ($rc) {
$setup->doExit();
}
-
- print "\n\n";
}
if (!$setup->{inf}->{slapd}->{UseExistingMC} or
@@ -139,29 +140,53 @@
$setup->{inf}->write();
+$setup->msg('create_dirserver');
+
# create a directory server instance
if (system("@bindir(a)/ds_newinst.pl $setup->{inffile}")) {
- print STDERR "Failed to create directory server instance\n";
- $setup->{log}->logMessage($FATAL, "Setup", "Failed to create directory server instance");
+ $setup->msg($FATAL, 'error_create_dirserver');
+ exit 1;
}
# setup directory server instance to be the configuration DS
if ($setup->{inf}->{slapd}->{SlapdConfigForMC} =~ /yes/i) {
- createConfigDS($setup->{inf}, $res);
+ my @errs = ();
+ $setup->msg('create_configds');
+ if (!createConfigDS($setup->{inf}, \@errs)) {
+ $setup->msg($FATAL, @errs);
+ $setup->msg($FATAL, 'error_create_configds');
+ exit 1;
+ }
}
# register ds instances with config DS
+if (!registerDSWithConfigDS($setup)) {
+ $setup->msg($FATAL, 'error_register_dirserver');
+ exit 1;
+}
+
-# configure the admin server instance
-if (system("@cmdbindir@/ds-admin-update -f $setup->{inffile}")) {
- print STDERR "Failed to configure administration server\n";
- $setup->{log}->logMessage($FATAL, "Setup", "Failed to configure administration server");
+# configure and register the admin server instance
+if (!$setup->{reconfigas}) {
+ if (!createAdminServer($setup)) {
+ $setup->msg($FATAL, 'error_create_adminserver');
+ exit 1;
+ }
+} else {
+ if (!reconfigAdminServer($setup)) {
+ $setup->msg($FATAL, 'error_reconfig_adminserver');
+ exit 1;
+ }
}
+$setup->msg($SUCCESS, 'setup_complete');
+
END {
- if (!$setup->{keep}) {
- unlink $setup->{inffile};
- }
+ if ($setup) {
+ if (!$setup->{keep}) {
+ unlink $setup->{inffile};
+ }
- $setup->doExit();
+ $setup->doExit();
+ }
}
Index: setup-ds-admin.res.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/setup-ds-admin.res.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- setup-ds-admin.res.in 15 Jun 2007 22:16:28 -0000 1.2
+++ setup-ds-admin.res.in 19 Jun 2007 18:32:28 -0000 1.3
@@ -80,3 +80,44 @@
dialog_readytoproceed_text = The interactive phase is complete. The script will now set up your\
servers. Enter No or go Back if you want to change something.\n\n
dialog_readytoproceed_prompt = Are you ready to set up your servers?
+
+# post install
+begin_create_adminserver = Beginning Admin Server creation . . .\n
+begin_reconfig_adminserver = Beginning Admin Server reconfiguration . . .\n
+create_adminserver_filesdirs = Creating Admin Server files and directories . . .\n
+creating_admpw = Could not create the admin server password file '%s': Error %s\n
+missing_adminserver_param = Missing required Admin Server setup parameter '%s'. Cannot continue.\n
+missing_general_param = Missing required General setup parameter '%s'. Cannot continue.\n
+creating_admpw = Could not create the Admin Server password file '%s'. Error %s\n
+error_create_dirserver = Failed to create directory server instance\n
+error_create_configds = Failed to create the configuration directory server\n
+error_create_adminserver = Failed to create and configure the admin server\n
+error_creating_directory = Could not create admin server directory '%s'. Error: %s\n
+error_chowning_directory = Could not change ownership of directory '%s' to userid '%s': Error: %s\n
+error_chgrping_directory = Could not change group of directory '%s' to group '%s': Error: %s\n
+updating_admconf = Updating adm.conf . . .\n
+error_updating_admconf = Could not update adm.conf. Error: %s\n
+updating_admpw = Updating admpw . . .\n
+error_updating_admpw = Could not update admpw. Error: %s\n
+error_creating_adminserver_maptbl = Could not create the map table for registering the Admin Server with the configuration directory server.\n
+error_updating_localconf = Could not update the local admin server configuration file '%s'. Error: %s\n
+error_starting_adminserver = Could not start the admin server. Error: %s\n
+registering_adminserver = Registering admin server with the configuration directory server . . .\n
+error_adding_adminserver_config_entry = Could not add the admin server configuration entry '%s'.\nCheck the configuration directory server access and error log for more details.\n
+error_updating_localconf_entry = Could not update the local admin server configuration file for the configuration entry '%s'.\n
+updating_admconf_configds = Updating adm.conf with information from configuration directory server . . .\n
+updating_httpconf = Updating the configuration for the httpd engine . . .\n
+error_updating_httpconf = Could not update the httpd engine configuration.\n
+restarting_adminserver = Restarting admin server . . .\n
+starting_adminserver = Starting admin server . . .\n
+adminserver_startup_output = output: %s
+success_starting_adminserver = The admin server was successfully started.\n
+end_create_adminserver = Admin server was successfully created, configured, and started.\n
+end_reconfig_adminserver = Admin server was successfully reconfigured and started.\n
+create_dirserver = Creating directory server . . .\n
+create_configds = Creating the configuration directory server . . .\n
+setup_complete = Setup is complete.\n\n
+error_register_dirserver = Could not register the directory server with the configuration directory server.\n
+registering_dirserver = Registering directory server with the configuration directory server . . .\n
+error_creating_dirserver_maptbl = Could not create the map table for registering the directory server with the configuration directory server.\n
+error_reconfig_adminserver = Could not reconfigure the admin server.\n
16 years, 11 months
[Fedora-directory-commits] adminserver/admserv/schema/ldif 10dsdata.ldif.tmpl, 1.2, 1.3 20asdata.ldif.tmpl, 1.1, 1.2
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/adminserver/admserv/schema/ldif
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16478/adminserver/admserv/schema/ldif
Modified Files:
10dsdata.ldif.tmpl 20asdata.ldif.tmpl
Log Message:
Resolves: bug 237356
Bug Description: Move DS Admin Code into Admin Server - admin server setup
Reviewed by: nhosoi (Thanks!)
Fix Description: This implements support for admin server configuration and reconfiguration, so that we can remove setuputil related code from admserv/newinst/src. The basic flow is this:
Ask user basic information.
Ask user if they want to either use an existing config ds or setup a new one. If the user selects No, the code will gather information, create the directory server, and set it up to be the configuration DS. Otherwise, it will just create the directory server and register it with the existing config DS. The code will also create and setup and start the admin server, or reconfigure it and restart it as needed. Note that setup-ds-admin.pl assumes that a config DS is to be used. If you want to setup a directory server instance without using a config ds, use setup-ds.pl instead.
Platforms tested: RHEL4
Flag Day: Yes - autotool changes
Doc impact: Yes.
Index: 10dsdata.ldif.tmpl
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/schema/ldif/10dsdata.ldif.tmpl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- 10dsdata.ldif.tmpl 15 Jun 2007 22:16:29 -0000 1.2
+++ 10dsdata.ldif.tmpl 19 Jun 2007 18:32:28 -0000 1.3
@@ -36,7 +36,6 @@
cn: slapd-%dsid%
uniqueMember: cn=slapd-%dsid%, cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot
uniqueMember: cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot
-userPassword: %ds_passwd%
dn: cn=configuration,cn=slapd-%dsid%, cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot
objectClass: nsResourceRef
Index: 20asdata.ldif.tmpl
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/schema/ldif/20asdata.ldif.tmpl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 20asdata.ldif.tmpl 13 Jun 2007 17:48:35 -0000 1.1
+++ 20asdata.ldif.tmpl 19 Jun 2007 18:32:28 -0000 1.2
@@ -26,7 +26,6 @@
serverProductName: Administration Server
serverHostName: %fqdn%
uniqueMember: cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot
-userPassword: %as_passwd%
dn: cn=configuration, cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot
objectClass: nsConfig
@@ -44,7 +43,7 @@
nsAdminUsers: %admpw%
nsErrorLog: %as_error%
nsPidLog: %as_pid%
-nsAccessLog: %as_access
+nsAccessLog: %as_access%
nsAdminCacheLifetime: 600
nsAdminAccessHosts: *.%domain%
nsAdminAccessAddresses: *
16 years, 11 months