[Fedora-directory-commits] adminserver/admserv/newinst/src AdminUtil.pm.in, NONE, 1.1 configdsroot.map.in, NONE, 1.1 ConfigDSDialogs.pm, NONE, 1.1 ASDialogs.pm.in, 1.1, 1.2 admin.inf.in, 1.1, 1.2 register_server.pl.in, 1.1, 1.2 setup-ds-admin.pl.in, 1.1, 1.2 setup-ds-admin.res.in, 1.1, 1.2

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Fri Jun 15 22:16:30 UTC 2007


Author: rmeggins

Update of /cvs/dirsec/adminserver/admserv/newinst/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6427/adminserver/admserv/newinst/src

Modified Files:
	ASDialogs.pm.in admin.inf.in register_server.pl.in 
	setup-ds-admin.pl.in setup-ds-admin.res.in 
Added Files:
	AdminUtil.pm.in configdsroot.map.in ConfigDSDialogs.pm 
Log Message:
Resolves: bug 237356
Bug Description: Move DS Admin Code into Admin Server
Reviewed by: nhosoi (Thanks!)
Fix Description: Move the code out of register_servers.pl in to the DS Util.pm module.
Added the ConfigDSDialogs.
Added code to create the Config DS based on the register_servers code.
Platforms tested: RHEL4
Flag Day: no
Doc impact: Yes, along with the rest of the new setup stuff.



--- NEW FILE AdminUtil.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 AdminUtil;
require Exporter;
@ISA       = qw(Exporter);
@EXPORT    = qw(getConf createConfigDS);
@EXPORT_OK = qw(getConf createConfigDS);

# 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;

# 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;
    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
                }
            }
        }
        close ADMCONF;
        $ret->{configdir} = $dir;
    }

    return $ret;
}

# pset info is from the local.conf file, also in LDIF format
sub getPset {
    my $admConf = shift;
    my $ret = {};
    my $fname = "$admConf->{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) {
            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
                }
            }
        }
        close LOCALCONF;
    }

    return $ret;
}

sub getAdmpw {
    my $admConf = shift;
    my $ret = {};
    my $fname = "$admConf->{configdir}/admpw";
    if (-f $fname) {
        open( ADMPW, "$fname" ) || die "Can't open $fname: $!";
        while (my $line = <ADMPW>) {
            ($ret->{ServerAdminID}, $ret->{ServerAdminPwd}) = split /:/;
            last;
        }
        close ADMPW;
    }

    return $ret;
}

sub getCertDir {
    my $configdir = shift;
    # for now, same as admin server config dir
    return "$configdir/admin-serv";
}

sub getConfigDSConn {
    my $url = shift;
    my $id = shift;
    my $pwd = shift;
    my $configdir = shift;
    my $errs = shift; # for output errs - an array ref
    my $certdir;

    my $h = ldap_url_parse($url);
    my $host = $h->{host};
    my $port = $h->{port};
    my $basedn = $h->{dn};
    if ($h->{options} & LDAP_URL_OPT_SECURE) {
        $certdir = getCertDir($configdir);
    }

    # 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);

    my $errstr = "Success";
    if ($conn) {
        $errstr = $conn->getErrorString();
    }
    if (!$conn or ($errstr ne "Success")) {
        if ($conn) {
            $conn->close();
            $conn = 0;
        }
        push @{$errs}, 'configds_open_error', $url, (($errstr eq "Success") ? 'unknown error' : $errstr);
        return $conn;
    }

    # if $id is not a dn, look up the dn
    if ($id !~ /=/) {
        my $ent = $conn->search($h->{dn}, "sub", "(uid=$id)", 1, 'dn');
        $errstr = $conn->getErrorString();
        if (!$ent or ($errstr ne "Success")) {
            $conn->close();
            $conn = 0;
            push @{$errs}, 'configds_finddn_error', $id, $url, (($errstr eq "Success") ? 'unknown error' : $errstr);
            return $conn;
        }
        $id = $ent->getDN();
    }

    if (!$conn->simpleAuth($id, $pwd)) {
        $errstr = $conn->getErrorString();
        $conn->close();
        $conn = 0;
        if ($errstr =~ /constraint/i) {
            push @{$errs}, 'configds_bindretry_error', $id, $url;
        } else {
            push @{$errs}, 'configds_bind_error', $id, $url, (($errstr eq "Success") ? 'unknown error' : $errstr);
        }
    }

    return $conn;
}

sub verifyAdminDomain {
    my $conn = shift;
    my $url = shift;
    my $domain = shift;

    my $h = ldap_url_parse($url);
    my $dn = "ou=$domain, $h->{dn}";
    my $ent = $conn->search($dn, "base", "(objectclass=*)", 1, 'dn');
    my $errstr = $conn->getErrorString();
    if (!$ent or ($errstr ne "Success")) {
        return ('configds_no_admindomain', $domain, $h->{dn}, (($errstr eq "Success") ? 'unknown error' : $errstr));
    }
    return ();
}

# Take the slapd server instance specified in the slapd section of the given inf
# and make it into a configuration directory server
sub createConfigDS {
    my $inf = shift;
    my $res = 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});

    # add the NetscapeRoot suffix
    my @errs = addSuffix($conn, "o=NetscapeRoot", "NetscapeRoot");
    if (@errs) {
        print $res->getText(@errs);
        $conn->close();
        return 0;
    }

    # add the o=NetscapeRoot tree using the mapper and ldif templates
    my @ldiffiles = ('@ldifdir@/01nsroot.ldif.tmpl',
                     '@ldifdir@/02globalpreferences.ldif.tmpl'
                     );
    my $setupinf = new Inf("@infdir@/setup.inf");
    my $admininf = new Inf("@infdir@/admin.inf");
    my $dsinf = new Inf("@infdir@/slapd.inf");
    my $mapper = new Inf("@infdir@/configdsroot.map");

    $mapper = process_maptbl($mapper, ($inf, $dsinf, $admininf, $setupinf));
    if (!$mapper) {
        $conn->close();
        print $res->getText('error_creating_configds_maptbl');
        return 0;
    }

    getMappedEntries($mapper, \@ldiffiles, \&check_and_add_entry,
                     [$conn, 1]);

    $conn->close();
    return 1;
}


--- NEW FILE configdsroot.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
#
# Use this map with 01nsroot.ldif.tmpl and 02globalpreferences.ldif.tmpl, to
# set up a directory server to be a Configuration Directory Server.  This map
# tells how to replace %...% tokens in those ldif.tmpl files.
#
# [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
uname_a =		`open(UNAMEA, "uname -a |"); $returnvalue = <UNAMEA>; chomp $returnvalue; close(UNAMEA);`
uname_m =		`open(UNAMEM, "uname -m |"); $returnvalue = <UNAMEM>; chomp $returnvalue; close(UNAMEM);`
configroot =	"CONFIG ROOT -- replace me"

as_uid =	 	ServerAdminID
as_passwd =		ServerAdminPwd
asid =		`use Net::Domain qw(hostname); $returnvalue = hostname();`
as_version =	Version

ds_version =	Version
ds_port =		ServerPort
ds_secure_port ="636"
ds_suffix =		Suffix

ds_console_jar ="%normbrand%-ds-%ds_version%.jar"


--- NEW FILE ConfigDSDialogs.pm ---
# 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 ConfigDSDialogs;

use strict;

use Net::Domain qw(hostfqdn);
use DialogManager;
use Setup;
use Dialog;
use Util;

sub verifyConfigDSInfo {
    my $self = shift;
    my $url = $self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL};
    my $certdir;
    my @errs;
    if ($url =~ /^ldaps/) {
        if (!$self->{manager}->{inf}->{General}->{certdb} and
            !$self->{manager}->{inf}->{General}->{CACertificate}) {
            return ('dialog_configdsinfo_nocacert');
        }
        if (!$self->{manager}->{inf}->{General}->{certdb}) {
            (@errs) = AdminUtil::importCACert($self->{manager}->{setup}->{configdir},
                                              $self->{manager}->{inf}->{General}->{CACertificate});
            if (@errs) {
                return @errs;
            }
        }
    }
    my $conn = AdminUtil::getConfigDSConn($url,
                                          $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminID},
                                          $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminPwd},
                                          $self->{manager}->{setup}->{configdir}, \@errs);
    if (@errs or !$conn) {
        $conn->close() if ($conn);
        return @errs if (@errs);
        return ('dialog_configdsinfo_unreachable', $url);
    }

    (@errs) = AdminUtil::verifyAdminDomain($conn, $url,
                                           $self->{manager}->{inf}->{General}->{AdminDomain});

    $conn->close();

    return @errs;
}

my $configdsinfo = new Dialog (
    $TYPICAL,
    'dialog_configdsinfo_text',
    sub {
        my $self = shift;
        my $index = shift;
        if ($index == 0) { # the url
            my $url = $self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL};
            if (!defined($url)) {
                my $host = $self->{manager}->{inf}->{General}->{FullMachineName} ||
                    hostfqdn;
                my $port = $self->{manager}->{inf}->{slapd}->{ServerPort} || 389;
                if (!portAvailable($port)) {
                    $port = getAvailablePort();
                }
                my $suffix = "o=NetscapeRoot";
                $url = "ldap://$host:$port/$suffix";
            }
            return $url;
        } elsif ($index == 1) { # the id
            return $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminID} ||
                "admin";
        } elsif ($index == 2) { # the password
            return undef;
        } elsif ($index == 3) { # admin domain
            my $admindomain = $self->{manager}->{inf}->{General}->{AdminDomain};
            if (!defined($admindomain)) {
                $admindomain = $self->{manager}->{inf}->{General}->{FullMachineName} ||
                    hostfqdn;
                $admindomain =~ s/^.*\.//; # just the domain part
            }
            return $admindomain;
        } else { # the CA cert
            my $url = $self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL};
            if (($url !~ /^ldaps/) or $self->{manager}->{inf}->{General}->{certdb}) {
                # not using LDAPS, or already have a certdb - hide CA prompt
                $self->{prompts}->[4]->[2] = 1;
            } else {
                $self->{prompts}->[4]->[2] = 0; # unhide CA prompt
            }
            return $self->{manager}->{inf}->{General}->{CACertificate};
        }
    },
    sub {
        my $self = shift;
        my $ans = shift;
        my $index = shift;
        my $res = $DialogManager::SAME;
        if ($index == 0) {
            # validate URL?
            $self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL} = $ans;
            my $url = $self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL};
            if (($url !~ /^ldaps/) or $self->{manager}->{inf}->{General}->{certdb}) {
                # not using LDAPS, or already have a certdb - hide CA prompt
                $self->{prompts}->[4]->[2] = 1;
            } else {
                $self->{prompts}->[4]->[2] = 0; # unhide CA prompt
            }
            $res = $DialogManager::NEXT;
        } elsif ($index == 1) { # id
            $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminID} = $ans;
            $res = $DialogManager::NEXT;
        } elsif ($index == 2) { # pwd
            my $test = $ans;
            if ($test) {
                $test =~ s/\s//g;
            }
            if (!$ans or (length($test) != length($ans))) {
                $self->{manager}->alert("dialog_configdsadmin_invalid");
            } else {
                $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminPwd} = $ans;
                $res = $DialogManager::NEXT;
            }
        } elsif ($index == 3) { # admin domain
            $self->{manager}->{inf}->{General}->{AdminDomain} = $ans;
            $res = $DialogManager::NEXT;
        } else { # CA cert filename
            if ($ans && length($ans) && ! -f $ans) {
                $self->{manager}->alert("dialog_configdsinfo_ca_error", $ans);
            } else {
                $self->{manager}->{inf}->{General}->{CACertificate} = $ans;
                $res = $DialogManager::NEXT;
            }
        }

        if (($index == 4) && ($res == $DialogManager::NEXT)) {
            my (@text) = verifyConfigDSInfo($self);
            if (@text) {
                $self->{manager}->alert(@text);
                $self->{manager}->alert('dialog_configdsinfo_tryagain');
               $res = $DialogManager::FIRST;
            }
        }
        return $res;
    },
    ['dialog_configdsinfo_url_prompt'], ['dialog_configdsinfo_id_prompt'],
    ['dialog_configdsinfo_pwd_prompt', 1], ['dialog_configdsinfo_domain_prompt'],
    ['dialog_configdsinfo_ca_prompt']
);

my $configdsadmin = new Dialog (
    $EXPRESS,
    'dialog_configdsadmin_text',
    sub {
        my $self = shift;
        my $index = shift;
        my $id;
        if ($index == 0) { # return undef for password defaults
            $id = $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminID};
            if (!defined($id)) {
                $id = "admin"
            }
        }
        return $id;
    },
    sub {
        my $self = shift;
        my $ans = shift;
        my $index = shift;
        my $res = $DialogManager::SAME;
        if ($index == 0) { # verify DN
            if (($ans =~ /[\x00-\x20\x22\x2b\x2c\x3d\x5c\x7f\x80-\xff]/) && !isValidDN($ans)) {
                $self->{manager}->alert("dialog_configdsadmin_error", $ans);
            } else {
                $res = $DialogManager::NEXT;
                $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminID} = $ans;
            }
        } elsif ($index == 1) { # verify initial password
            my $test = $ans;
            if ($test) {
                $test =~ s/\s//g;
            }
            if (!$ans or (length($test) != length($ans))) {
                $self->{manager}->alert("dialog_configdsadmin_invalid");
            } else {
                $res = $DialogManager::NEXT;
                $self->{firstpassword} = $ans; # save for next index
            }
        } elsif ($index == 2) { # verify second password
            if ($ans ne $self->{firstpassword}) {
                $self->{manager}->alert("dialog_configdsadmin_nomatch");
            } else {
                $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminPwd} = $ans;
                $res = $DialogManager::NEXT;
            }
        }
        return $res;
    },
    ['dialog_configdsadmin_prompt'], ['dialog_configdsadmin_pw1_prompt', 1], ['dialog_configdsadmin_pw2_prompt', 1]
);

my $configdsadmindomain = new Dialog (
    $TYPICAL,
    'dialog_configdsadmindomain_text',
    sub {
        my $self = shift;
        my $admindomain = $self->{manager}->{inf}->{General}->{AdminDomain};
        if (!defined($admindomain)) {
            $admindomain = $self->{manager}->{inf}->{General}->{FullMachineName} ||
                hostfqdn;
            $admindomain =~ s/^.*\.//; # just the domain part
        }
        return $admindomain;
    },
    sub {
        my $self = shift;
        my $ans = shift;
        my $res = $DialogManager::SAME;
        if ($ans =~ /[\x00-\x20\x22\x2b\x2c\x3d\x5c\x7f\x80-\xff]/) {
            $self->{manager}->alert("dialog_configdsadmindomain_error", $ans);
        } elsif (isValidDN($ans)) {
            $self->{manager}->alert("dialog_configdsadmindomain_notadn", $ans);
        } else {
            $res = $DialogManager::NEXT;
            $self->{manager}->{inf}->{General}->{AdminDomain} = $ans;
        }
        return $res;
    },
    ['dialog_configdsadmindomain_prompt']
);

my $useconfigds = new DialogYesNo (
    $TYPICAL,
    'dialog_useconfigds_text',
    sub {
        my $self = shift;
        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}) {
            # 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
        } else {
            $ret = 1; # use an existing config ds and register the servers with that one
            if (exists($self->{manager}->{inf}->{slapd}->{SlapdConfigForMC})) {
                delete $self->{manager}->{inf}->{slapd}->{SlapdConfigForMC};
            }
            $self->{manager}->{inf}->{slapd}->{UseExistingMC} = 1;
        }
        return $ret;
    },
    sub {
        my $self = shift;
        my $ans = shift;
        my $res = $self->handleResponse($ans);
        if ($res == $DialogManager::NEXT) {
            if ($self->isYes()) {
                if (exists($self->{manager}->{inf}->{slapd}->{SlapdConfigForMC})) {
                    delete $self->{manager}->{inf}->{slapd}->{SlapdConfigForMC};
                }
                $self->{manager}->{inf}->{slapd}->{UseExistingMC} = 1;
                $configdsinfo->enable(); # use it
                $configdsadmin->disable();
                $configdsadmindomain->disable();
            } else {
                $self->{manager}->{inf}->{slapd}->{SlapdConfigForMC} = "yes";
                $self->{manager}->{inf}->{slapd}->{UseExistingMC} = 0;
                $configdsinfo->disable(); # ignore it
                $configdsadmin->enable();
                $configdsadmindomain->enable();
            }
        }
        return $res;
    },
    ['dialog_useconfigds_prompt'],
);

sub getDialogs {
    return ($useconfigds, $configdsinfo, $configdsadmin, $configdsadmindomain);
}

1;


Index: ASDialogs.pm.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/ASDialogs.pm.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ASDialogs.pm.in	8 Jun 2007 22:49:18 -0000	1.1
+++ ASDialogs.pm.in	15 Jun 2007 22:16:28 -0000	1.2
@@ -45,6 +45,28 @@
 use Dialog;
 use Util;
 
+my $asserveradmin = new Dialog (
+    $SILENT, # hidden
+    'none',
+    sub {
+        my $self = shift;
+        my $id = $self->{manager}->{inf}->{admin}->{ServerAdminID} ||
+            $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminID};
+        if (isValidDN($id)) {
+            $id =~ s/^(.*)=.*/$1/;
+        }
+        $self->{manager}->{inf}->{admin}->{ServerAdminID} = $id;
+        my $pwd = $self->{manager}->{inf}->{admin}->{ServerAdminPwd} ||
+            $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminPwd};
+        $self->{manager}->{inf}->{admin}->{ServerAdminPwd} = $pwd;
+        return $id;
+    },
+    sub {
+        return $DialogManager::NEXT;
+    },
+    ['none']
+);
+
 my $asport = new Dialog (
     $TYPICAL,
     'dialog_asport_text',
@@ -86,7 +108,11 @@
     sub {
         my $self = shift;
         my $ans = shift;
-        $self->{manager}->{inf}->{admin}->{ServerIpAddress} = shift;
+        if ($ans && (length($ans) > 0)) {
+            $self->{manager}->{inf}->{admin}->{ServerIpAddress} = $ans;
+        } elsif (exists($self->{manager}->{inf}->{admin}->{ServerIpAddress})) {
+            delete $self->{manager}->{inf}->{admin}->{ServerIpAddress};
+        }
         return $DialogManager::NEXT;
     },
     ['dialog_ashostip_prompt']
@@ -154,7 +180,7 @@
 );
 
 sub getDialogs {
-    return ($asport, $ashostip, $assysuser);
+    return ($asserveradmin, $asport, $ashostip, $assysuser);
 }
 
 1;


Index: admin.inf.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/admin.inf.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- admin.inf.in	15 May 2007 00:30:49 -0000	1.1
+++ admin.inf.in	15 Jun 2007 22:16:28 -0000	1.2
@@ -26,6 +26,7 @@
 [admin]
 Name= @capbrand@ Administration Server
 Brand= @capbrand@
+NormBrand = @brand@
 Vendor=@vendor@
 Version= @PACKAGE_VERSION@
 NickName= admin


Index: register_server.pl.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/register_server.pl.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- register_server.pl.in	13 Jun 2007 17:48:35 -0000	1.1
+++ register_server.pl.in	15 Jun 2007 22:16:28 -0000	1.2
@@ -1,3 +1,4 @@
+#!/usr/bin/env perl
 # 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
@@ -54,351 +55,15 @@
 # <ldiffile> ...: ldif file(s) or template ldif file(s) to be stored in 
 #                 the Configuration Directory Server
 
+use lib "@perldir@";
+
 use Getopt::Std;
 use Net::Domain qw(hostname);
 # PERLDAP modules
 use Mozilla::LDAP::Conn;
-use Mozilla::LDAP::Entry;
 # Setup Inf module
 use Inf;
-
-# process map table
-# [map table sample]
-# fqdn =	FullMachineName
-# hostname =	`use Sys::Hostname; $returnvalue = hostname();`
-# ds_console_jar ="%normbrand%-ds-%ds_version%.jar"
-#
-# * 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., @admin_confdir@) 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.
-sub process_maptbl
-{
-	($mapper, @infdata) = @_;
-
-	foreach $section (keys %{$mapper})
-	{
-		my $thissection = \%{%{$mapper}->{$section}};
-		foreach $key (keys %{$thissection})
-		{
-			my $value = $thissection->{$key};
-			if ($value =~ /^\"/)
-			{
-				$value =~ tr/\"//d;
-				$thissection->{$key} = $value;
-			}
-			elsif ($value =~ /^\`/)
-			{
-				$value =~ tr/\`//d;
-				eval $value;
-				$thissection->{$key} = $returnvalue;
-			}
-			else
-			{
-				my $infsection;
-				foreach my $thisinf (@infdata)
-				{
-					foreach my $section0 (keys %{$thisinf})
-					{
-						$infsection = \%{%{$thisinf}->{$section0}};
-						if ("" ne $infsection->{$value})
-						{
-							$thissection->{$key} = $infsection->{$value};
-							goto nextkey;
-						}
-					}
-				}
-				if ("" eq $infsection->{$value})
-				{
-					print "ERROR: $value not found in the .inf files\n";
-					return NULL;
-				}
-			}
-nextkey:
-		}
-	}
-	return $mapper;
-}
-
-# delete the subtree starting from the passed entry
-sub delete_all
-{
-	my ($conn, $bentry) = @_;
-	my $sentry = $conn->search($bentry->{dn},
-							   "subtree", "(objectclass=*)", 0, ("dn"));
-	while ($sentry) {
-		push @mystack, ($sentry);
-		$sentry = $conn->nextEntry();
-	}
-	# reverse order
-	my $myentry = pop @mystack;
-	while ($myentry) {
-		$conn->delete($myentry->{dn});
-		$rc = $conn->getErrorCode();
-		if ( $rc ne 0 ) {
-			$conn->printError();
-			print "ERROR: unable to delete entry, error code: $rc\n";
-			return 1;
-		}
-		$myentry = pop @mystack;
-	}
-	return 0;
-}
-
- at ignorelist = (
-	"modifyTimestamp",
-	"createTimestamp",
-	"installationTimestamp",
-	"creatorsName",
-	"modifiersName",
-	"numSubordinates"
-);
-
- at speciallist = (
-	"uniqueMember"
-);
-
-sub is_in_array
-{
-	my ($val, $array) = @_;
-	foreach my $elem ($array)
-	{
-		if ( lc($val) eq lc($elem) )
-		{
-			return 1;
-		}
-	}
-	return 0;
-}
-
-# compare 2 entries
-# return 0 if they match 100% (exception: @ignorelist).
-# return 1 if they match except @speciallist.
-# return -1 if they do not match.
-sub comp_entries
-{
-	my ($e0, $e1) = @_;
-	$rc = 0;
-	foreach $akey ( keys %{$e0} )
-	{
-		next if ( 1 == is_in_array($akey, @ignorelist) );
-		$aval0 = $e0->{$akey};
-		$aval1 = $e1->{$akey};
-		my $amin;
-		my $amax;
-		if ( $#aval0 != $#aval1 )
-		{
-			if ( 1 == is_in_array($akey, @speciallist) )
-			{
-				$rc = 1;
-				if ( $#aval0 < $#aval1 )
-				{
-					$amin = $#aval0;
-					$amax = $#aval1;
-				}
-				else
-				{
-					$amin = $#aval1;
-					$amax = $#aval0;
-				}
-			}
-			else
-			{
-				$rc = -1;
-				return $rc;
-			}
-		}
-		@sval0 = sort { $a cmp $b } @{$aval0};
-		@sval1 = sort { $a cmp $b } @{$aval1};
-		for ( my $i = 0; $i <= $amin; $i++ )
-		{
-			my $isspecial = -1;
-			if ( $sval0[$i] ne $sval1[$i] )
-			{
-				if ( 0 > $isspecial )
-				{
-					$isspecial = is_in_array($akey, @speciallist);
-				}
-				if ( $isspecial )
-				{
-					$rc = 1;
-				}
-				else
-				{
-					$rc = -1;
-					return $rc;
-				}
-			}
-		}
-	}
-	return $rc;
-}
-
-# if the entry does not exist on the server, add the entry.
-# otherwise, do nothing
-sub check_and_add_entry
-{
-	my ($conn, $aentry) = @_;
-	my $sentry = $conn->search($aentry->{dn}, "base", "(objectclass=*)");
-	do
-	{
-		my $needtoadd = 1;
-		my $needtomod = 0;
-		my $rval = -1;
-		if ( NULL != $sentry && !$confds_fresh )
-		{
-			$rval = comp_entries( $sentry, $aentry );
-		}
-		if ( 0 == $rval && !$confds_fresh )
-		{
-			# the identical entry exists on the configuration DS.
-			# no need to add the entry.
-			$needtoadd = 0;
-			goto out;
-		}
-		elsif ( 1 == $rval && !$confds_fresh )
-		{
-			$needtoadd = 0;
-			$needtomod = 1;
-		}
-		elsif ( NULL != $sentry && "" ne $sentry->{dn} )
-		{
-			# $confds_fresh || $rval == -1
-			# an entry having the same DN exists, but the attributes do not
-			# match.  remove the entry and the subtree underneath.
-			if ( $confds_verbose )
-			{
-				print "Deleting an entry dn: $sentry->{dn} ...\n";
-			}
-			$rval = delete_all($conn, $sentry);
-			if ( 0 != $rval )
-			{
-				return 1;
-			}
-		}
-
-		if ( 1 == $needtoadd )
-		{
-			$conn->add($aentry);
-			my $rc = $conn->getErrorCode();
-			if ( $rc != 0 )
-			{
-				print "ERROR: adding an entry $aentry->{dn} failed, error code: $rc\n";
-				print "[entry]\n";
-				$aentry->printLDIF();
-				$conn->close();
-				return 1;
-			}
-#			if ( $confds_verbose )
-#			{
-#				print "Entry $aentry->{dn} is added\n";
-#			}
-		}
-		elsif ( 1 == $needtomod )	# $sentry exists
-		{
-			foreach $attr ( @speciallist )
-			{
-				foreach $nval ( @{$aentry->{$attr}} )
-				{
-					$sentry->addValue( $attr, $nval );
-				}
-			}
-			$conn->update($sentry);
-			my $rc = $conn->getErrorCode();
-			if ( $rc != 0 )
-			{
-				print "ERROR: updating an entry $sentry->{dn} failed, error code: $rc\n";
-				print "[entry]\n";
-				$aentry->printLDIF();
-				$conn->close();
-				return 1;
-			}
-		}
-		if ( NULL != $sentry )
-		{
-			$sentry = $conn->nextEntry();	# supposed to have no more entries
-		}
-	} until ( NULL == $sentry );
-out:
-	return 0;
-}
-
-# register server info from the template ldif files
-sub register_serverinfo
-{
-	my ($conn, $mapper, @ldiffiles) = @_;
-	my $thissection = \%{%{$mapper}->{""}};
-
-	foreach my $ldiffile (@ldiffiles)
-	{
-		open(MYLDIF, "< $ldiffile") or die "Can't open $ldiffile : $!";
-		if ( $confds_verbose )
-		{
-			print "Processing $ldiffile ...\n";
-		}
-		my $entry = NULL;
-		while ( my $l = <MYLDIF> )
-		{
-			chop $l;
-			if ( "$l" eq "" )
-			{
-				next if ( NULL == $entry );
-				check_and_add_entry($conn, $entry);
-				$entry->DESTROY();
-				$entry = NULL;
-			}
-			elsif ( "$l" =~ /^dn:/ )
-			{
-				$entry = new Mozilla::LDAP::Entry();
-				my ($h, $dn) = split(/: /, $l, 2);
-				# Need to repeat to handle nested subst
-				my $origdn = $dn;
-				while ( $dn =~ /%([A-Za-z_]+)%/ )
-				{
-					$dn =~ s{%([A-Za-z_]+)%}{$thissection->{$1} || "SERVER_INFO_NOTFOUND"}ge;
-				}
-				if ( $dn =~ /SERVER_INFO_NOTFOUND/ )
-				{
-					print "ERROR: \"$origdn\" mapped to \"$dn\".\n";
-					print "Make sure that %value% replaced by SERVER_INFO_NOTFOUND exists in $mapfile.\n";
-					return 1;
-				}
-				$entry->setDN($dn);
-			}
-			else
-			{
-				my ($key, $value) = split(/: /, $l, 2);
-				# Need to repeat to handle nested subst
-				my $origvalue = $value;
-				while ( $value =~ /%([A-Za-z_]+)%/ )
-				{
-					$value =~ s{%([A-Za-z_]+)%}{$thissection->{$1} || "SERVER_INFO_NOTFOUND"}ge;
-				}
-				if ( $value =~ /SERVER_INFO_NOTFOUND/ )
-				{
-					print "ERROR: \"$origvalue\" mapped to \"$value\"\n";
-					print "Make sure that %value% replaced by SERVER_INFO_NOTFOUND exists in $mapfile.\n";
-					return 1;
-				}
-				$entry->addValue( $key, "$value" )
-			}
-		}
-		close(MYLDIF);
-		if ( NULL != $entry )
-		{
-			check_and_add_entry($conn, $entry);
-			$entry->DESTROY();
-			$entry = NULL;
-		}
-	}
-
-	return 0;
-}
+use Util;
 
 $USAGE = 
 "$0 [ -Fv ] [ -h <host> ] [ -p <port> ] [ -D <rootdn> ] \
@@ -434,7 +99,7 @@
 $confds_host = $opt_h;
 if ( "" eq $confds_host )
 {
-	$confds_host = hostname();
+	$confds_host = hostfqdn();
 }
 $confds_port = $opt_p;
 if ( "" eq $confds_port )
@@ -528,9 +193,9 @@
 		exit 1;
 	}
 
-	# register server info
-	my $rc = register_serverinfo($conn, $mapper, @ldiffiles);
-	if ( 0 != $rc )
+	my @ents = getMappedEntries($mapper, \@ldiffiles, \&check_and_add_entry,
+                                [$conn, $confds_fresh, $confds_verbose]);
+	if ( @ents )
 	{
 		print "ERROR: failed to register server info\n";
 		return 1;


Index: setup-ds-admin.pl.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/setup-ds-admin.pl.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- setup-ds-admin.pl.in	8 Jun 2007 22:49:18 -0000	1.1
+++ setup-ds-admin.pl.in	15 Jun 2007 22:16:28 -0000	1.2
@@ -46,22 +46,77 @@
 use Inf;
 use Resource;
 use DialogManager;
+use AdminUtil;
 
 my $setup = new Setup;
 
+my $res = new Resource("@propertydir@/setup-ds.res",
+                       "@propertydir@/setup-ds-admin.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});
+
+# set defaults
+if ($admConf && %{$admConf}) {
+    $setup->{inf}->{General}->{ConfigDirectoryLdapURL} = $admConf->{ldapurl};
+    $setup->{inf}->{General}->{ConfigDirectoryAdminID} = $admConf->{userdn};
+    $setup->{inf}->{General}->{AdminDomain} = $admConf->{AdminDomain};
+    $setup->{inf}->{General}->{SuiteSpotUserID} = $admConf->{SuiteSpotUserID};
+    $setup->{inf}->{General}->{SuiteSpotGroup} = $admConf->{SuiteSpotGroup};
+
+    $setup->{inf}->{admin}->{SysUser} = $admConf->{sysuser};
+    # 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"};
+    }
+    my $admpw = AdminUtil::getAdmpw($admConf);
+    if ($admpw && %{$admpw}) {
+        $setup->{inf}->{admin}->{ServerAdminID} = $admpw->{ServerAdminID};
+        $setup->{inf}->{admin}->{ServerAdminPwd} = $admpw->{ServerAdminPwd};
+    }
+
+    # default to using the existing config DS
+    $setup->{inf}->{slapd}->{UseExistingMC} = 1;
+    $setup->{inf}->{slapd}->{SlapdConfigForMC} = 0;
+}
+
 if (!$setup->{silent}) {
-    my $res = new Resource("@propertydir@/setup-ds.res",
-                           "@propertydir@/setup-ds-admin.res");
     my $dialogmgr = new DialogManager($setup, $res, $TYPICAL);
 
     require SetupDialogs;
     require DSDialogs;
+    require ConfigDSDialogs;
     require ASDialogs;
 
     my @dialogs = SetupDialogs->getDialogs();
+    push @dialogs, ConfigDSDialogs->getDialogs();
     push @dialogs, DSDialogs->getDialogs();
     push @dialogs, ASDialogs->getDialogs();
 
+    my $readytoproceed = new DialogYesNo (
+        $EXPRESS,
+        'dialog_readytoproceed_text',
+        1,
+        sub {
+            my $self = shift;
+            my $ans = shift;
+            my $res = $self->handleResponse($ans);
+            if ($res == $DialogManager::NEXT) {
+                if (!$self->isYes()) {
+                    $res = $DialogManager::BACK;
+                }
+            }
+            return $res;
+        },
+        ['dialog_readytoproceed_prompt'],
+    );
+    push @dialogs, $readytoproceed;
+
     $dialogmgr->addDialog(@dialogs);
 
     my $rc = $dialogmgr->run();
@@ -69,24 +124,34 @@
         $setup->doExit();
     }
 
-# these values are currently missing - have no UI support - ServerAdminID and Pwd
-# are supposed to be derived from ConfigDirectoryAdminID and Pwd
-#     $setup->{inf}->{admin}->{ServerAdminID} = "admin";
-#     $setup->{inf}->{admin}->{ServerAdminPwd} = "admin";
-#     $setup->{inf}->{General}->{ConfigDirectoryLdapURL} = "ldap://localhost.localdomain:1100/o=NetscapeRoot";
-#     $setup->{inf}->{General}->{ConfigDirectoryAdminID} = "admin";
-#     $setup->{inf}->{General}->{ConfigDirectoryAdminPwd} = "admin";
-#     $setup->{inf}->{General}->{AdminDomain} = "localdomain";
+    print "\n\n";
+}
 
-    $setup->{inf}->write();
+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";
+    }
 }
 
+$setup->{inf}->write();
+
 # create a directory server instance
 if (system("@bindir@/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 directory server instance to be the configuration DS
+if ($setup->{inf}->{slapd}->{SlapdConfigForMC} =~ /yes/i) {
+    createConfigDS($setup->{inf}, $res);
+}
+
+# register ds instances with config DS
+
 # configure the admin server instance
 if (system("@cmdbindir@/ds-admin-update -f $setup->{inffile}")) {
     print STDERR "Failed to configure administration server\n";


Index: setup-ds-admin.res.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/setup-ds-admin.res.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- setup-ds-admin.res.in	8 Jun 2007 22:49:18 -0000	1.1
+++ setup-ds-admin.res.in	15 Jun 2007 22:16:28 -0000	1.2
@@ -22,3 +22,61 @@
 dialog_assysuser_error = The user '%s' is invalid.\n\n
 dialog_assysuser_must_be_same = Since you are not running setup as root, the user must be the same as your userid '%s'.\n\n
 dialog_assysuser_root_warning = You are strongly encouraged to use a non-root user for\nthe server uid.  If you feel you have made a mistake,\nplease go back to this dialog and enter another user.\n\n
+
+# ----------- Use Config DS Dialog Resource  ----------------
+dialog_useconfigds_text = Server information is stored in the configuration directory server.\nThis information is used by the console and administration server to\nconfigure and manage your servers.  If you have already set up a\nconfiguration directory server, you should register any servers you\nset up or create with the configuration server.  To do so, the\nfollowing information about the configuration server is required: the\nfully qualified host name of the form\n<hostname>.<domainname>(e.g. hostname.example.com), the port number\n(default 389), the suffix, the DN and password of a user having\npermission to write the configuration information, usually the\nconfiguration directory administrator, and if you are using security\n(TLS/SSL).  If you are using TLS/SSL, specify the TLS/SSL (LDAPS) port\nnumber (default 636) instead of the regular LDAP port number, and\nprovide the CA certificate (in PEM/ASCII format).\n\nIf you do not yet have a configuration directory serve!
 r, enter 'No' to\nbe prompted to set up one.\n\n
+
+dialog_useconfigds_prompt = Do you want to register this software with an existing\nconfiguration directory server?
+
+# ----------- Config DS info Dialog Resource  ----------------
+dialog_configdsinfo_text = Please specify the information about your configuration directory\
+server.  The following information is required:\
+- host (fully qualified), port (non-secure or secure), suffix,\
+  protocol (ldap or ldaps) - this information should be provided in the\
+  form of an LDAP url e.g. for non-secure\
+ldap://host.example.com:389/o=NetscapeRoot\
+  or for secure\
+ldaps://host.example.com:636/o=NetscapeRoot\
+- admin ID and password\
+- admin domain\
+- a CA certificate file may be required if you choose to use ldaps and\
+  security has not yet been configured - the file must be in PEM/ASCII\
+  format - specify the absolute path and filename\n\n
+
+dialog_configdsinfo_url_prompt = Configuration directory server URL
+dialog_configdsinfo_id_prompt = Configuration directory server admin ID
+dialog_configdsinfo_pwd_prompt = Configuration directory server admin password
+dialog_configdsinfo_domain_prompt = Configuration directory server admin domain
+dialog_configdsinfo_ca_prompt = CA certificate filename
+dialog_configdsinfo_ca_error = '%s' is not a valid CA certificate file.  Please choose another one.\n\n
+dialog_configdsinfo_nocacert = You chose to use LDAPS but there is no CA certificate or certificate database.  Please chose ldap for the protocol or provide a valid CA certificate.\n\n
+dialog_configdsinfo_unreachable = The server '%s' is not reachable.  Please make sure it is running and listening, or choose another one.\n\n
+dialog_configdsinfo_tryagain = Please try again, in case you mis-typed something.\n\n
+
+# ----------- Config DS admin id and password Dialog Resource  ----------------
+dialog_configdsadmin_text = Please enter the administrator ID for the configuration directory\nserver.  This is the ID typically used to log in to the console.  You\nwill also be prompted for the password.\n\n
+dialog_configdsadmin_prompt = Configuration directory server\nadministrator ID
+dialog_configdsadmin_pw1_prompt = Password
+dialog_configdsadmin_pw2_prompt = Password (again)
+dialog_configdsadmin_error = The input '%s' is not a valid ID.  Please choose another one.\n\n
+dialog_configdsadmin_invalid = The password contains invalid characters.  Please choose another one.\n\n
+dialog_configdsadmin_nomatch = The passwords do not match.  Please try again.\n\n
+
+
+# ----------- Config DS admin domain Dialog Resource  ----------------
+dialog_configdsadmindomain_text = The information stored in the configuration directory server can be\nseparated into different Administration Domains.  If you are managing\nmultiple software releases at the same time, or managing information\nabout multiple domains, you may use the Administration Domain to keep\nthem separate.\n\nIf you are not using administrative domains, press Enter to select the\ndefault.  Otherwise, enter some descriptive, unique name for the\nadministration domain, such as the name of the organization\nresponsible for managing the domain.\n\n
+
+dialog_configdsadmindomain_prompt = Administration Domain
+dialog_configdsadmindomain_error = The string '%s' is not a valid administration domain.  Please choose another one.\n\n
+dialog_configdsadmindomain_notadn = The administration domain must not be a DN.  The string '%s' looks like a DN.  Please choose another one.\n\n
+
+# other messages
+configds_open_error = The server '%s' is not reachable.  Error: %s\n\n
+configds_finddn_error = Could not find the user '%s' in the server '%s'.  Error: %s\n\n
+configds_bindretry_error = You have made too many unsuccessful attempts to authenticate as '%s' to the server '%s'.  Please contact the administrator for that server.\n\n
+configds_bind_error = Could not authenticate as user '%s' to server '%s'.  Error: %s\n\n
+configds_no_admindomain = Could not find the admin domain '%s' under '%s'.  Error: %s\n\n
+
+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?




More information about the Fedora-directory-commits mailing list