[Fedora-directory-commits] ldapserver/ldap/cm Makefile, 1.70, NONE fedora-patch.inf, 1.4, NONE filterfiles.sh, 1.4, NONE fixBaseInf.pl, 1.4, NONE fixNSPerlInf.pl, 1.5, NONE fixPerlDAPInf.pl, 1.6, NONE fixSetupInf.pl, 1.8, NONE genPerlDAPInf.pl, 1.1, NONE genRpmPatch.pl, 1.3, NONE ldapjava.mpw, 1.4, NONE nbsp2utf8.sh, 1.4, NONE ntpack.sh, 1.4, NONE redhat-patch.inf, 1.4, NONE unixstrip, 1.4, NONE unixstrip.pl, 1.4, NONE
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/cm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14820/ldapserver/ldap/cm
Removed Files:
Makefile fedora-patch.inf filterfiles.sh fixBaseInf.pl
fixNSPerlInf.pl fixPerlDAPInf.pl fixSetupInf.pl
genPerlDAPInf.pl genRpmPatch.pl ldapjava.mpw nbsp2utf8.sh
ntpack.sh redhat-patch.inf unixstrip unixstrip.pl
Log Message:
remove obsolete files
--- Makefile DELETED ---
--- fedora-patch.inf DELETED ---
--- filterfiles.sh DELETED ---
--- fixBaseInf.pl DELETED ---
--- fixNSPerlInf.pl DELETED ---
--- fixPerlDAPInf.pl DELETED ---
--- fixSetupInf.pl DELETED ---
--- genPerlDAPInf.pl DELETED ---
--- genRpmPatch.pl DELETED ---
--- ldapjava.mpw DELETED ---
--- nbsp2utf8.sh DELETED ---
--- ntpack.sh DELETED ---
--- redhat-patch.inf DELETED ---
--- unixstrip DELETED ---
--- unixstrip.pl DELETED ---
16 years, 10 months
[Fedora-directory-commits] ldapserver/ldap/cm/newinst Makefile, 1.12, NONE fixINF.pl, 1.4, NONE ns-keygen, 1.7, NONE ns-update, 1.13, NONE replaceToken.pl, 1.4, NONE setup, 1.16, NONE setup.patch, 1.3, NONE setup.pl, 1.5, NONE setup.sh, 1.6, NONE slapd-patch.inf, 1.3, NONE slapd.inf.in, 1.2, NONE uninstall, 1.4, NONE ux-config.cc, 1.11, NONE ux-config.h, 1.7, NONE ux-dialog.cc, 1.11, NONE ux-dialog.h, 1.6, NONE ux-dsalib_dn.c, 1.5, NONE ux-guesses.cc, 1.6, NONE
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/cm/newinst
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14820/ldapserver/ldap/cm/newinst
Removed Files:
Makefile fixINF.pl ns-keygen ns-update replaceToken.pl setup
setup.patch setup.pl setup.sh slapd-patch.inf slapd.inf.in
uninstall ux-config.cc ux-config.h ux-dialog.cc ux-dialog.h
ux-dsalib_dn.c ux-guesses.cc
Log Message:
remove obsolete files
--- Makefile DELETED ---
--- fixINF.pl DELETED ---
--- ns-keygen DELETED ---
--- ns-update DELETED ---
--- replaceToken.pl DELETED ---
--- setup DELETED ---
--- setup.patch DELETED ---
--- setup.pl DELETED ---
--- setup.sh DELETED ---
--- slapd-patch.inf DELETED ---
--- slapd.inf.in DELETED ---
--- uninstall DELETED ---
--- ux-config.cc DELETED ---
--- ux-config.h DELETED ---
--- ux-dialog.cc DELETED ---
--- ux-dialog.h DELETED ---
--- ux-dsalib_dn.c DELETED ---
--- ux-guesses.cc DELETED ---
16 years, 10 months
[Fedora-directory-commits] ldapserver/ldap/cm/newinstnt Makefile, 1.8, NONE consolinst.c, 1.7, NONE consolinst.h, 1.5, NONE dsinst.aps, 1.1.1.1, NONE dsinst.c, 1.13, NONE dsinst.h, 1.6, NONE dsinst.rc, 1.9, NONE dsinst_dsalib_dn.c, 1.5, NONE libinst.c, 1.5, NONE libinst.h, 1.5, NONE resource.h, 1.6, NONE setup.bat, 1.4, NONE setup.inf, 1.6, NONE slapd.inf, 1.7, NONE wizard.bmp, 1.1.1.1, NONE
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/cm/newinstnt
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14820/ldapserver/ldap/cm/newinstnt
Removed Files:
Makefile consolinst.c consolinst.h dsinst.aps dsinst.c
dsinst.h dsinst.rc dsinst_dsalib_dn.c libinst.c libinst.h
resource.h setup.bat setup.inf slapd.inf wizard.bmp
Log Message:
remove obsolete files
--- Makefile DELETED ---
--- consolinst.c DELETED ---
--- consolinst.h DELETED ---
--- dsinst.aps DELETED ---
--- dsinst.c DELETED ---
--- dsinst.h DELETED ---
--- dsinst.rc DELETED ---
--- dsinst_dsalib_dn.c DELETED ---
--- libinst.c DELETED ---
--- libinst.h DELETED ---
--- resource.h DELETED ---
--- setup.bat DELETED ---
--- setup.inf DELETED ---
--- slapd.inf DELETED ---
--- wizard.bmp DELETED ---
16 years, 10 months
[Fedora-directory-commits] ldapserver/ldap/admin/src slapd.inf.in, NONE, 1.1
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14820/ldapserver/ldap/admin/src
Added Files:
slapd.inf.in
Log Message:
remove obsolete files
--- NEW FILE slapd.inf.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) 2001 Sun Microsystems, Inc. Used by permission.
# Copyright (C) 2007 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK
#
[General]
Name=@capbrand@ Directory Suite
Components=slapd
[slapd]
Name= @capbrand@ Directory Server
InstanceNamePrefix= Directory Server
NickName= slapd
Version= @PACKAGE_VERSION@
Compatible= 1.0
BuildNumber= @NQBUILD_NUM@
Description= @capbrand@ Directory Server
ProductName=Directory Server
Vendor= @vendor@
# the rest of these are obsolete, but left here for
# compatability with the old setuputil
Expires= 0
Security= domestic
IsDirLite=false
PrePreInstall= dsktune
PreInstall= ns-config
PostInstall= bin/slapd/admin/bin/ns-update
PreUninstall= bin/slapd/admin/bin/uninstall
PostUninstall=
Checked=True
Mandatory=False
IsLdap=True
16 years, 10 months
[Fedora-directory-commits] ldapserver Makefile.am, 1.44, 1.45 Makefile.in, 1.53, 1.54 builddsrpm.sh, 1.6, NONE ldapserver.spec.tmpl, 1.27, NONE
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14820/ldapserver
Modified Files:
Makefile.am Makefile.in
Removed Files:
builddsrpm.sh ldapserver.spec.tmpl
Log Message:
remove obsolete files
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.am,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- Makefile.am 19 Jun 2007 18:24:57 -0000 1.44
+++ Makefile.am 20 Jun 2007 22:08:38 -0000 1.45
@@ -231,7 +231,7 @@
init_SCRIPTS = wrappers/$(PACKAGE_NAME)
-inf_DATA = ldap/cm/newinst/slapd.inf
+inf_DATA = ldap/admin/src/slapd.inf
#////////////////////////////////////////////////////////////////
#
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.in,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- Makefile.in 19 Jun 2007 18:24:57 -0000 1.53
+++ Makefile.in 20 Jun 2007 22:08:38 -0000 1.54
@@ -1165,7 +1165,7 @@
$(srcdir)/ldap/admin/src/scripts/template-migrateTo7
init_SCRIPTS = wrappers/$(PACKAGE_NAME)
-inf_DATA = ldap/cm/newinst/slapd.inf
+inf_DATA = ldap/admin/src/slapd.inf
#////////////////////////////////////////////////////////////////
#
--- builddsrpm.sh DELETED ---
--- ldapserver.spec.tmpl DELETED ---
16 years, 10 months
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts setup-ds.pl.in, 1.1, 1.2
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14820/ldapserver/ldap/admin/src/scripts
Modified Files:
setup-ds.pl.in
Log Message:
remove obsolete files
Index: setup-ds.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/setup-ds.pl.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- setup-ds.pl.in 8 Jun 2007 01:09:16 -0000 1.1
+++ setup-ds.pl.in 20 Jun 2007 22:08:39 -0000 1.2
@@ -46,10 +46,11 @@
use Resource;
use DialogManager;
-my $setup = new Setup;
+my $res = new Resource("@propertydir(a)/setup-ds.res");
+
+my $setup = new Setup($res);
if (!$setup->{silent}) {
- my $res = new Resource("@propertydir(a)/setup-ds.res");
my $dialogmgr = new DialogManager($setup, $res, $TYPICAL);
require SetupDialogs;
@@ -68,8 +69,5 @@
}
system("@bindir(a)/ds_newinst.pl $setup->{inffile}");
-if (!$setup->{keep}) {
- unlink $setup->{inffile};
-}
$setup->doExit();
16 years, 10 months
[Fedora-directory-commits] adminserver/admserv/newinst/src ASDialogs.pm.in, 1.3, 1.4 AdminServer.pm.in, 1.1, 1.2 AdminUtil.pm.in, 1.2, 1.3 ConfigDSDialogs.pm, 1.3, 1.4 setup-ds-admin.pl.in, 1.3, 1.4 setup-ds-admin.res.in, 1.3, 1.4
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/adminserver/admserv/newinst/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22394/adminserver/admserv/newinst/src
Modified Files:
ASDialogs.pm.in AdminServer.pm.in AdminUtil.pm.in
ConfigDSDialogs.pm setup-ds-admin.pl.in setup-ds-admin.res.in
Log Message:
Resolves: bug 237356
Bug Description: Move DS Admin Code into Admin Server - support cacert for configds, fix permissions.
Reviewed by: nkinder (Thanks!)
Fix Description: If the Config DS is set up to use TLS/SSL, we should allow the admin to setup a new admin server to use TLS/SSL with the Config DS. The user may supply either a cacert file in ascii/pem format, or just set the CACertificate param in the .inf file to the actual ascii value. This latter option allows you to have a single .inf file that you can carry around to all of your servers that you want to set up, instead of having to have an additional file for the cacert.
However, it only works for the initial setup. It should probably detect if the cacert already exists and just use it if so.
File permissions need to be set correctly. The code that deals with file and directory creation should ensure that permissions are set properly. This mostly applies to the configdir, so that the config files needed to be read and written by the admin server have the correct permissions and ownership.
Also fixed a minor bug about changing the admin server port, and with detecting if there is an existing config ds to use or not.
Platforms tested: RHEL4
Flag Day: no
Doc impact: no
Index: ASDialogs.pm.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/ASDialogs.pm.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ASDialogs.pm.in 19 Jun 2007 18:32:28 -0000 1.3
+++ ASDialogs.pm.in 20 Jun 2007 16:35:02 -0000 1.4
@@ -75,6 +75,7 @@
my $port = $self->{manager}->{inf}->{admin}->{Port};
if (!defined($port)) {
$port = @admservport@;
+ $self->{manager}->{setup}->{asorigport} = $port;
}
if (!$self->{manager}->{setup}->{reconfigas}) {
if (!portAvailable($port)) {
Index: AdminServer.pm.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/AdminServer.pm.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AdminServer.pm.in 19 Jun 2007 18:32:28 -0000 1.1
+++ AdminServer.pm.in 20 Jun 2007 16:35:02 -0000 1.2
@@ -156,6 +156,36 @@
return 0;
}
+ # chown and chmod other files appropriately
+ for (glob("$configdir/*")) {
+ # these are owned by root
+ next if (/httpd.conf$/);
+ next if (/nss.conf$/);
+ next if (/admserv.conf$/);
+ # these should have been handled above
+ next if (/adm.conf$/);
+ next if (/admpw$/);
+ next if (/local.conf$/);
+ next if (! -f $_); # should never happen
+ # all other files should be owned by SysUser
+ $! = 0; # clear errno
+ chown $uid, -1, $_;
+ if ($!) {
+ $setup->msg($FATAL, 'error_chowning_file', $_,
+ $setup->{inf}->{admin}->{SysUser}, $!);
+ return 0;
+ }
+ # the files should be writable
+ $! = 0; # clear errno
+ my ($ignore, $ignore, $mode, @rest) = stat $_;
+ $mode &= 0700; # disallow access to non-owner
+ chmod $mode, $_;
+ if ($!) {
+ $setup->msg($FATAL, 'error_chmoding_file', $_, $!);
+ return 0;
+ }
+ }
+
return 1;
}
@@ -270,7 +300,7 @@
my $user = $admConf->{sysuser};
my $cmd = "@cgibindir@/config op=set configuration.nsSuiteSpotUser=\"$user\"";
- if ($origport && ($port != $origport)) {
+ if ($port != $origport) { # need to change the port number
$cmd .= " configuration.nsServerPort=\"$port\"";
}
if ($serverAddress) {
Index: AdminUtil.pm.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/AdminUtil.pm.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AdminUtil.pm.in 19 Jun 2007 18:32:28 -0000 1.2
+++ AdminUtil.pm.in 20 Jun 2007 16:35:02 -0000 1.3
@@ -39,8 +39,10 @@
package AdminUtil;
require Exporter;
@ISA = qw(Exporter);
-@EXPORT = qw(getAdmConf getConfigDSConn createConfigDS updateAdmConf updateAdmpw updateLocalConf);
-@EXPORT_OK = qw(getAdmConf getConfigDSConn createConfigDS updateAdmConf updateAdmpw updateLocalConf);
+@EXPORT = qw(getAdmConf getConfigDSConn createConfigDS updateAdmConf
+ updateAdmpw updateLocalConf importCACert);
+@EXPORT_OK = qw(getAdmConf getConfigDSConn createConfigDS updateAdmConf
+ updateAdmpw updateLocalConf importCACert);
# load perldap
use Mozilla::LDAP::Conn;
@@ -166,7 +168,7 @@
# first try anon bind
# 3 is LDAPv3 - 1 means use nspr
my $conn = new Mozilla::LDAP::Conn($h->{host}, $h->{port}, "", "",
- $certdir, 0, 3, 1);
+ $certdir);
my $errstr = "Success";
if ($conn) {
@@ -393,3 +395,54 @@
return 1;
}
+
+sub importCACert {
+ my $securitydir = shift;
+ my $cacert = shift; # may be a file or the actual cert in ascii/pem format
+ my @errs = (); # return
+
+ if (! -d $securitydir) {
+ @errs = ('securitydir_not_exist', $securitydir);
+ return @errs;
+ }
+
+ if (! -w $securitydir) {
+ @errs = ('securitydir_not_writable', $securitydir);
+ return @errs;
+ }
+
+ # see if "CA certificate" already exists
+ my $output = `certutil -L -d \"$securitydir\" 2>&1`;
+ if ($output =~ /CA certificate/) {
+ @errs = ('cacert_already_exists', $securitydir);
+ return @errs;
+ }
+
+ if ($cacert =~ /^-----BEGIN CERTIFICATE-----/) {
+ $! = 0;
+ $? = 0; # clear error indicators
+ if (!open(CERTUTIL, "|certutil -A -d \"$securitydir\" -a -t CT,, -n \"CA certificate\"")) {
+ @errs = ("error_running_certutil", $!);
+ return @errs;
+ }
+ print CERTUTIL $cacert, "\n";
+ close(CERTUTIL);
+ if ($?) {
+ @errs = ('error_return_certutil', $?, $!);
+ return @errs;
+ }
+ } elsif (! -f $cacert) {
+ @errs = ('cacertfile_not_found', $cacert);
+ return @errs;
+ } else {
+ $! = 0;
+ $? = 0; # clear error indicators
+ $output = `certutil -A -d \"$securitydir\" -a -t CT,, -n \"CA certificate\" -i \"$cacert\" 2>&1`;
+ if ($?) {
+ @errs = ('error_return2_certutil', $?, $!, $output);
+ return @errs;
+ }
+ }
+
+ return @errs;
+}
Index: ConfigDSDialogs.pm
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/ConfigDSDialogs.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ConfigDSDialogs.pm 19 Jun 2007 23:06:43 -0000 1.3
+++ ConfigDSDialogs.pm 20 Jun 2007 16:35:02 -0000 1.4
@@ -46,6 +46,8 @@
use Dialog;
use Util;
+use Mozilla::LDAP::API qw(ldap_explode_dn);
+
sub verifyConfigDSInfo {
my $self = shift;
my $url = $self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL};
@@ -57,7 +59,7 @@
return ('dialog_configdsinfo_nocacert');
}
if (!$self->{manager}->{inf}->{General}->{certdb}) {
- (@errs) = AdminUtil::importCACert($self->{manager}->{setup}->{configdir},
+ (@errs) = AdminUtil::importCACert($self->{manager}->{setup}->{configdir} . "/admin-serv",
$self->{manager}->{inf}->{General}->{CACertificate});
if (@errs) {
return @errs;
@@ -116,7 +118,9 @@
return $admindomain;
} else { # the CA cert
my $url = $self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL};
- if (($url !~ /^ldaps/) or $self->{manager}->{inf}->{General}->{certdb}) {
+ my $cert = $self->{manager}->{inf}->{General}->{CACertificate};
+ if (($url !~ /^ldaps/) or $self->{manager}->{inf}->{General}->{certdb} or
+ ($cert =~ /^-----BEGIN CERTIFICATE-----/)) {
# not using LDAPS, or already have a certdb - hide CA prompt
$self->{prompts}->[4]->[2] = 1;
} else {
@@ -159,7 +163,8 @@
$self->{manager}->{inf}->{General}->{AdminDomain} = $ans;
$res = $DialogManager::NEXT;
} else { # CA cert filename
- if ($ans && length($ans) && ! -f $ans) {
+ if ($ans && length($ans) &&
+ ($ans !~ /^-----BEGIN CERTIFICATE-----/) && ! -f $ans) {
$self->{manager}->alert("dialog_configdsinfo_ca_error", $ans);
} else {
$self->{manager}->{inf}->{General}->{CACertificate} = $ans;
@@ -192,7 +197,10 @@
if ($index == 0) { # return undef for password defaults
$id = $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminID};
if (!defined($id)) {
- $id = "admin"
+ $id = "admin";
+ } elsif (isValidDN($id)) { # must be a uid for this dialog
+ my @rdns = ldap_explode_dn($id, 1);
+ $id = $rdns[0];
}
}
return $id;
@@ -271,15 +279,19 @@
my $yes = $self->{"manager"}->getText("yes");
my $nno = $self->{"manager"}->getText("no");
my $ret = 0;
- if (!defined($self->{manager}->{inf}->{slapd}->{SlapdConfigForMC}) and
- !defined($self->{manager}->{inf}->{slapd}->{UseExistingMC})) {
- $ret = 0; # implicitly create the config ds
- } elsif (($yes =~ /^$self->{manager}->{inf}->{slapd}->{SlapdConfigForMC}/i) or
- !$self->{manager}->{inf}->{slapd}->{UseExistingMC}) {
+ if ((defined($self->{manager}->{inf}->{slapd}->{SlapdConfigForMC}) and
+ ($yes =~ /^$self->{manager}->{inf}->{slapd}->{SlapdConfigForMC}/i)) or
+ (defined($self->{manager}->{inf}->{slapd}->{UseExistingMC}) and
+ !$self->{manager}->{inf}->{slapd}->{UseExistingMC})) {
# we have to set up the directory server as the config ds
$self->{manager}->{inf}->{slapd}->{SlapdConfigForMC} = "yes";
$self->{manager}->{inf}->{slapd}->{UseExistingMC} = 0;
$ret = 0; # explicitly create the config ds
+ } elsif (defined($self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL})) {
+ $ret = 1; # use an existing config ds and register the servers with that one
+ } elsif (!defined($self->{manager}->{inf}->{slapd}->{SlapdConfigForMC}) and
+ !defined($self->{manager}->{inf}->{slapd}->{UseExistingMC})) {
+ $ret = 0; # implicitly create the config ds
} else {
$ret = 1; # use an existing config ds and register the servers with that one
if (exists($self->{manager}->{inf}->{slapd}->{SlapdConfigForMC})) {
Index: setup-ds-admin.pl.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/setup-ds-admin.pl.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- setup-ds-admin.pl.in 19 Jun 2007 18:32:28 -0000 1.3
+++ setup-ds-admin.pl.in 20 Jun 2007 16:35:02 -0000 1.4
@@ -128,14 +128,18 @@
}
}
-if (!$setup->{inf}->{slapd}->{UseExistingMC} or
- ($setup->{inf}->{slapd}->{SlapdConfigForMC} =~ /^yes/i)) {
- if (!$setup->{inf}->{General}->{ConfigDirectoryLdapURL}) {
- $setup->{inf}->{General}->{ConfigDirectoryLdapURL} =
- "ldap://" . $setup->{inf}->{General}->{FullMachineName} .
- ":" . $setup->{inf}->{slapd}->{ServerPort} .
- "/o=NetscapeRoot";
- }
+my $createconfigds;
+if ((defined($setup->{inf}->{slapd}->{SlapdConfigForMC}) and
+ ("yes" =~ /^$setup->{inf}->{slapd}->{SlapdConfigForMC}/i)) or
+ (defined($setup->{inf}->{slapd}->{UseExistingMC}) and
+ !$setup->{inf}->{slapd}->{UseExistingMC})) {
+ # if user has chosen to create the config ds, we must set
+ # the url appropriately, before writing the inf for ds_newinst
+ $setup->{inf}->{General}->{ConfigDirectoryLdapURL} =
+ "ldap://" . $setup->{inf}->{General}->{FullMachineName} .
+ ":" . $setup->{inf}->{slapd}->{ServerPort} .
+ "/o=NetscapeRoot";
+ $createconfigds = 1;
}
$setup->{inf}->write();
@@ -149,7 +153,7 @@
}
# setup directory server instance to be the configuration DS
-if ($setup->{inf}->{slapd}->{SlapdConfigForMC} =~ /yes/i) {
+if ($createconfigds) {
my @errs = ();
$setup->msg('create_configds');
if (!createConfigDS($setup->{inf}, \@errs)) {
Index: setup-ds-admin.res.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/setup-ds-admin.res.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- setup-ds-admin.res.in 19 Jun 2007 18:32:28 -0000 1.3
+++ setup-ds-admin.res.in 20 Jun 2007 16:35:02 -0000 1.4
@@ -94,6 +94,8 @@
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_chowning_file = Could not change ownership of file '%s' to userid '%s': Error: %s\n
+error_chmoding_file = Could not change permissions of file '%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
@@ -121,3 +123,11 @@
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
+
+securitydir_not_exist = The security file directory '%s' does not exist.\n
+securitydir_not_writable = The security file directory '%s' is not writable.\n
+cacertfile_not_found = The CA certificate file '%s' was not found.\n
+error_running_certutil = Could not run the certutil program to add the CA certificate. Error: %s\n
+error_return_certutil = The certutil program returned error code '%s' from attempting to add the CA certificate. Error: %s
+error_return2_certutil = The certutil program returned error code '%s' from attempting to add the CA certificate. Error: %s\nHere is the output of the command: %s
+cacert_already_exists = The certificate database in '%s' already contains a CA certificate. Please remove it first, or use the certutil program to add the CA certificate with a different name.\n
16 years, 10 months
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts Dialog.pm, 1.3, 1.4 DialogManager.pm, 1.3, 1.4 Setup.pm.in, 1.6, 1.7
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18222/ldapserver/ldap/admin/src/scripts
Modified Files:
Dialog.pm DialogManager.pm Setup.pm.in
Log Message:
Resolves: bug 237356
Description: Move DS Admin Code into Admin Server - navigation
Fix Description: Some minor cleanup:
1) Fixed navigation. Now you can go back through several dialogs.
2) Need to create a new Inf even if no file given
Platforms tested: RHEL4
Flag Day: No.
Doc impact: No.
Index: Dialog.pm
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Dialog.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Dialog.pm 15 Jun 2007 22:11:15 -0000 1.3
+++ Dialog.pm 20 Jun 2007 16:27:50 -0000 1.4
@@ -136,6 +136,7 @@
# you can set the 0 to a 1 if the user has chosen to use security
sub run {
my $self = shift;
+ my $direction = shift;
my $resp = $DialogManager::SAME;
# display the dialog text
@@ -181,6 +182,12 @@
}
} elsif ($resp == $DialogManager::ERR) {
last;
+ } elsif (!$self->isDisplayed() && ($direction < 0) &&
+ ($resp == $DialogManager::NEXT)) {
+ # we did not display this dialog, and the current navigation
+ # direction is BACK, so we should return BACK, to allow
+ # the user to go back through several dialogs
+ $resp = $DialogManager::BACK;
}
}
Index: DialogManager.pm
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DialogManager.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DialogManager.pm 19 Jun 2007 18:24:57 -0000 1.3
+++ DialogManager.pm 20 Jun 2007 16:27:50 -0000 1.4
@@ -206,7 +206,7 @@
my $dialog = $self->{dialogs}->[$index];
if ($dialog->isEnabled()) {
my $resp = $NEXT;
- $resp = $dialog->run();
+ $resp = $dialog->run($incr);
if ($resp == $BACK) {
$incr = -1;
} elsif ($resp == $NEXT) {
Index: Setup.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Setup.pm.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Setup.pm.in 20 Jun 2007 14:40:24 -0000 1.6
+++ Setup.pm.in 20 Jun 2007 16:27:50 -0000 1.7
@@ -135,6 +135,8 @@
# if user supplied inf file, use that to initialize
if (defined($self->{inffile})) {
$self->{inf} = new Inf($self->{inffile});
+ } else {
+ $self->{inf} = new Inf;
}
my $fh;
# create a temp inf file for writing for other processes
16 years, 10 months
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts Inf.pm, 1.2, 1.3 Setup.pm.in, 1.5, 1.6
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22246/ldapserver/ldap/admin/src/scripts
Modified Files:
Inf.pm Setup.pm.in
Log Message:
Resolves: bug 237356
Description: Move DS Admin Code into Admin Server - Inf, ds_newinst.pl
Fix Description: Some minor cleanup:
1) Setup must not write to the user supplied inf file. Setup uses the user supplied inf to initialize its cache, but creates a tempfile for writing.
2) When writing an Inf, preserve the continuation lines.
3) Added Noriko's fix for suffix generation to ds_newinst.pl
Platforms tested: RHEL4
Flag Day: No.
Doc impact: No.
Index: Inf.pm
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Inf.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Inf.pm 19 Jun 2007 18:24:57 -0000 1.2
+++ Inf.pm 20 Jun 2007 14:40:24 -0000 1.3
@@ -131,7 +131,9 @@
print $fh "[$name]\n";
for my $key (keys %{$section}) {
if (defined($section->{$key})) {
- print $fh "$key = ", $section->{$key}, "\n";
+ my $val = $section->{$key};
+ $val =~ s/\n/\\\n/g; # make continuation lines
+ print $fh "$key = $val\n";
}
}
}
Index: Setup.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Setup.pm.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Setup.pm.in 19 Jun 2007 23:24:58 -0000 1.5
+++ Setup.pm.in 20 Jun 2007 14:40:24 -0000 1.6
@@ -132,17 +132,17 @@
$self->{preonly} = $preonly;
$self->{logfile} = $logfile;
$self->{log} = new SetupLog($self->{logfile});
- if (!$self->{inffile}) {
- my ($fh, $filename) = tempfile("setupXXXXXX", UNLINK => !$keep,
- SUFFIX => ".inf", OPEN => 0,
- DIR => File::Spec->tmpdir);
- $self->{inffile} = $filename;
- $self->{inf} = new Inf;
- $self->{inf}->{filename} = $self->{inffile};
- } else {
+ # if user supplied inf file, use that to initialize
+ if (defined($self->{inffile})) {
$self->{inf} = new Inf($self->{inffile});
- $self->{keep} = 1; # do not delete user supplied inf file
}
+ my $fh;
+ # create a temp inf file for writing for other processes
+ # never overwrite the user supplied inf file
+ ($fh, $self->{inffile}) = tempfile("setupXXXXXX", UNLINK => !$keep,
+ SUFFIX => ".inf", OPEN => 0,
+ DIR => File::Spec->tmpdir);
+ $self->{inf}->{filename} = $self->{inffile};
# see if user passed in default inf values - also, command line
# arguments override those passed in via an inf file - this
@@ -157,6 +157,8 @@
}
}
+ # this is the base config directory - the directory containing
+ # the slapd-instance instance specific config directories
$self->{configdir} = $ENV{DS_CONFIG_DIR} || "@instconfigdir@";
$self = bless $self, $type;
16 years, 10 months
[Fedora-directory-commits] ldapserver/ldap/admin/src ds_newinst.pl.in, 1.9, 1.10
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22246/ldapserver/ldap/admin/src
Modified Files:
ds_newinst.pl.in
Log Message:
Resolves: bug 237356
Description: Move DS Admin Code into Admin Server - Inf, ds_newinst.pl
Fix Description: Some minor cleanup:
1) Setup must not write to the user supplied inf file. Setup uses the user supplied inf to initialize its cache, but creates a tempfile for writing.
2) When writing an Inf, preserve the continuation lines.
3) Added Noriko's fix for suffix generation to ds_newinst.pl
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.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ds_newinst.pl.in 19 Jun 2007 23:24:58 -0000 1.9
+++ ds_newinst.pl.in 20 Jun 2007 14:40:23 -0000 1.10
@@ -217,6 +217,7 @@
if (!$table{slapd}->{Suffix}) {
my $suffix = $table{General}->{FullMachineName};
# convert fqdn to dc= domain components
+ $suffix =~ s/^[^\.]*\.//; # just the domain part
$suffix = "dc=$suffix";
$suffix =~ s/\./, dc=/g;
$table{slapd}->{Suffix} = $suffix;
16 years, 10 months