[Fedora-directory-commits] adminserver/admserv/schema/ldif 10dsdata.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-serv6427/adminserver/admserv/schema/ldif
Modified Files:
10dsdata.ldif.tmpl
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.
Index: 10dsdata.ldif.tmpl
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/schema/ldif/10dsdata.ldif.tmpl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 10dsdata.ldif.tmpl 13 Jun 2007 17:48:35 -0000 1.1
+++ 10dsdata.ldif.tmpl 15 Jun 2007 22:16:29 -0000 1.2
@@ -29,7 +29,7 @@
serverRoot: %ds_serverroot%
nsServerPort: %ds_port%
nsSecureServerPort: %ds_secure_port%
-serverProductName: Directory Server (%hostname%)
+serverProductName: Directory Server (%dsid%)
serverVersionNumber: %ds_version%
nsSuiteSpotUser: %ds_user%
serverHostName: %fqdn%
16 years, 10 months
[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
by Doctor Conrad
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(a)/01nsroot.ldif.tmpl',
'@ldifdir(a)/02globalpreferences.ldif.tmpl'
);
my $setupinf = new Inf("@infdir(a)/setup.inf");
my $admininf = new Inf("@infdir(a)/admin.inf");
my $dsinf = new Inf("@infdir(a)/slapd.inf");
my $mapper = new Inf("@infdir(a)/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;
-}
-
-@ignorelist = (
- "modifyTimestamp",
- "createTimestamp",
- "installationTimestamp",
- "creatorsName",
- "modifiersName",
- "numSubordinates"
-);
-
-@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(a)/setup-ds.res",
+ "@propertydir(a)/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(a)/setup-ds.res",
- "@propertydir(a)/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(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 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?
16 years, 10 months
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts Dialog.pm, 1.2, 1.3 DialogManager.pm, 1.1, 1.2 Resource.pm, 1.2, 1.3 Setup.pm.in, 1.2, 1.3 Util.pm, 1.1, 1.2 setup-ds.res.in, 1.2, 1.3
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5442/ldapserver/ldap/admin/src/scripts
Modified Files:
Dialog.pm DialogManager.pm Resource.pm Setup.pm.in Util.pm
setup-ds.res.in
Log Message:
Resolves: bug 237356
Description: Move DS Admin Code into Admin Server
Reviewed by: nhosoi (Thanks!)
Fix Description: 1) Since we moved the o=NetscapeRoot code out of cfg_sspt.c, we no longer need to create the suffix and backend in create_instance.c
2) Added code to enable/disable dialogs e.g. for dialogs that can change the flow conditionally
3) Added code to allow the user to backup to the first prompt on a dialog, for dialogs with many prompts
4) Allow continuation lines in Resource files, instead of having to have embedded \n chars. This allows easier editing and layout.
5) Added an addSuffix function
6) Moved the register_servers.pl code from admin server into DS Util.pm and made it a little more general purpose.
Platforms tested: RHEL4
Index: Dialog.pm
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Dialog.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Dialog.pm 12 Jun 2007 21:08:20 -0000 1.2
+++ Dialog.pm 15 Jun 2007 22:11:15 -0000 1.3
@@ -106,6 +106,21 @@
return $self->{type} <= $self->{"manager"}->{type};
}
+sub isEnabled {
+ my $self = shift;
+ return !defined($self->{disabled});
+}
+
+sub enable {
+ my $self = shift;
+ delete $self->{disabled};
+}
+
+sub disable {
+ my $self = shift;
+ $self->{disabled} = 1;
+}
+
# each prompt looks like this:
# [ 'resource key', is pwd, hide ]
# The resource key is the string key of the resource
@@ -135,7 +150,7 @@
my $prompt = $prompts[$index];
my $defaultans = $self->{defaultAns}($self, $index);
my $ans;
- if ($self->isDisplayed() && !$promtpt->[2]) {
+ if ($self->isDisplayed() && !$prompt->[2]) {
$ans = $self->{manager}->showPrompt($prompt->[0], $defaultans, $prompt->[1]);
} else {
$ans = $defaultans;
@@ -155,12 +170,14 @@
# NOTE: user cannot BACK from prompt to prompt - BACK
# always means BACK to the previous dialog
$resp = $self->{handleResp}($self, $ans, $index);
- if ($resp == $DialogManager::SAME) {
+ if (($resp == $DialogManager::SAME) or ($resp == $DialogManager::FIRST)) {
if (!$self->isDisplayed()) {
$self->{manager}->alert('dialog_use_different_type');
$resp = $DialogManager::ERR;
- } else {
+ } elsif ($resp == $DialogManager::SAME) {
$index--; # reprompt
+ } else {
+ $index = -1; # reshow first prompt on dialog
}
} elsif ($resp == $DialogManager::ERR) {
last;
Index: DialogManager.pm
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DialogManager.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DialogManager.pm 8 Jun 2007 01:09:16 -0000 1.1
+++ DialogManager.pm 15 Jun 2007 22:11:15 -0000 1.2
@@ -46,10 +46,11 @@
use SetupLog;
# Dialog responses
-$BACK = -1;
-$SAME = 0;
-$NEXT = 1;
-$ERR = 2;
+$FIRST = -2; # go back to first prompt on a dialog
+$BACK = -1; # go back to previous dialog
+$SAME = 0; # reshow the same prompt or dialog
+$NEXT = 1; # go to the next dialog
+$ERR = 2; # fatal error
# The DialogManager controls the flow of the dialogs and contains context shared
# among all of the dialogs (resources, logs, current setup type, etc.)
@@ -199,18 +200,20 @@
while (!$done) {
my $dialog = $self->{dialogs}->[$index];
- my $resp = $NEXT;
- $resp = $dialog->run();
- if ($resp == $BACK) {
- $incr = -1;
- } elsif ($resp == $NEXT) {
- $incr = 1;
- } elsif ($resp == $SAME) {
- $incr = 0;
- } else {
- $self->handleError($resp);
- $done = 1;
- $rc = 1;
+ if ($dialog->isEnabled()) {
+ my $resp = $NEXT;
+ $resp = $dialog->run();
+ if ($resp == $BACK) {
+ $incr = -1;
+ } elsif ($resp == $NEXT) {
+ $incr = 1;
+ } elsif (($resp == $SAME) or ($resp == $FIRST)) {
+ $incr = 0;
+ } else {
+ $self->handleError($resp);
+ $done = 1;
+ $rc = 1;
+ }
}
$index += $incr;
if ($index < 0) {
Index: Resource.pm
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Resource.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Resource.pm 8 Jun 2007 20:36:53 -0000 1.2
+++ Resource.pm 15 Jun 2007 22:11:15 -0000 1.3
@@ -74,19 +74,45 @@
}
for my $filename (@{$self->{filenames}}) {
+ my $incontinuation = 0;
+ my $curkey;
open RES, $filename or die "Error: could not open resource file $filename: $!";
while (<RES>) {
- next if (/^\s*$/); # skip blank lines
- next if (/^\s*\#/); # skip comment lines
+ my $iscontinuation;
+ chop; # trim trailing newline
+ if (/^\s*$/) { # skip blank/empty lines
+ $incontinuation = 0;
+ next;
+ }
+ if (/^\s*\#/) { # skip comment lines
+ $incontinuation = 0;
+ next;
+ }
# read name = value pairs like this
# bol whitespace* name whitespace* '=' whitespace* value eol
# the value will include any trailing whitespace
- if (/^\s*(.*?)\s*=\s*(.*?)$/) {
- $self->{res}->{$1} = $2;
+ if (/\\$/) {
+ chop;
+ $iscontinuation = 1;
+ }
+ if ($incontinuation) {
+ $self->{res}->{$curkey} .= "\n" . $_;
+ } elsif (/^\s*(.*?)\s*=\s*(.*?)$/) {
# replace \n with real newline
- $self->{res}->{$1} =~ s/\\n/\n/g;
+ if ($curkey) {
+ $self->{res}->{$curkey} =~ s/\\n/\n/g;
+ }
+ $curkey = $1;
+ $self->{res}->{$curkey} = $2;
+ }
+ if ($iscontinuation) { # if line ends with a backslash, continue the data on the next line
+ $incontinuation = 1;
+ } else {
+ $incontinuation = 0;
}
}
+ # replace \n with real newline
+ $self->{res}->{$curkey} =~ s/\\n/\n/g;
close RES;
}
}
Index: Setup.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Setup.pm.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Setup.pm.in 12 Jun 2007 21:08:20 -0000 1.2
+++ Setup.pm.in 15 Jun 2007 22:11:15 -0000 1.3
@@ -147,7 +147,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";
@@ -202,6 +202,21 @@
exit 1;
}
+# get a list of the directory servers in configdir
+sub getDirServers {
+ my $self = shift;
+ if (!$self->{dirservers}) {
+ $self->{dirservers} = [];
+ for my $dir (glob("$self->{configdir}/slapd-*")) {
+ if (-d $dir) {
+ push @{$self->{dirservers}}, $dir;
+ }
+ }
+ }
+ return @{$self->{dirservers}};
+}
+
+
#############################################################################
# Mandatory TRUE return value.
#
Index: Util.pm
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Util.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Util.pm 8 Jun 2007 01:09:16 -0000 1.1
+++ Util.pm 15 Jun 2007 22:11:15 -0000 1.2
@@ -37,10 +37,18 @@
#
package Util;
+
+use Mozilla::LDAP::Conn;
+use Mozilla::LDAP::Utils qw(normalizeDN);
+use Mozilla::LDAP::API; # Direct access to C API
+use Mozilla::LDAP::LDIF;
+
require Exporter;
@ISA = qw(Exporter);
-@EXPORT = qw(portAvailable getAvailablePort isValidDN);
-@EXPORT_OK = qw(portAvailable getAvailablePort isValidDN);
+@EXPORT = qw(portAvailable getAvailablePort isValidDN addSuffix getMappedEntries
+ process_maptbl check_and_add_entry getMappedEntries);
+@EXPORT_OK = qw(portAvailable getAvailablePort isValidDN addSuffix getMappedEntries
+ process_maptbl check_and_add_entry getMappedEntries);
use strict;
@@ -79,4 +87,526 @@
return ($dn =~ /^[0-9a-zA-Z_-]+=.*$/);
}
+sub debug {
+ print @_, "\n";
+}
+
+# delete the subtree starting from the passed entry
+sub delete_all
+{
+ my ($conn, $bentry) = @_;
+ my $sentry = $conn->search($bentry->{dn},
+ "subtree", "(objectclass=*)", 0, ("dn"));
+ my @mystack = ();
+ while ($sentry) {
+ push @mystack, $sentry->getDN();
+ $sentry = $conn->nextEntry();
+ }
+ # reverse order
+ my $dn = pop @mystack;
+ while ($dn) {
+ $conn->delete($dn);
+ my $rc = $conn->getErrorCode();
+ if ( $rc != 0 ) {
+ $conn->printError();
+ print "ERROR: unable to delete entry $dn, error code: $rc\n";
+ return 1;
+ }
+ $dn = pop @mystack;
+ }
+ return 0;
+}
+
+my %ignorelist = (
+ "modifytimestamp", "modifyTimestamp",
+ "createtimestamp", "createTimestamp",
+ "installationtimestamp", "installationTimestamp",
+ "creatorsname", "creatorsName",
+ "modifiersname", "modifiersName",
+ "numsubordinates", "numSubordinates"
+);
+
+my %speciallist = (
+ "uniquemember", 1
+);
+
+# 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) = @_;
+ my $rc = 0;
+ foreach my $akey ( keys %{$e0} )
+ {
+ next if ( $ignorelist{lc($akey)} );
+ my $aval0 = $e0->{$akey};
+ my $aval1 = $e1->{$akey};
+ my $amin;
+ my $amax;
+ my $a0max = $#{$aval0};
+ my $a1max = $#{$aval1};
+ if ( $a0max != $a1max )
+ {
+ if ( $speciallist{lc($akey)} )
+ {
+ $rc = 1;
+ if ( $a0max < $a1max )
+ {
+ $amin = $a0max;
+ $amax = $a1max;
+ }
+ else
+ {
+ $amin = $a1max;
+ $amax = $a0max;
+ }
+ }
+ else
+ {
+ $rc = -1;
+ return $rc;
+ }
+ }
+ my @sval0 = sort { $a cmp $b } @{$aval0};
+ my @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 = $speciallist{lc($akey)};
+ }
+ 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
+# you can use this as the callback to getMappedEntries, so
+# that for each entry in the ldif file being processed, you
+# can call this subroutine to add or update the entry
+# use like this:
+# getMappedEntries($mapper, \@ldiffiles, \&check_and_add_entry,
+# [$conn, $fresh, $verbose]);
+# where $conn is a perldap Conn
+# $fresh if true will update the entry if it exists
+# $verbose prints out more info
+sub check_and_add_entry
+{
+ my ($context, $aentry) = @_;
+ my $conn = $context->[0];
+ my $fresh = $context->[1];
+ my $verbose = $context->[2];
+ my $sentry = $conn->search($aentry->{dn}, "base", "(objectclass=*)");
+ do
+ {
+ my $needtoadd = 1;
+ my $needtomod = 0;
+ my $rval = -1;
+ if ( $sentry && !$fresh )
+ {
+ $rval = comp_entries( $sentry, $aentry );
+ }
+ if ( 0 == $rval && !$fresh )
+ {
+ # the identical entry exists on the configuration DS.
+ # no need to add the entry.
+ $needtoadd = 0;
+ goto out;
+ }
+ elsif ( (1 == $rval) && !$fresh )
+ {
+ $needtoadd = 0;
+ $needtomod = 1;
+ }
+ elsif ( $sentry && $sentry->{dn} )
+ {
+ # $fresh || $rval == -1
+ # an entry having the same DN exists, but the attributes do not
+ # match. remove the entry and the subtree underneath.
+ if ( $verbose )
+ {
+ print "Deleting an entry dn: $sentry->{dn} ...\n";
+ }
+ $rval = delete_all($conn, $sentry);
+ if ( 0 != $rval )
+ {
+ return 0;
+ }
+ }
+
+ 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 0;
+ }
+# if ( $verbose )
+# {
+# print "Entry $aentry->{dn} is added\n";
+# }
+ }
+ elsif ( 1 == $needtomod ) # $sentry exists
+ {
+ foreach my $attr ( keys %speciallist )
+ {
+ foreach my $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 0;
+ }
+ }
+ if ( $sentry )
+ {
+ $sentry = $conn->nextEntry(); # supposed to have no more entries
+ }
+ } until ( !$sentry );
+out:
+ return 1;
+}
+
+# the default callback used with getMappedEntries
+# just adds the given entry to the given list
+sub cbaddent {
+ my $list = shift;
+ my $ent = shift;
+ push @{$list}, $ent;
+ return 1;
+}
+
+# given a mapper and a list of LDIF files, produce a list of
+# perldap Entry objects which have had their tokens subst-ed
+# with values from the mapper
+# An optional callback can be supplied. Each entry will be
+# given to this callback. The callback should return a list
+# of localizable errors. If no callback is supplied, the
+# entries will be returned in a list.
+# Arguments:
+# mapper - a hash ref - the keys are the tokens to replace
+# and the values are the replacements
+# ldiffiles - an array ref - the list of LDIF files to
+# operate on
+# callback (optional) - a code ref - a ref to a subroutine
+# that will be called with each entry - see below
+# context (optional) - this will be passed as the first
+# argument to your given callback - see below
+# errs (optional) - an array ref - This is how errors
+# are returned to the caller - see below
+# Callback:
+# The callback sub will be called for each entry after
+# the entry has been converted. The callback will be
+# called with the given context as the first argument
+# and the Mozilla::LDAP::Entry as the second argument,
+# and an errs array ref as the third argument. The
+# callback should return true to continue processing,
+# or false if a fatal error was encountered that should
+# abort processing of any further.
+# Errors:
+# This function should return an array of errors in the
+# format described below, for use with Resource::getText().
+# If the callback returns any errors
+# Return:
+# The return value is a list of entries.
+# Example usage:
+# sub handle_entries {
+# my $context = shift;
+# my $entry = shift;
+# .... do something with entry ....
+# .... if $context is Mozilla::LDAP::Conn, $conn->add($entry); ...
+# .... report errors ....
+# if ($fatalerror) {
+# return 0;
+# } else {
+# return 1;
+# }
+# }
+# $mapper = {foo => 'bar', baz => 'biff'};
+# @ldiffiles = ('foo.ldif', 'bar.ldif', ..., 'biff.ldif');
+# $conn = new Mozilla::LDAP::Conn(...);
+# @entries = getMappedEntries($mapper, \@ldiffiles, \&handle_entries, $conn);
+# Note that this will return 0 entries since a callback was used.
+# The simpler example is this:
+# @entries = getMappedEntries($mapper, \@ldiffiles);
+#
+sub getMappedEntries {
+ my $mapper = shift;
+ my $ldiffiles = shift;
+ my $callback = shift || \&cbaddent; # default - just add entry to @entries
+ my @entries = ();
+ my $context = shift || \@entries;
+ my $error;
+
+ if (!ref($ldiffiles)) {
+ $ldiffiles = [ $ldiffiles ];
+ }
+
+ foreach my $ldiffile (@{$ldiffiles}) {
+ open(MYLDIF, "< $ldiffile") or die "Can't open $ldiffile : $!";
+ my $in = new Mozilla::LDAP::LDIF(*MYLDIF);
+ debug("Processing $ldiffile ...");
+ ENTRY: while (my $entry = Mozilla::LDAP::LDIF::readOneEntry($in)) {
+ # first, fix the DN
+ my $dn = $entry->getDN();
+ my $origdn = $dn;
+ while ( $dn =~ /%([\w_-]+)%/ ) {
+ if (exists($mapper->{$1})) {
+ $dn =~ s{%([\w_-]+)%}{$mapper->{$1}}ge;
+ } else {
+ print "ERROR: \"$origdn\" mapped to \"$dn\".\n";
+ print "The LDIF file $ldiffile contains a token $1 for which there is no mapper.\n";
+ print "Please check $ldiffile and your mapper to make sure all tokens are handled correctly.\n";
+ $error = 1;
+ last ENTRY;
+ }
+ }
+ $entry->setDN($dn);
+ # next, fix all of the values in all of the attributes
+ foreach my $attr (keys %{$entry}) {
+ my @newvalues = ();
+ foreach my $value ($entry->getValues($attr)) {
+ # Need to repeat to handle nested subst
+ my $origvalue = $value;
+ while ( $value =~ /%([\w_-]+)%/ ) {
+ if (exists($mapper->{$1})) {
+ $value =~ s{%([\w_-]+)%}{$mapper->{$1}}ge;
+ } else {
+ print "ERROR: \"$origvalue\" mapped to \"$value\".\n";
+ print "The LDIF file $ldiffile contains a token $1 for which there is no mapper.\n";
+ print "Please check $ldiffile and your mapper to make sure all tokens are handled correctly.\n";
+ $error = 1;
+ last ENTRY;
+ }
+ }
+ push @newvalues, $value;
+ }
+ $entry->setValues( $attr, @newvalues );
+ }
+
+ if (!&{$callback}($context, $entry)) {
+ print "There was an error processing entry ", $entry->getDN(), "\n";
+ print "Cannot continue processing entries.\n";
+ $error = 1;
+ last ENTRY;
+ }
+
+ }
+ close(MYLDIF);
+ last if ($error); # do not process any more ldiffiles if an error occurred
+ }
+
+ return @entries;
+}
+
+# you should only use this function if you know for sure
+# that the suffix and backend do not already exist
+# use addSuffix instead
+sub newSuffixAndBackend {
+ my $context = shift;
+ my $suffix = shift;
+ my $bename = shift;
+ my $nsuffix = normalizeDN($suffix);
+ my @errs;
+
+ my $dn = "cn=$bename, cn=ldbm database, cn=plugins, cn=config";
+ my $entry = new Mozilla::LDAP::Entry();
+ $entry->setDN($dn);
+ $entry->setValues('objectclass', 'top', 'extensibleObject', 'nsBackendInstance');
+ $entry->setValues('cn', $bename);
+ $entry->setValues('nsslapd-suffix', $nsuffix);
+ $context->add($entry);
+ my $rc = $context->getErrorCode();
+ if ($rc) {
+ return ('error_creating_suffix_backend', $suffix, $bename, $context->getErrorString());
+ }
+
+ $entry = new Mozilla::LDAP::Entry();
+ $dn = "cn=\"$nsuffix\", cn=mapping tree, cn=config";
+ $entry->setDN($dn);
+ $entry->setValues('objectclass', 'top', 'extensibleObject', 'nsMappingTree');
+ $entry->setValues('cn', "\"$nsuffix\"");
+ $entry->setValues('nsslapd-state', 'backend');
+ $entry->setValues('nsslapd-backend', $bename);
+ $context->add($entry);
+ $rc = $context->getErrorCode();
+ if ($rc) {
+ return ('error_creating_suffix', $suffix, $context->getErrorString());
+ }
+
+ return ();
+}
+
+sub findbecb {
+ my $entry = shift;
+ my $attrs = shift;
+ return $entry->hasValue('objectclass', $attrs->[0], 1) &&
+ $entry->hasValue('cn', $attrs->[1], 1);
+}
+
+sub findBackend {
+ my $context = shift;
+ my $bename = shift;
+ my $ent;
+ if (ref($context) eq 'Mozilla::LDAP::Conn') {
+ $ent = $context->search("cn=ldbm database,cn=plugins,cn=config", "one",
+ "(&(objectclass=nsBackendInstance)(cn=$bename)")
+ } else {
+ $ent = $context->search("cn=ldbm database,cn=plugins,cn=config", "one",
+ \&findbecb, ['nsBackendInstance', $bename])
+ }
+}
+
+sub findsuffixcb {
+ my $entry = shift;
+ my $attrs = shift;
+ return $entry->hasValue('cn', $attrs->[0], 1) ||
+ $entry->hasValue('cn', $attrs->[1], 1);
+}
+
+sub findSuffix {
+ my $context = shift;
+ my $suffix = shift;
+ my $nsuffix = normalizeDN($suffix);
+ my $ent;
+ if (ref($context) eq 'Mozilla::LDAP::Conn') {
+ $ent = $context->search("cn=mapping tree,cn=config", "one",
+ "(|(cn=\"$suffix\")(cn=\"$nsuffix\"))");
+ } else {
+ $ent = $context->search("cn=mapping tree,cn=config", "one",
+ \&findsuffixcb, ["\"$suffix\"", "\"$nsuffix\""])
+ }
+}
+
+sub getUniqueBackendName {
+ my $context = shift;
+ my $bename = "backend";
+ my $index = 0;
+ my $ent = findBackend($context, ($bename . $index));
+ while ($ent) {
+ ++$index;
+ $ent = findBackend($context, ($bename . $index));
+ }
+
+ return $bename.$index;
+}
+
+sub addSuffix {
+ my $context = shift; # Conn
+ my $suffix = shift;
+ my $bename = shift; # optional
+ my $ent;
+
+ if ($bename && ($ent = findBackend($context, $bename))) {
+ return ('backend_already_exists', $bename, $ent->getDN());
+ }
+
+ if ($ent = findSuffix($context, $suffix)) {
+ return ('suffix_already_exists', $suffix, $ent->getDN());
+ }
+
+ if (!$bename) {
+ $bename = getUniqueBackendName($context);
+ }
+
+ my @errs = newSuffixAndBackend($context, $suffix, $bename);
+
+ return @errs;
+}
+
+# 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.
+# The %token% tokens are replaced in getMappedEntries
+sub process_maptbl
+{
+ my ($mapper, @infdata) = @_;
+
+ if (defined($mapper->{""})) {
+ $mapper = $mapper->{""}; # side effect of Inf with no sections
+ }
+
+ KEY: foreach my $key (keys %{$mapper})
+ {
+ my $value = $mapper->{$key};
+ if ($value =~ /^\"/)
+ {
+ $value =~ tr/\"//d; # value is a regular double quoted string - remove quotes
+ $mapper->{$key} = $value;
+ }
+ elsif ($value =~ /^\`/)
+ {
+ $value =~ tr/\`//d; # value is a perl expression to eval
+ my $returnvalue; # set in eval expression
+ eval $value;
+ $mapper->{$key} = $returnvalue; # perl expression sets $returnvalue
+ }
+ else
+ {
+ # get the value from one of the Inf passed in
+ my $infsection;
+ foreach my $thisinf (@infdata)
+ {
+ foreach my $section0 (keys %{$thisinf})
+ {
+ $infsection = $thisinf->{$section0};
+ next if (!ref($infsection));
+ if (defined($infsection->{$value}))
+ {
+ $mapper->{$key} = $infsection->{$value};
+ next KEY;
+ }
+ }
+ }
+ if (!defined($infsection->{$value}))
+ {
+ print "ERROR: $value not found in the .inf files\n";
+ return {};
+ }
+ }
+ }
+ return $mapper;
+}
+
1;
Index: setup-ds.res.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/setup-ds.res.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- setup-ds.res.in 8 Jun 2007 20:36:53 -0000 1.2
+++ setup-ds.res.in 15 Jun 2007 22:11:15 -0000 1.3
@@ -79,3 +79,9 @@
dialog_dspopulate_text = You may wish to populate your new directory instance with some data.\n"You may already have a file in LDIF format to use or some suggested\nentries can be added. If you want to import entries from an LDIF\nfile, you may type in the full path and filename at the prompt. If\nyou want the setup program to add the suggested entries, type the\nword suggest at the prompt. The suggested entries are common\ncontainer entries under your specified suffix, such as ou=People and\nou=Groups, which are commonly used to hold the entries for the persons\nand groups in your organization. If you do not want to add any of\nthese entries, type the word none at the prompt.\n\n
dialog_dspopulate_prompt = Type the full path and filename, the word suggest, or the word none
dialog_dspopulate_error = The file '%s' was not found. Please choose another one.\n\n
+
+# ----------- miscellaneous ----------------
+backend_already_exists = A database backend with the name '%s' already exists. Config entry DN '%s'. Please choose another backend name. addSuffix can generate a unique backend name if you do not specify a backend name.\n\n
+suffix_already_exists = The suffix '%s' already exists. Config entry DN '%s'.\n\n
+error_creating_suffix_backend = Could not create the suffix '%s'. There was an error creating the backend database named '%s' for the suffix. Error: %s\n\n
+error_creating_suffix = Could not create the suffix '%s'. Error: %s\n\n
16 years, 10 months
[Fedora-directory-commits] ldapserver/ldap/admin/src create_instance.c, 1.58, 1.59 ds_newinst.pl.in, 1.7, 1.8
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5442/ldapserver/ldap/admin/src
Modified Files:
create_instance.c ds_newinst.pl.in
Log Message:
Resolves: bug 237356
Description: Move DS Admin Code into Admin Server
Reviewed by: nhosoi (Thanks!)
Fix Description: 1) Since we moved the o=NetscapeRoot code out of cfg_sspt.c, we no longer need to create the suffix and backend in create_instance.c
2) Added code to enable/disable dialogs e.g. for dialogs that can change the flow conditionally
3) Added code to allow the user to backup to the first prompt on a dialog, for dialogs with many prompts
4) Allow continuation lines in Resource files, instead of having to have embedded \n chars. This allows easier editing and layout.
5) Added an addSuffix function
6) Moved the register_servers.pl code from admin server into DS Util.pm and made it a little more general purpose.
Platforms tested: RHEL4
Index: create_instance.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/create_instance.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- create_instance.c 7 Jun 2007 22:40:14 -0000 1.58
+++ create_instance.c 15 Jun 2007 22:11:15 -0000 1.59
@@ -3404,12 +3404,6 @@
fprintf(f, "cn: tasks\n");
fprintf(f, "\n");
- /* Entries for the ldbm instances and mapping tree */
- if ( cf->netscaperoot && !cf->use_existing_config_ds)
- {
- suffix_gen_conf(f, cf->netscaperoot, "NetscapeRoot");
- }
-
if (!cf->use_existing_user_ds)
{
suffix_gen_conf(f, cf->suffix, "userRoot");
Index: ds_newinst.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/ds_newinst.pl.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ds_newinst.pl.in 7 Jun 2007 22:40:14 -0000 1.7
+++ ds_newinst.pl.in 15 Jun 2007 22:11:15 -0000 1.8
@@ -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 Makefile.in,1.51,1.52
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11878
Modified Files:
Makefile.in
Log Message:
Summary: Move DS Admin Code into Admin Server (Comment #62)
Description: providing slapd.inf having the DS static info for the setup/config
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.in,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- Makefile.in 15 Jun 2007 17:02:28 -0000 1.51
+++ Makefile.in 15 Jun 2007 20:22:14 -0000 1.52
@@ -334,10 +334,6 @@
lib/libsi18n/libns_dshttpd_la-reshash.lo \
lib/libsi18n/libns_dshttpd_la-txtfile.lo $(am__objects_1)
libns_dshttpd_la_OBJECTS = $(am_libns_dshttpd_la_OBJECTS)
-libothercrypto_plugin_la_LIBADD =
-am_libothercrypto_plugin_la_OBJECTS = ldap/servers/plugins/othercrypto/libothercrypto_plugin_la-othercrypto.lo
-libothercrypto_plugin_la_OBJECTS = \
- $(am_libothercrypto_plugin_la_OBJECTS)
libpam_passthru_plugin_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_libpam_passthru_plugin_la_OBJECTS = ldap/servers/plugins/pam_passthru/libpam_passthru_plugin_la-pam_ptconfig.lo \
ldap/servers/plugins/pam_passthru/libpam_passthru_plugin_la-pam_ptdebug.lo \
@@ -359,9 +355,6 @@
libpresence_plugin_la_LIBADD =
am_libpresence_plugin_la_OBJECTS = ldap/servers/plugins/presence/libpresence_plugin_la-presence.lo
libpresence_plugin_la_OBJECTS = $(am_libpresence_plugin_la_OBJECTS)
-libpwderror_plugin_la_LIBADD =
-am_libpwderror_plugin_la_OBJECTS = ldap/servers/plugins/pwderror/libpwderror_plugin_la-pwderror-plugin.lo
-libpwderror_plugin_la_OBJECTS = $(am_libpwderror_plugin_la_OBJECTS)
libpwdstorage_plugin_la_LIBADD =
am_libpwdstorage_plugin_la_OBJECTS = ldap/servers/plugins/pwdstorage/libpwdstorage_plugin_la-clear_pwd.lo \
ldap/servers/plugins/pwdstorage/libpwdstorage_plugin_la-crypt_pwd.lo \
@@ -562,10 +555,6 @@
am_libviews_plugin_la_OBJECTS = \
ldap/servers/plugins/views/libviews_plugin_la-views.lo
libviews_plugin_la_OBJECTS = $(am_libviews_plugin_la_OBJECTS)
-libxor_plugin_la_LIBADD =
-am_libxor_plugin_la_OBJECTS = \
- ldap/servers/plugins/xor/libxor_plugin_la-xorplugin.lo
-libxor_plugin_la_OBJECTS = $(am_libxor_plugin_la_OBJECTS)
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(sbin_PROGRAMS)
@@ -760,21 +749,19 @@
$(libdna_plugin_la_SOURCES) $(libds_admin_la_SOURCES) \
$(libhttp_client_plugin_la_SOURCES) \
$(libns_dshttpd_la_SOURCES) \
- $(libothercrypto_plugin_la_SOURCES) \
$(libpam_passthru_plugin_la_SOURCES) \
$(libpassthru_plugin_la_SOURCES) \
$(libpresence_plugin_la_SOURCES) \
- $(libpwderror_plugin_la_SOURCES) \
$(libpwdstorage_plugin_la_SOURCES) \
$(libreferint_plugin_la_SOURCES) \
$(libreplication_plugin_la_SOURCES) \
$(libretrocl_plugin_la_SOURCES) $(libroles_plugin_la_SOURCES) \
$(libslapd_la_SOURCES) $(libstatechange_plugin_la_SOURCES) \
$(libsyntax_plugin_la_SOURCES) $(libviews_plugin_la_SOURCES) \
- $(libxor_plugin_la_SOURCES) $(dbscan_bin_SOURCES) \
- $(ds_newinst_bin_SOURCES) $(dsktune_bin_SOURCES) \
- $(infadd_bin_SOURCES) $(ldap_agent_bin_SOURCES) \
- $(ldclt_bin_SOURCES) $(ldif_bin_SOURCES) $(makstrdb_SOURCES) \
+ $(dbscan_bin_SOURCES) $(ds_newinst_bin_SOURCES) \
+ $(dsktune_bin_SOURCES) $(infadd_bin_SOURCES) \
+ $(ldap_agent_bin_SOURCES) $(ldclt_bin_SOURCES) \
+ $(ldif_bin_SOURCES) $(makstrdb_SOURCES) \
$(migratecred_bin_SOURCES) $(mmldif_bin_SOURCES) \
$(ns_slapd_SOURCES) $(pwdhash_bin_SOURCES) \
$(rsearch_bin_SOURCES)
@@ -788,24 +775,22 @@
$(libdna_plugin_la_SOURCES) $(libds_admin_la_SOURCES) \
$(libhttp_client_plugin_la_SOURCES) \
$(libns_dshttpd_la_SOURCES) \
- $(libothercrypto_plugin_la_SOURCES) \
$(libpam_passthru_plugin_la_SOURCES) \
$(libpassthru_plugin_la_SOURCES) \
$(libpresence_plugin_la_SOURCES) \
- $(libpwderror_plugin_la_SOURCES) \
$(libpwdstorage_plugin_la_SOURCES) \
$(libreferint_plugin_la_SOURCES) \
$(libreplication_plugin_la_SOURCES) \
$(libretrocl_plugin_la_SOURCES) $(libroles_plugin_la_SOURCES) \
$(libslapd_la_SOURCES) $(libstatechange_plugin_la_SOURCES) \
$(libsyntax_plugin_la_SOURCES) $(libviews_plugin_la_SOURCES) \
- $(libxor_plugin_la_SOURCES) $(dbscan_bin_SOURCES) \
- $(ds_newinst_bin_SOURCES) $(dsktune_bin_SOURCES) \
- $(infadd_bin_SOURCES) $(ldap_agent_bin_SOURCES) \
- $(am__ldclt_bin_SOURCES_DIST) $(ldif_bin_SOURCES) \
- $(makstrdb_SOURCES) $(migratecred_bin_SOURCES) \
- $(mmldif_bin_SOURCES) $(am__ns_slapd_SOURCES_DIST) \
- $(pwdhash_bin_SOURCES) $(rsearch_bin_SOURCES)
+ $(dbscan_bin_SOURCES) $(ds_newinst_bin_SOURCES) \
+ $(dsktune_bin_SOURCES) $(infadd_bin_SOURCES) \
+ $(ldap_agent_bin_SOURCES) $(am__ldclt_bin_SOURCES_DIST) \
+ $(ldif_bin_SOURCES) $(makstrdb_SOURCES) \
+ $(migratecred_bin_SOURCES) $(mmldif_bin_SOURCES) \
+ $(am__ns_slapd_SOURCES_DIST) $(pwdhash_bin_SOURCES) \
+ $(rsearch_bin_SOURCES)
configDATA_INSTALL = $(INSTALL_DATA)
infDATA_INSTALL = $(INSTALL_DATA)
nodist_propertyDATA_INSTALL = $(INSTALL_DATA)
@@ -1054,17 +1039,13 @@
@enable_pam_passthru_TRUE@LIBPAM_PASSTHRU_PLUGIN = libpam-passthru-plugin.la
@enable_dna_TRUE@LIBDNA_PLUGIN = libdna-plugin.la
@enable_bitwise_TRUE@LIBBITWISE_PLUGIN = libbitwise-plugin.la
-LIBXOR_PLUGIN = libxor-plugin.la
-LIBPWDERROR_PLUGIN = libpwderror-plugin.la
-LIBOTHERCRYPTO_PLUGIN = libothercrypto-plugin.la
serverplugin_LTLIBRARIES = libacl-plugin.la libattr-unique-plugin.la \
libback-ldbm.la libchainingdb-plugin.la libcos-plugin.la libdes-plugin.la \
libdistrib-plugin.la libhttp-client-plugin.la libcollation-plugin.la \
libpassthru-plugin.la libpresence-plugin.la \
libpwdstorage-plugin.la libreferint-plugin.la libreplication-plugin.la \
libretrocl-plugin.la libroles-plugin.la libstatechange-plugin.la libsyntax-plugin.la \
- libviews-plugin.la $(LIBPAM_PASSTHRU_PLUGIN) $(LIBDNA_PLUGIN) $(LIBBITWISE_PLUGIN) \
- $(LIBXOR_PLUGIN) $(LIBPWDERROR_PLUGIN) $(LIBOTHERCRYPTO_PLUGIN)
+ libviews-plugin.la $(LIBPAM_PASSTHRU_PLUGIN) $(LIBDNA_PLUGIN) $(LIBBITWISE_PLUGIN)
nodist_property_DATA = ns-slapd.properties
noinst_LIBRARIES = libavl.a libldaputil.a
@@ -1751,27 +1732,6 @@
libbitwise_plugin_la_CPPFLAGS = $(PLUGIN_CPPFLAGS)
libbitwise_plugin_la_LDFLAGS = -avoid-version
-#------------------------
-# libxor-plugin
-#------------------------
-libxor_plugin_la_SOURCES = ldap/servers/plugins/xor/xorplugin.c
-libxor_plugin_la_CPPFLAGS = $(PLUGIN_CPPFLAGS)
-libxor_plugin_la_LDFLAGS = -avoid-version
-
-#------------------------
-# libpwderror-plugin
-#------------------------
-libpwderror_plugin_la_SOURCES = ldap/servers/plugins/pwderror/pwderror-plugin.c
-libpwderror_plugin_la_CPPFLAGS = $(PLUGIN_CPPFLAGS)
-libpwderror_plugin_la_LDFLAGS = -avoid-version
-
-#------------------------
-# libothercrypto-plugin
-#------------------------
-libothercrypto_plugin_la_SOURCES = ldap/servers/plugins/othercrypto/othercrypto.c
-libothercrypto_plugin_la_CPPFLAGS = $(PLUGIN_CPPFLAGS)
-libothercrypto_plugin_la_LDFLAGS = -avoid-version
-
#////////////////////////////////////////////////////////////////
#
# Programs
@@ -2813,17 +2773,6 @@
lib/ldaputil/$(DEPDIR)/$(am__dirstamp)
libns-dshttpd.la: $(libns_dshttpd_la_OBJECTS) $(libns_dshttpd_la_DEPENDENCIES)
$(CXXLINK) -rpath $(serverdir) $(libns_dshttpd_la_LDFLAGS) $(libns_dshttpd_la_OBJECTS) $(libns_dshttpd_la_LIBADD) $(LIBS)
-ldap/servers/plugins/othercrypto/$(am__dirstamp):
- @$(mkdir_p) ldap/servers/plugins/othercrypto
- @: > ldap/servers/plugins/othercrypto/$(am__dirstamp)
-ldap/servers/plugins/othercrypto/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) ldap/servers/plugins/othercrypto/$(DEPDIR)
- @: > ldap/servers/plugins/othercrypto/$(DEPDIR)/$(am__dirstamp)
-ldap/servers/plugins/othercrypto/libothercrypto_plugin_la-othercrypto.lo: \
- ldap/servers/plugins/othercrypto/$(am__dirstamp) \
- ldap/servers/plugins/othercrypto/$(DEPDIR)/$(am__dirstamp)
-libothercrypto-plugin.la: $(libothercrypto_plugin_la_OBJECTS) $(libothercrypto_plugin_la_DEPENDENCIES)
- $(LINK) -rpath $(serverplugindir) $(libothercrypto_plugin_la_LDFLAGS) $(libothercrypto_plugin_la_OBJECTS) $(libothercrypto_plugin_la_LIBADD) $(LIBS)
ldap/servers/plugins/pam_passthru/$(am__dirstamp):
@$(mkdir_p) ldap/servers/plugins/pam_passthru
@: > ldap/servers/plugins/pam_passthru/$(am__dirstamp)
@@ -2881,17 +2830,6 @@
ldap/servers/plugins/presence/$(DEPDIR)/$(am__dirstamp)
libpresence-plugin.la: $(libpresence_plugin_la_OBJECTS) $(libpresence_plugin_la_DEPENDENCIES)
$(LINK) -rpath $(serverplugindir) $(libpresence_plugin_la_LDFLAGS) $(libpresence_plugin_la_OBJECTS) $(libpresence_plugin_la_LIBADD) $(LIBS)
-ldap/servers/plugins/pwderror/$(am__dirstamp):
- @$(mkdir_p) ldap/servers/plugins/pwderror
- @: > ldap/servers/plugins/pwderror/$(am__dirstamp)
-ldap/servers/plugins/pwderror/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) ldap/servers/plugins/pwderror/$(DEPDIR)
- @: > ldap/servers/plugins/pwderror/$(DEPDIR)/$(am__dirstamp)
-ldap/servers/plugins/pwderror/libpwderror_plugin_la-pwderror-plugin.lo: \
- ldap/servers/plugins/pwderror/$(am__dirstamp) \
- ldap/servers/plugins/pwderror/$(DEPDIR)/$(am__dirstamp)
-libpwderror-plugin.la: $(libpwderror_plugin_la_OBJECTS) $(libpwderror_plugin_la_DEPENDENCIES)
- $(LINK) -rpath $(serverplugindir) $(libpwderror_plugin_la_LDFLAGS) $(libpwderror_plugin_la_OBJECTS) $(libpwderror_plugin_la_LIBADD) $(LIBS)
ldap/servers/plugins/pwdstorage/$(am__dirstamp):
@$(mkdir_p) ldap/servers/plugins/pwdstorage
@: > ldap/servers/plugins/pwdstorage/$(am__dirstamp)
@@ -3480,17 +3418,6 @@
ldap/servers/plugins/views/$(DEPDIR)/$(am__dirstamp)
libviews-plugin.la: $(libviews_plugin_la_OBJECTS) $(libviews_plugin_la_DEPENDENCIES)
$(LINK) -rpath $(serverplugindir) $(libviews_plugin_la_LDFLAGS) $(libviews_plugin_la_OBJECTS) $(libviews_plugin_la_LIBADD) $(LIBS)
-ldap/servers/plugins/xor/$(am__dirstamp):
- @$(mkdir_p) ldap/servers/plugins/xor
- @: > ldap/servers/plugins/xor/$(am__dirstamp)
-ldap/servers/plugins/xor/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) ldap/servers/plugins/xor/$(DEPDIR)
- @: > ldap/servers/plugins/xor/$(DEPDIR)/$(am__dirstamp)
-ldap/servers/plugins/xor/libxor_plugin_la-xorplugin.lo: \
- ldap/servers/plugins/xor/$(am__dirstamp) \
- ldap/servers/plugins/xor/$(DEPDIR)/$(am__dirstamp)
-libxor-plugin.la: $(libxor_plugin_la_OBJECTS) $(libxor_plugin_la_DEPENDENCIES)
- $(LINK) -rpath $(serverplugindir) $(libxor_plugin_la_LDFLAGS) $(libxor_plugin_la_OBJECTS) $(libxor_plugin_la_LIBADD) $(LIBS)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@@ -4040,8 +3967,6 @@
-rm -f ldap/servers/plugins/http/libhttp_client_plugin_la-http_client.lo
-rm -f ldap/servers/plugins/http/libhttp_client_plugin_la-http_impl.$(OBJEXT)
-rm -f ldap/servers/plugins/http/libhttp_client_plugin_la-http_impl.lo
- -rm -f ldap/servers/plugins/othercrypto/libothercrypto_plugin_la-othercrypto.$(OBJEXT)
- -rm -f ldap/servers/plugins/othercrypto/libothercrypto_plugin_la-othercrypto.lo
-rm -f ldap/servers/plugins/pam_passthru/libpam_passthru_plugin_la-pam_ptconfig.$(OBJEXT)
-rm -f ldap/servers/plugins/pam_passthru/libpam_passthru_plugin_la-pam_ptconfig.lo
-rm -f ldap/servers/plugins/pam_passthru/libpam_passthru_plugin_la-pam_ptdebug.$(OBJEXT)
@@ -4064,8 +3989,6 @@
-rm -f ldap/servers/plugins/passthru/libpassthru_plugin_la-ptutil.lo
-rm -f ldap/servers/plugins/presence/libpresence_plugin_la-presence.$(OBJEXT)
-rm -f ldap/servers/plugins/presence/libpresence_plugin_la-presence.lo
- -rm -f ldap/servers/plugins/pwderror/libpwderror_plugin_la-pwderror-plugin.$(OBJEXT)
- -rm -f ldap/servers/plugins/pwderror/libpwderror_plugin_la-pwderror-plugin.lo
-rm -f ldap/servers/plugins/pwdstorage/libpwdstorage_plugin_la-clear_pwd.$(OBJEXT)
-rm -f ldap/servers/plugins/pwdstorage/libpwdstorage_plugin_la-clear_pwd.lo
-rm -f ldap/servers/plugins/pwdstorage/libpwdstorage_plugin_la-crypt_pwd.$(OBJEXT)
@@ -4244,8 +4167,6 @@
-rm -f ldap/servers/plugins/uiduniq/libattr_unique_plugin_la-uid.lo
-rm -f ldap/servers/plugins/views/libviews_plugin_la-views.$(OBJEXT)
-rm -f ldap/servers/plugins/views/libviews_plugin_la-views.lo
- -rm -f ldap/servers/plugins/xor/libxor_plugin_la-xorplugin.$(OBJEXT)
- -rm -f ldap/servers/plugins/xor/libxor_plugin_la-xorplugin.lo
-rm -f ldap/servers/slapd/back-ldbm/libback_ldbm_la-ancestorid.$(OBJEXT)
-rm -f ldap/servers/slapd/back-ldbm/libback_ldbm_la-ancestorid.lo
-rm -f ldap/servers/slapd/back-ldbm/libback_ldbm_la-archive.$(OBJEXT)
@@ -4800,7 +4721,6 @@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/dna/$(DEPDIR)/libdna_plugin_la-dna.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/http/$(DEPDIR)/libhttp_client_plugin_la-http_client.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/http/$(DEPDIR)/libhttp_client_plugin_la-http_impl.Plo(a)am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/othercrypto/$(DEPDIR)/libothercrypto_plugin_la-othercrypto.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/pam_passthru/$(DEPDIR)/libpam_passthru_plugin_la-pam_ptconfig.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/pam_passthru/$(DEPDIR)/libpam_passthru_plugin_la-pam_ptdebug.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/pam_passthru/$(DEPDIR)/libpam_passthru_plugin_la-pam_ptimpl.Plo(a)am__quote@
@@ -4812,7 +4732,6 @@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/passthru/$(DEPDIR)/libpassthru_plugin_la-ptpreop.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/passthru/$(DEPDIR)/libpassthru_plugin_la-ptutil.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/presence/$(DEPDIR)/libpresence_plugin_la-presence.Plo(a)am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/pwderror/$(DEPDIR)/libpwderror_plugin_la-pwderror-plugin.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/pwdstorage/$(DEPDIR)/libpwdstorage_plugin_la-clear_pwd.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/pwdstorage/$(DEPDIR)/libpwdstorage_plugin_la-crypt_pwd.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/pwdstorage/$(DEPDIR)/libpwdstorage_plugin_la-md5_pwd.Plo(a)am__quote@
@@ -4902,7 +4821,6 @@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/uiduniq/$(DEPDIR)/libattr_unique_plugin_la-7bit.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/uiduniq/$(DEPDIR)/libattr_unique_plugin_la-uid.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/views/$(DEPDIR)/libviews_plugin_la-views.Plo(a)am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/plugins/xor/$(DEPDIR)/libxor_plugin_la-xorplugin.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/slapd/$(DEPDIR)/ldap_agent_bin-agtmmap.Po(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/slapd/$(DEPDIR)/libslapd_la-add.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/slapd/$(DEPDIR)/libslapd_la-agtmmap.Plo(a)am__quote@
@@ -6334,13 +6252,6 @@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libns_dshttpd_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/ldaputil/libns_dshttpd_la-vtable.lo `test -f 'lib/ldaputil/vtable.c' || echo '$(srcdir)/'`lib/ldaputil/vtable.c
-ldap/servers/plugins/othercrypto/libothercrypto_plugin_la-othercrypto.lo: ldap/servers/plugins/othercrypto/othercrypto.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libothercrypto_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ldap/servers/plugins/othercrypto/libothercrypto_plugin_la-othercrypto.lo -MD -MP -MF "ldap/servers/plugins/othercrypto/$(DEPDIR)/libothercrypto_plugin_la-othercrypto.Tpo" -c -o ldap/servers/plugins/othercrypto/libothercrypto_plugin_la-othercrypto.lo `test -f 'ldap/servers/plugins/othercrypto/othercrypto.c' || echo '$(srcdir)/'`ldap/servers/plugins/othercrypto/othercrypto.c; \
-@am__fastdepCC_TRUE@ then mv -f "ldap/servers/plugins/othercrypto/$(DEPDIR)/libothercrypto_plugin_la-othercrypto.Tpo" "ldap/servers/plugins/othercrypto/$(DEPDIR)/libothercrypto_plugin_la-othercrypto.Plo"; else rm -f "ldap/servers/plugins/othercrypto/$(DEPDIR)/libothercrypto_plugin_la-othercrypto.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ldap/servers/plugins/othercrypto/othercrypto.c' object='ldap/servers/plugins/othercrypto/libothercrypto_plugin_la-othercrypto.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libothercrypto_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ldap/servers/plugins/othercrypto/libothercrypto_plugin_la-othercrypto.lo `test -f 'ldap/servers/plugins/othercrypto/othercrypto.c' || echo '$(srcdir)/'`ldap/servers/plugins/othercrypto/othercrypto.c
-
ldap/servers/plugins/pam_passthru/libpam_passthru_plugin_la-pam_ptconfig.lo: ldap/servers/plugins/pam_passthru/pam_ptconfig.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpam_passthru_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ldap/servers/plugins/pam_passthru/libpam_passthru_plugin_la-pam_ptconfig.lo -MD -MP -MF "ldap/servers/plugins/pam_passthru/$(DEPDIR)/libpam_passthru_plugin_la-pam_ptconfig.Tpo" -c -o ldap/servers/plugins/pam_passthru/libpam_passthru_plugin_la-pam_ptconfig.lo `test -f 'ldap/servers/plugins/pam_passthru/pam_ptconfig.c' || echo '$(srcdir)/'`ldap/servers/plugins/pam_passthru/pam_ptconfig.c; \
@am__fastdepCC_TRUE@ then mv -f "ldap/servers/plugins/pam_passthru/$(DEPDIR)/libpam_passthru_plugin_la-pam_ptconfig.Tpo" "ldap/servers/plugins/pam_passthru/$(DEPDIR)/libpam_passthru_plugin_la-pam_ptconfig.Plo"; else rm -f "ldap/servers/plugins/pam_passthru/$(DEPDIR)/libpam_passthru_plugin_la-pam_ptconfig.Tpo"; exit 1; fi
@@ -6418,13 +6329,6 @@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpresence_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ldap/servers/plugins/presence/libpresence_plugin_la-presence.lo `test -f 'ldap/servers/plugins/presence/presence.c' || echo '$(srcdir)/'`ldap/servers/plugins/presence/presence.c
-ldap/servers/plugins/pwderror/libpwderror_plugin_la-pwderror-plugin.lo: ldap/servers/plugins/pwderror/pwderror-plugin.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpwderror_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ldap/servers/plugins/pwderror/libpwderror_plugin_la-pwderror-plugin.lo -MD -MP -MF "ldap/servers/plugins/pwderror/$(DEPDIR)/libpwderror_plugin_la-pwderror-plugin.Tpo" -c -o ldap/servers/plugins/pwderror/libpwderror_plugin_la-pwderror-plugin.lo `test -f 'ldap/servers/plugins/pwderror/pwderror-plugin.c' || echo '$(srcdir)/'`ldap/servers/plugins/pwderror/pwderror-plugin.c; \
-@am__fastdepCC_TRUE@ then mv -f "ldap/servers/plugins/pwderror/$(DEPDIR)/libpwderror_plugin_la-pwderror-plugin.Tpo" "ldap/servers/plugins/pwderror/$(DEPDIR)/libpwderror_plugin_la-pwderror-plugin.Plo"; else rm -f "ldap/servers/plugins/pwderror/$(DEPDIR)/libpwderror_plugin_la-pwderror-plugin.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ldap/servers/plugins/pwderror/pwderror-plugin.c' object='ldap/servers/plugins/pwderror/libpwderror_plugin_la-pwderror-plugin.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpwderror_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ldap/servers/plugins/pwderror/libpwderror_plugin_la-pwderror-plugin.lo `test -f 'ldap/servers/plugins/pwderror/pwderror-plugin.c' || echo '$(srcdir)/'`ldap/servers/plugins/pwderror/pwderror-plugin.c
-
ldap/servers/plugins/pwdstorage/libpwdstorage_plugin_la-clear_pwd.lo: ldap/servers/plugins/pwdstorage/clear_pwd.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpwdstorage_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ldap/servers/plugins/pwdstorage/libpwdstorage_plugin_la-clear_pwd.lo -MD -MP -MF "ldap/servers/plugins/pwdstorage/$(DEPDIR)/libpwdstorage_plugin_la-clear_pwd.Tpo" -c -o ldap/servers/plugins/pwdstorage/libpwdstorage_plugin_la-clear_pwd.lo `test -f 'ldap/servers/plugins/pwdstorage/clear_pwd.c' || echo '$(srcdir)/'`ldap/servers/plugins/pwdstorage/clear_pwd.c; \
@am__fastdepCC_TRUE@ then mv -f "ldap/servers/plugins/pwdstorage/$(DEPDIR)/libpwdstorage_plugin_la-clear_pwd.Tpo" "ldap/servers/plugins/pwdstorage/$(DEPDIR)/libpwdstorage_plugin_la-clear_pwd.Plo"; else rm -f "ldap/servers/plugins/pwdstorage/$(DEPDIR)/libpwdstorage_plugin_la-clear_pwd.Tpo"; exit 1; fi
@@ -7629,13 +7533,6 @@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libviews_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ldap/servers/plugins/views/libviews_plugin_la-views.lo `test -f 'ldap/servers/plugins/views/views.c' || echo '$(srcdir)/'`ldap/servers/plugins/views/views.c
-ldap/servers/plugins/xor/libxor_plugin_la-xorplugin.lo: ldap/servers/plugins/xor/xorplugin.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxor_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ldap/servers/plugins/xor/libxor_plugin_la-xorplugin.lo -MD -MP -MF "ldap/servers/plugins/xor/$(DEPDIR)/libxor_plugin_la-xorplugin.Tpo" -c -o ldap/servers/plugins/xor/libxor_plugin_la-xorplugin.lo `test -f 'ldap/servers/plugins/xor/xorplugin.c' || echo '$(srcdir)/'`ldap/servers/plugins/xor/xorplugin.c; \
-@am__fastdepCC_TRUE@ then mv -f "ldap/servers/plugins/xor/$(DEPDIR)/libxor_plugin_la-xorplugin.Tpo" "ldap/servers/plugins/xor/$(DEPDIR)/libxor_plugin_la-xorplugin.Plo"; else rm -f "ldap/servers/plugins/xor/$(DEPDIR)/libxor_plugin_la-xorplugin.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ldap/servers/plugins/xor/xorplugin.c' object='ldap/servers/plugins/xor/libxor_plugin_la-xorplugin.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxor_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ldap/servers/plugins/xor/libxor_plugin_la-xorplugin.lo `test -f 'ldap/servers/plugins/xor/xorplugin.c' || echo '$(srcdir)/'`ldap/servers/plugins/xor/xorplugin.c
-
ldap/servers/slapd/tools/dbscan_bin-dbscan.o: ldap/servers/slapd/tools/dbscan.c
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbscan_bin_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ldap/servers/slapd/tools/dbscan_bin-dbscan.o -MD -MP -MF "ldap/servers/slapd/tools/$(DEPDIR)/dbscan_bin-dbscan.Tpo" -c -o ldap/servers/slapd/tools/dbscan_bin-dbscan.o `test -f 'ldap/servers/slapd/tools/dbscan.c' || echo '$(srcdir)/'`ldap/servers/slapd/tools/dbscan.c; \
@am__fastdepCC_TRUE@ then mv -f "ldap/servers/slapd/tools/$(DEPDIR)/dbscan_bin-dbscan.Tpo" "ldap/servers/slapd/tools/$(DEPDIR)/dbscan_bin-dbscan.Po"; else rm -f "ldap/servers/slapd/tools/$(DEPDIR)/dbscan_bin-dbscan.Tpo"; exit 1; fi
@@ -8893,11 +8790,9 @@
-rm -rf ldap/servers/plugins/distrib/.libs ldap/servers/plugins/distrib/_libs
-rm -rf ldap/servers/plugins/dna/.libs ldap/servers/plugins/dna/_libs
-rm -rf ldap/servers/plugins/http/.libs ldap/servers/plugins/http/_libs
- -rm -rf ldap/servers/plugins/othercrypto/.libs ldap/servers/plugins/othercrypto/_libs
-rm -rf ldap/servers/plugins/pam_passthru/.libs ldap/servers/plugins/pam_passthru/_libs
-rm -rf ldap/servers/plugins/passthru/.libs ldap/servers/plugins/passthru/_libs
-rm -rf ldap/servers/plugins/presence/.libs ldap/servers/plugins/presence/_libs
- -rm -rf ldap/servers/plugins/pwderror/.libs ldap/servers/plugins/pwderror/_libs
-rm -rf ldap/servers/plugins/pwdstorage/.libs ldap/servers/plugins/pwdstorage/_libs
-rm -rf ldap/servers/plugins/referint/.libs ldap/servers/plugins/referint/_libs
-rm -rf ldap/servers/plugins/replication/.libs ldap/servers/plugins/replication/_libs
@@ -8909,7 +8804,6 @@
-rm -rf ldap/servers/plugins/syntaxes/.libs ldap/servers/plugins/syntaxes/_libs
-rm -rf ldap/servers/plugins/uiduniq/.libs ldap/servers/plugins/uiduniq/_libs
-rm -rf ldap/servers/plugins/views/.libs ldap/servers/plugins/views/_libs
- -rm -rf ldap/servers/plugins/xor/.libs ldap/servers/plugins/xor/_libs
-rm -rf ldap/servers/slapd/.libs ldap/servers/slapd/_libs
-rm -rf ldap/servers/slapd/back-ldbm/.libs ldap/servers/slapd/back-ldbm/_libs
-rm -rf lib/base/.libs lib/base/_libs
@@ -9252,16 +9146,12 @@
-rm -f ldap/servers/plugins/dna/$(am__dirstamp)
-rm -f ldap/servers/plugins/http/$(DEPDIR)/$(am__dirstamp)
-rm -f ldap/servers/plugins/http/$(am__dirstamp)
- -rm -f ldap/servers/plugins/othercrypto/$(DEPDIR)/$(am__dirstamp)
- -rm -f ldap/servers/plugins/othercrypto/$(am__dirstamp)
-rm -f ldap/servers/plugins/pam_passthru/$(DEPDIR)/$(am__dirstamp)
-rm -f ldap/servers/plugins/pam_passthru/$(am__dirstamp)
-rm -f ldap/servers/plugins/passthru/$(DEPDIR)/$(am__dirstamp)
-rm -f ldap/servers/plugins/passthru/$(am__dirstamp)
-rm -f ldap/servers/plugins/presence/$(DEPDIR)/$(am__dirstamp)
-rm -f ldap/servers/plugins/presence/$(am__dirstamp)
- -rm -f ldap/servers/plugins/pwderror/$(DEPDIR)/$(am__dirstamp)
- -rm -f ldap/servers/plugins/pwderror/$(am__dirstamp)
-rm -f ldap/servers/plugins/pwdstorage/$(DEPDIR)/$(am__dirstamp)
-rm -f ldap/servers/plugins/pwdstorage/$(am__dirstamp)
-rm -f ldap/servers/plugins/referint/$(DEPDIR)/$(am__dirstamp)
@@ -9284,8 +9174,6 @@
-rm -f ldap/servers/plugins/uiduniq/$(am__dirstamp)
-rm -f ldap/servers/plugins/views/$(DEPDIR)/$(am__dirstamp)
-rm -f ldap/servers/plugins/views/$(am__dirstamp)
- -rm -f ldap/servers/plugins/xor/$(DEPDIR)/$(am__dirstamp)
- -rm -f ldap/servers/plugins/xor/$(am__dirstamp)
-rm -f ldap/servers/slapd/$(DEPDIR)/$(am__dirstamp)
-rm -f ldap/servers/slapd/$(am__dirstamp)
-rm -f ldap/servers/slapd/back-ldbm/$(DEPDIR)/$(am__dirstamp)
@@ -9324,7 +9212,7 @@
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf ldap/admin/lib/$(DEPDIR) ldap/admin/src/$(DEPDIR) ldap/libraries/libavl/$(DEPDIR) ldap/servers/plugins/acl/$(DEPDIR) ldap/servers/plugins/bitwise/$(DEPDIR) ldap/servers/plugins/chainingdb/$(DEPDIR) ldap/servers/plugins/collation/$(DEPDIR) ldap/servers/plugins/cos/$(DEPDIR) ldap/servers/plugins/distrib/$(DEPDIR) ldap/servers/plugins/dna/$(DEPDIR) ldap/servers/plugins/http/$(DEPDIR) ldap/servers/plugins/othercrypto/$(DEPDIR) ldap/servers/plugins/pam_passthru/$(DEPDIR) ldap/servers/plugins/passthru/$(DEPDIR) ldap/servers/plugins/presence/$(DEPDIR) ldap/servers/plugins/pwderror/$(DEPDIR) ldap/servers/plugins/pwdstorage/$(DEPDIR) ldap/servers/plugins/referint/$(DEPDIR) ldap/servers/plugins/replication/$(DEPDIR) ldap/servers/plugins/retrocl/$(DEPDIR) ldap/servers/plugins/rever/$(DEPDIR) ldap/servers/plugins/roles/$(DEPDIR) ldap/servers/plugins/shared/$(DEPDIR) ldap/servers/plugins/statechange/$(DEPDIR) ldap/servers/plugins/syntaxes/$(DEPDIR) ldap/servers/plugins/uiduniq/!
$(DEPDIR) ldap/servers/plugins/views/$(DEPDIR) ldap/servers/plugins/xor/$(DEPDIR) ldap/servers/slapd/$(DEPDIR) ldap/servers/slapd/back-ldbm/$(DEPDIR) ldap/servers/slapd/tools/$(DEPDIR) ldap/servers/slapd/tools/ldclt/$(DEPDIR) ldap/servers/slapd/tools/rsearch/$(DEPDIR) ldap/servers/snmp/$(DEPDIR) ldap/systools/$(DEPDIR) lib/base/$(DEPDIR) lib/ldaputil/$(DEPDIR) lib/libaccess/$(DEPDIR) lib/libadmin/$(DEPDIR) lib/libsi18n/$(DEPDIR)
+ -rm -rf ldap/admin/lib/$(DEPDIR) ldap/admin/src/$(DEPDIR) ldap/libraries/libavl/$(DEPDIR) ldap/servers/plugins/acl/$(DEPDIR) ldap/servers/plugins/bitwise/$(DEPDIR) ldap/servers/plugins/chainingdb/$(DEPDIR) ldap/servers/plugins/collation/$(DEPDIR) ldap/servers/plugins/cos/$(DEPDIR) ldap/servers/plugins/distrib/$(DEPDIR) ldap/servers/plugins/dna/$(DEPDIR) ldap/servers/plugins/http/$(DEPDIR) ldap/servers/plugins/pam_passthru/$(DEPDIR) ldap/servers/plugins/passthru/$(DEPDIR) ldap/servers/plugins/presence/$(DEPDIR) ldap/servers/plugins/pwdstorage/$(DEPDIR) ldap/servers/plugins/referint/$(DEPDIR) ldap/servers/plugins/replication/$(DEPDIR) ldap/servers/plugins/retrocl/$(DEPDIR) ldap/servers/plugins/rever/$(DEPDIR) ldap/servers/plugins/roles/$(DEPDIR) ldap/servers/plugins/shared/$(DEPDIR) ldap/servers/plugins/statechange/$(DEPDIR) ldap/servers/plugins/syntaxes/$(DEPDIR) ldap/servers/plugins/uiduniq/$(DEPDIR) ldap/servers/plugins/views/$(DEPDIR) ldap/servers/slapd/$(DEPDIR) ldap/se!
rvers/slapd/back-ldbm/$(DEPDIR) ldap/servers/slapd/tools/$(DEPDIR) ldap/servers/slapd/tools/ldclt/$(DEPDIR) ldap/servers/slapd/tools/rsearch/$(DEPDIR) ldap/servers/snmp/$(DEPDIR) ldap/systools/$(DEPDIR) lib/base/$(DEPDIR) lib/ldaputil/$(DEPDIR) lib/libaccess/$(DEPDIR) lib/libadmin/$(DEPDIR) lib/libsi18n/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-tags
@@ -9358,7 +9246,7 @@
maintainer-clean: maintainer-clean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
- -rm -rf ldap/admin/lib/$(DEPDIR) ldap/admin/src/$(DEPDIR) ldap/libraries/libavl/$(DEPDIR) ldap/servers/plugins/acl/$(DEPDIR) ldap/servers/plugins/bitwise/$(DEPDIR) ldap/servers/plugins/chainingdb/$(DEPDIR) ldap/servers/plugins/collation/$(DEPDIR) ldap/servers/plugins/cos/$(DEPDIR) ldap/servers/plugins/distrib/$(DEPDIR) ldap/servers/plugins/dna/$(DEPDIR) ldap/servers/plugins/http/$(DEPDIR) ldap/servers/plugins/othercrypto/$(DEPDIR) ldap/servers/plugins/pam_passthru/$(DEPDIR) ldap/servers/plugins/passthru/$(DEPDIR) ldap/servers/plugins/presence/$(DEPDIR) ldap/servers/plugins/pwderror/$(DEPDIR) ldap/servers/plugins/pwdstorage/$(DEPDIR) ldap/servers/plugins/referint/$(DEPDIR) ldap/servers/plugins/replication/$(DEPDIR) ldap/servers/plugins/retrocl/$(DEPDIR) ldap/servers/plugins/rever/$(DEPDIR) ldap/servers/plugins/roles/$(DEPDIR) ldap/servers/plugins/shared/$(DEPDIR) ldap/servers/plugins/statechange/$(DEPDIR) ldap/servers/plugins/syntaxes/$(DEPDIR) ldap/servers/plugins/uiduniq/!
$(DEPDIR) ldap/servers/plugins/views/$(DEPDIR) ldap/servers/plugins/xor/$(DEPDIR) ldap/servers/slapd/$(DEPDIR) ldap/servers/slapd/back-ldbm/$(DEPDIR) ldap/servers/slapd/tools/$(DEPDIR) ldap/servers/slapd/tools/ldclt/$(DEPDIR) ldap/servers/slapd/tools/rsearch/$(DEPDIR) ldap/servers/snmp/$(DEPDIR) ldap/systools/$(DEPDIR) lib/base/$(DEPDIR) lib/ldaputil/$(DEPDIR) lib/libaccess/$(DEPDIR) lib/libadmin/$(DEPDIR) lib/libsi18n/$(DEPDIR)
+ -rm -rf ldap/admin/lib/$(DEPDIR) ldap/admin/src/$(DEPDIR) ldap/libraries/libavl/$(DEPDIR) ldap/servers/plugins/acl/$(DEPDIR) ldap/servers/plugins/bitwise/$(DEPDIR) ldap/servers/plugins/chainingdb/$(DEPDIR) ldap/servers/plugins/collation/$(DEPDIR) ldap/servers/plugins/cos/$(DEPDIR) ldap/servers/plugins/distrib/$(DEPDIR) ldap/servers/plugins/dna/$(DEPDIR) ldap/servers/plugins/http/$(DEPDIR) ldap/servers/plugins/pam_passthru/$(DEPDIR) ldap/servers/plugins/passthru/$(DEPDIR) ldap/servers/plugins/presence/$(DEPDIR) ldap/servers/plugins/pwdstorage/$(DEPDIR) ldap/servers/plugins/referint/$(DEPDIR) ldap/servers/plugins/replication/$(DEPDIR) ldap/servers/plugins/retrocl/$(DEPDIR) ldap/servers/plugins/rever/$(DEPDIR) ldap/servers/plugins/roles/$(DEPDIR) ldap/servers/plugins/shared/$(DEPDIR) ldap/servers/plugins/statechange/$(DEPDIR) ldap/servers/plugins/syntaxes/$(DEPDIR) ldap/servers/plugins/uiduniq/$(DEPDIR) ldap/servers/plugins/views/$(DEPDIR) ldap/servers/slapd/$(DEPDIR) ldap/se!
rvers/slapd/back-ldbm/$(DEPDIR) ldap/servers/slapd/tools/$(DEPDIR) ldap/servers/slapd/tools/ldclt/$(DEPDIR) ldap/servers/slapd/tools/rsearch/$(DEPDIR) ldap/servers/snmp/$(DEPDIR) ldap/systools/$(DEPDIR) lib/base/$(DEPDIR) lib/ldaputil/$(DEPDIR) lib/libaccess/$(DEPDIR) lib/libadmin/$(DEPDIR) lib/libsi18n/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
16 years, 10 months
[Fedora-directory-commits] adminserver Makefile.am, 1.8, 1.9 Makefile.in, 1.8, 1.9 configure, 1.7, 1.8 configure.ac, 1.5, 1.6
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/adminserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4913
Modified Files:
Makefile.am Makefile.in configure configure.ac
Log Message:
Resolves: #244325
Summary: init script for the Admin Server
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/adminserver/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Makefile.am 13 Jun 2007 17:48:34 -0000 1.8
+++ Makefile.am 15 Jun 2007 17:13:02 -0000 1.9
@@ -119,6 +119,8 @@
SETUPUTIL_LIBS = @setuputil_lib@ -ldsinstall
+init_SCRIPTS = wrappers/$(PACKAGE_NAME)
+
ldif_DATA = admserv/schema/ldif/00nsroot_backend.ldif.tmpl \
admserv/schema/ldif/01nsroot.ldif.tmpl \
admserv/schema/ldif/02globalpreferences.ldif.tmpl \
@@ -128,7 +130,7 @@
admserv/schema/ldif/21astasks.ldif.tmpl \
admserv/schema/ldif/22ascommands.ldif.tmpl
-inf_DATA = admserv/newinst/src/admin.inf admserv/newinst/src/register_param.map
+inf_DATA = admserv/newinst/src/admin.inf admserv/newinst/src/register_param.map admserv/newinst/common/setup.inf
cgibin_PROGRAMS = mergeConfig admpw security ugdsconfig ReadLog start_config_ds \
config statpingserv viewdata dsconfig monreplication restartsrv \
@@ -357,8 +359,12 @@
# i.e. it literally copies in '${prefix}' rather than expanding it out - we want this instead:
# ADMConfigDir = /etc/packagename
fixupcmd = sed \
+ -e 's,@ECHO_C\@,$(ECHO_C),g' \
+ -e 's,@ECHO_N\@,$(ECHO_N),g' \
-e 's,@HTTPD\@,$(HTTPD),g' \
-e 's,@bindir\@,$(bindir),g' \
+ -e 's,@sbindir\@,$(sbindir),g' \
+ -e 's,@localstatedir\@,$(localstatedir),g' \
-e 's,@cgibindir\@,$(cgibindir),g' \
-e 's,@cmdbindir\@,$(cmdbindir),g' \
-e 's,@moddir\@,$(moddir),g' \
@@ -388,6 +394,7 @@
-e 's,@instancename\@,$(instancename),g' \
-e 's,@BUILD_NUM\@,$(BUILDNUM),g' \
-e 's,@NQBUILD_NUM\@,$(NQBUILDNUM),g' \
+ -e 's,@package_name\@,$(PACKAGE_NAME),g' \
-e 's,@PACKAGE_BASE_NAME\@,$(PACKAGE_BASE_NAME),g' \
-e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
-e 's,@brand\@,$(brand),g' \
@@ -395,6 +402,8 @@
-e 's,@vendor\@,$(vendor),g' \
-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'
# because the source may be either httpd.conf.in or httpd-2.2.conf.in
@@ -405,3 +414,7 @@
% : %.in
if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi
$(fixupcmd) $< > $@
+
+%/$(PACKAGE_NAME): %/initscript.in
+ if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi
+ $(fixupcmd) $^ > $@
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/adminserver/Makefile.in,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Makefile.in 13 Jun 2007 17:48:34 -0000 1.8
+++ Makefile.in 15 Jun 2007 17:13:02 -0000 1.9
@@ -103,11 +103,12 @@
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cgibindir)" \
"$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cmdbindir)" \
- "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(perldir)" \
- "$(DESTDIR)$(helpdir)" "$(DESTDIR)$(htmldir)" \
- "$(DESTDIR)$(icondir)" "$(DESTDIR)$(infdir)" \
- "$(DESTDIR)$(ldifdir)" "$(DESTDIR)$(configdir)" \
- "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)"
+ "$(DESTDIR)$(initdir)" "$(DESTDIR)$(cmdbindir)" \
+ "$(DESTDIR)$(perldir)" "$(DESTDIR)$(helpdir)" \
+ "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(icondir)" \
+ "$(DESTDIR)$(infdir)" "$(DESTDIR)$(ldifdir)" \
+ "$(DESTDIR)$(configdir)" "$(DESTDIR)$(propertydir)" \
+ "$(DESTDIR)$(propertydir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
libds_admin_serv_la_LIBADD =
@@ -266,10 +267,11 @@
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
cgibinSCRIPT_INSTALL = $(INSTALL_SCRIPT)
cmdbinSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+initSCRIPT_INSTALL = $(INSTALL_SCRIPT)
nodist_cmdbinSCRIPT_INSTALL = $(INSTALL_SCRIPT)
perlSCRIPT_INSTALL = $(INSTALL_SCRIPT)
SCRIPTS = $(bin_SCRIPTS) $(cgibin_SCRIPTS) $(cmdbin_SCRIPTS) \
- $(nodist_cmdbin_SCRIPTS) $(perl_SCRIPTS)
+ $(init_SCRIPTS) $(nodist_cmdbin_SCRIPTS) $(perl_SCRIPTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -472,6 +474,7 @@
includedir = @includedir@
infdir = $(datadir)@infdir@
infodir = @infodir@
+initdir = $(sysconfdir)@initdir@
install_sh = @install_sh@
instancename = @instancename@
instconfigdir = @instconfigdir@
@@ -509,6 +512,7 @@
setuputil_inc = @setuputil_inc@
setuputil_lib = @setuputil_lib@
setuputil_libdir = @setuputil_libdir@
+shared_lib_suffix = @shared_lib_suffix@
sharedstatedir = @sharedstatedir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
@@ -551,7 +555,6 @@
@MOD_RESTARTD_TRUE@MOD_RESTARTD_SUB = mod_restartd
SUBDIRS = $(MOD_ADMSERV_SUB) $(MOD_RESTARTD_SUB)
helpdir = $(manualdir)/help
-initdir = $(sysconfdir)@initdir@
configdir = $(instconfigdir)/$(instancename)
# same as configdir for now
securitydir = $(configdir)
@@ -584,6 +587,7 @@
@nss_lib@ -lsmime3 -lssl3 -lnss3 @nspr_lib@ -lnspr4 -lplc4
SETUPUTIL_LIBS = @setuputil_lib@ -ldsinstall
+init_SCRIPTS = wrappers/$(PACKAGE_NAME)
ldif_DATA = admserv/schema/ldif/00nsroot_backend.ldif.tmpl \
admserv/schema/ldif/01nsroot.ldif.tmpl \
admserv/schema/ldif/02globalpreferences.ldif.tmpl \
@@ -593,7 +597,7 @@
admserv/schema/ldif/21astasks.ldif.tmpl \
admserv/schema/ldif/22ascommands.ldif.tmpl
-inf_DATA = admserv/newinst/src/admin.inf admserv/newinst/src/register_param.map
+inf_DATA = admserv/newinst/src/admin.inf admserv/newinst/src/register_param.map admserv/newinst/common/setup.inf
bin_SCRIPTS = admserv/newinst/src/register_server.pl
cgibin_SCRIPTS = admserv/cgi-src40/Cgi.pm
nodist_cmdbin_SCRIPTS = admserv/cfgstuff/start-ds-admin admserv/cfgstuff/stop-ds-admin admserv/cfgstuff/restart-ds-admin
@@ -773,8 +777,12 @@
# i.e. it literally copies in '${prefix}' rather than expanding it out - we want this instead:
# ADMConfigDir = /etc/packagename
fixupcmd = sed \
+ -e 's,@ECHO_C\@,$(ECHO_C),g' \
+ -e 's,@ECHO_N\@,$(ECHO_N),g' \
-e 's,@HTTPD\@,$(HTTPD),g' \
-e 's,@bindir\@,$(bindir),g' \
+ -e 's,@sbindir\@,$(sbindir),g' \
+ -e 's,@localstatedir\@,$(localstatedir),g' \
-e 's,@cgibindir\@,$(cgibindir),g' \
-e 's,@cmdbindir\@,$(cmdbindir),g' \
-e 's,@moddir\@,$(moddir),g' \
@@ -804,6 +812,7 @@
-e 's,@instancename\@,$(instancename),g' \
-e 's,@BUILD_NUM\@,$(BUILDNUM),g' \
-e 's,@NQBUILD_NUM\@,$(NQBUILDNUM),g' \
+ -e 's,@package_name\@,$(PACKAGE_NAME),g' \
-e 's,@PACKAGE_BASE_NAME\@,$(PACKAGE_BASE_NAME),g' \
-e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
-e 's,@brand\@,$(brand),g' \
@@ -811,6 +820,8 @@
-e 's,@vendor\@,$(vendor),g' \
-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'
all: config.h
@@ -1376,6 +1387,25 @@
echo " rm -f '$(DESTDIR)$(cmdbindir)/$$f'"; \
rm -f "$(DESTDIR)$(cmdbindir)/$$f"; \
done
+install-initSCRIPTS: $(init_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(initdir)" || $(mkdir_p) "$(DESTDIR)$(initdir)"
+ @list='$(init_SCRIPTS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f $$d$$p; then \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " $(initSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(initdir)/$$f'"; \
+ $(initSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(initdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-initSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(init_SCRIPTS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " rm -f '$(DESTDIR)$(initdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(initdir)/$$f"; \
+ done
install-nodist_cmdbinSCRIPTS: $(nodist_cmdbin_SCRIPTS)
@$(NORMAL_INSTALL)
test -z "$(cmdbindir)" || $(mkdir_p) "$(DESTDIR)$(cmdbindir)"
@@ -2704,7 +2734,7 @@
$(DATA) config.h
installdirs: installdirs-recursive
installdirs-am:
- for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(perldir)" "$(DESTDIR)$(helpdir)" "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(icondir)" "$(DESTDIR)$(infdir)" "$(DESTDIR)$(ldifdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)"; do \
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(perldir)" "$(DESTDIR)$(helpdir)" "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(icondir)" "$(DESTDIR)$(infdir)" "$(DESTDIR)$(ldifdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-recursive
@@ -2772,10 +2802,10 @@
install-data-am: install-cgibinPROGRAMS install-cgibinSCRIPTS \
install-cmdbinPROGRAMS install-cmdbinSCRIPTS \
install-dist_helpDATA install-dist_htmlDATA \
- install-dist_iconDATA install-infDATA install-ldifDATA \
- install-nodist_cmdbinSCRIPTS install-nodist_configDATA \
- install-nodist_propertyDATA install-perlSCRIPTS \
- install-propertyDATA
+ install-dist_iconDATA install-infDATA install-initSCRIPTS \
+ install-ldifDATA install-nodist_cmdbinSCRIPTS \
+ install-nodist_configDATA install-nodist_propertyDATA \
+ install-perlSCRIPTS install-propertyDATA
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
@@ -2811,10 +2841,11 @@
uninstall-cgibinSCRIPTS uninstall-cmdbinPROGRAMS \
uninstall-cmdbinSCRIPTS uninstall-dist_helpDATA \
uninstall-dist_htmlDATA uninstall-dist_iconDATA \
- uninstall-infDATA uninstall-info-am uninstall-ldifDATA \
- uninstall-libLTLIBRARIES uninstall-nodist_cmdbinSCRIPTS \
- uninstall-nodist_configDATA uninstall-nodist_propertyDATA \
- uninstall-perlSCRIPTS uninstall-propertyDATA
+ uninstall-infDATA uninstall-info-am uninstall-initSCRIPTS \
+ uninstall-ldifDATA uninstall-libLTLIBRARIES \
+ uninstall-nodist_cmdbinSCRIPTS uninstall-nodist_configDATA \
+ uninstall-nodist_propertyDATA uninstall-perlSCRIPTS \
+ uninstall-propertyDATA
uninstall-info: uninstall-info-recursive
@@ -2832,24 +2863,25 @@
install-cmdbinSCRIPTS install-data install-data-am \
install-data-hook install-dist_helpDATA install-dist_htmlDATA \
install-dist_iconDATA install-exec install-exec-am \
- install-infDATA install-info install-info-am install-ldifDATA \
- install-libLTLIBRARIES install-man \
- install-nodist_cmdbinSCRIPTS install-nodist_configDATA \
- install-nodist_propertyDATA install-perlSCRIPTS \
- install-propertyDATA install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
- tags tags-recursive uninstall uninstall-am \
+ install-infDATA install-info install-info-am \
+ install-initSCRIPTS install-ldifDATA install-libLTLIBRARIES \
+ install-man install-nodist_cmdbinSCRIPTS \
+ install-nodist_configDATA install-nodist_propertyDATA \
+ install-perlSCRIPTS install-propertyDATA install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-binSCRIPTS uninstall-cgibinPROGRAMS \
uninstall-cgibinSCRIPTS uninstall-cmdbinPROGRAMS \
uninstall-cmdbinSCRIPTS uninstall-dist_helpDATA \
uninstall-dist_htmlDATA uninstall-dist_iconDATA \
- uninstall-infDATA uninstall-info-am uninstall-ldifDATA \
- uninstall-libLTLIBRARIES uninstall-nodist_cmdbinSCRIPTS \
- uninstall-nodist_configDATA uninstall-nodist_propertyDATA \
- uninstall-perlSCRIPTS uninstall-propertyDATA
+ uninstall-infDATA uninstall-info-am uninstall-initSCRIPTS \
+ uninstall-ldifDATA uninstall-libLTLIBRARIES \
+ uninstall-nodist_cmdbinSCRIPTS uninstall-nodist_configDATA \
+ uninstall-nodist_propertyDATA uninstall-perlSCRIPTS \
+ uninstall-propertyDATA
define NL
\\n
@@ -2890,6 +2922,10 @@
% : %.in
if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi
$(fixupcmd) $< > $@
+
+%/$(PACKAGE_NAME): %/initscript.in
+ if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi
+ $(fixupcmd) $^ > $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
Index: configure
===================================================================
RCS file: /cvs/dirsec/adminserver/configure,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- configure 13 Jun 2007 17:48:34 -0000 1.7
+++ configure 15 Jun 2007 17:13:02 -0000 1.8
@@ -468,7 +468,7 @@
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 EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CX!
XCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS 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 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_files=''
# Initialize some variables set by options.
@@ -23195,6 +23195,25 @@
localstatedir='/var'
fi
+shared_lib_suffix=.so
+initdir=/rc.d
+case $host in
+ *-*-linux*)
+ initdir=/rc.d/init.d
+ ;;
+ ia64-hp-hpux*)
+ ;;
+ hppa*-hp-hpux*)
+ shared_lib_suffix=.sl
+ ;;
+ sparc-sun-solaris*)
+ initdir=/init.d
+ ;;
+ *)
+esac
+
+
+
# Check for web server
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2006 Red Hat, Inc.
@@ -24663,6 +24682,7 @@
+
# write out paths for data/config files
@@ -25507,6 +25527,8 @@
s,@ac_ct_F77@,$ac_ct_F77,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
s,@LIBOBJS@,$LIBOBJS,;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
Index: configure.ac
===================================================================
RCS file: /cvs/dirsec/adminserver/configure.ac,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- configure.ac 8 Jun 2007 22:49:18 -0000 1.5
+++ configure.ac 15 Jun 2007 17:13:02 -0000 1.6
@@ -80,6 +80,25 @@
localstatedir='/var'
fi
+shared_lib_suffix=.so
+initdir=/rc.d
+case $host in
+ *-*-linux*)
+ initdir=/rc.d/init.d
+ ;;
+ ia64-hp-hpux*)
+ ;;
+ hppa*-hp-hpux*)
+ shared_lib_suffix=.sl
+ ;;
+ sparc-sun-solaris*)
+ initdir=/init.d
+ ;;
+ *)
+esac
+AC_SUBST(initdir)
+AC_SUBST(shared_lib_suffix)
+
# Check for web server
m4_include(m4/httpd.m4)
@@ -146,6 +165,7 @@
perldir=/$PACKAGE_BASE_NAME/perl
# write out paths for binary components
+AC_SUBST(PACKAGE_NAME)
AC_SUBST(PACKAGE_BASE_NAME)
AC_SUBST(nspr_inc)
AC_SUBST(nspr_lib)
16 years, 10 months
[Fedora-directory-commits] adminserver/wrappers initscript.in, NONE, 1.1
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/adminserver/wrappers
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4913/wrappers
Added Files:
initscript.in
Log Message:
Resolves: #244325
Summary: init script for the Admin Server
--- NEW FILE initscript.in ---
#!/bin/sh
#
# @package_name@ This starts and stops @package_name@
#
# chkconfig: - 21 79
# description: @package_name@ Admin Server
# processname: @sbindir@/httpd
# piddir: @localstatedir@/run/@PACKAGE_BASE_NAME@
#
# Source function library.
if [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
fi
# Source networking configuration.
if [ -f /etc/sysconfig/network ] ; then
. /etc/sysconfig/network
fi
# Check that networking is up.
if [ "${NETWORKING}" = "no" ]
then
echo "Networking is down"
exit 0
fi
# Solaris echo cannot use -n - linux echo by default cannot use \c
echo_n()
{
echo @ECHO_N@ "$*@ECHO_C@"
}
# failure and success are not defined on some platforms
type failure > /dev/null 2>&1 || {
failure()
{
echo_n " FAILED"
}
}
type success > /dev/null 2>&1 || {
success()
{
echo_n " SUCCESS"
}
}
# On Solaris /var/run is in tmpfs and gets wiped out upon reboot
# we have to recreate the /var/run/@package_name@ directory
# We also have to make sure that the directory is writable
# by the directory server process
# the argument to this function is the server instance directory,
# which must have a dse.ldif file in it
fix_pid_dir_ownership()
{
if [ -d $piddir ] ; then
owner=`grep \^sysuser @instconfigdir(a)/admin-serv/adm.conf | awk '{print $2}'`
dirowner=`ls -ld $piddir | awk '{print $3}'`
dirgrp=`ls -ld $piddir | awk '{print $4}'`
if [ "$owner" != "$dirowner" ]; then
groups $owner | grep $dirgrp > /dev/null 2>&1
rc=$?
if [ $rc -eq 0 ]; then
chmod 770 $piddir
else
echo_n "$piddir is not writable for $owner"
failure; echo
exit 1
fi
fi
else
mkdir -p $piddir
owner=`grep \^nsslapd-localuser $1/dse.ldif | awk '{print $2}'`
if [ -n "$owner" ] ; then
chown $owner $piddir
chmod 700 $piddir
fi
fi
}
start_script=@sbindir@/start-ds-admin
restart_script=@sbindir@/restart-ds-admin
stop_script=@sbindir@/stop-ds-admin
exec=`grep "^HTTPD=" $start_script | awk -F= '{print $2}'`
prog="@package_name@"
# PID directory
piddir="@localstatedir@/run/@PACKAGE_BASE_NAME@"
# PID file
pidfile=$piddir/admin-serv.pid
[ -f $exec ] || exit 0
umask 077
start() {
if [ ! -f $start_script ]; then
echo_n "*** Error: $start_script does not exist"
failure; echo
exit 1
fi
echo "Starting $prog: "
# Start every slapd instance that isn't already running
# the server creates pidfile and writes the pid to it when it is fully
# started and available to serve clients
server_running=0
if [ -f $pidfile ]; then
pid=`cat $pidfile`
if kill -0 $pid > /dev/null 2>&1 ; then
echo_n " already running"
success; echo
server_running=1
else
echo_n " not running, but pid file exists - attempt to start anyway..."
rm -f $pidfile
fi
fi
server_started=0
if [ $server_running -eq 0 ] ; then
rm -f $pidfile
fix_pid_dir_ownership
$start_script
if [ $? -eq 0 ]; then
server_started=1 # well, perhaps not running, but started ok
else
failure; echo
fi
fi
if [ $server_started -eq 1 ] ; then
loop_counter=1
# wait for 10 minutes (600 times 1 seconds)
max_count=600
while test $loop_counter -le $max_count ; do
loop_counter=`expr $loop_counter + 1`
if test ! -f $pidfile ; then
sleep 1
else
pid=`cat $pidfile`
break
fi
done
if kill -0 $pid > /dev/null 2>&1 && test -f $pidfile ; then
success; echo
else
echo_n "*** Error: $prog failed to start"
failure; echo
fi
fi
}
stop() {
if [ ! -f $stop_script ]; then
echo_n "$stop_script does not exist"
failure; echo
exit 1
fi
echo "Shutting down $prog: "
if [ -f $pidfile ]; then
pid=`cat $pidfile`
server_stopped=0
if kill -0 $pid > /dev/null 2>&1 ; then
kill $pid
if [ $? -eq 0 ]; then
server_stopped=1
else
failure; echo
fi
fi
if [ $server_stopped -eq 1 ] ; then
loop_counter=1
# wait for 10 minutes (600 times 1 second)
max_count=600
while test $loop_counter -le $max_count; do
loop_counter=`expr $loop_counter + 1`
if kill -0 $pid > /dev/null 2>&1 ; then
sleep 1
else
if test -f $pidfile ; then
rm -f $pidfile
fi
break
fi
done
if test -f $pidfile ; then
echo_n "*** Error: $prog failed to stop"
failure; echo
else
success; echo
rm -f $pidfile
fi
fi
fi
}
restart() {
stop
start
}
status() {
if [ -f $pidfile ]; then
pid=`cat $pidfile`
if kill -0 $pid > /dev/null 2>&1 ; then
echo "$prog (pid $pid) is running..."
else
echo "$prog dead but pid file exists"
fi
else
echo "$prog is stopped"
fi
}
case "$1" in
start|stop|restart|reload|status)
$1
;;
condrestart)
[ ! -f $lockfile ] || restart
;;
*)
echo Unknown command $1
echo "Usage: $0 {start|stop|status|restart|condrestart}"
exit 2
esac
16 years, 10 months
[Fedora-directory-commits] adminserver/admserv/newinst/common setup.inf.in, NONE, 1.1 setup.inf, 1.6, NONE
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/adminserver/admserv/newinst/common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4249
Added Files:
setup.inf.in
Removed Files:
setup.inf
Log Message:
Resolves: 237356
Summary: Move DS Admin Code into Admin Server (Comment #63)
Description: providing setup.inf having the static server info for the
setup/config
--- NEW FILE setup.inf.in ---
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
# Copyright (C) 2007 Red Hat, Inc.
# All rights reserved.
#
# 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; either version 2
# of the License, or (at your option) any later version.
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# END COPYRIGHT BLOCK
#
# Sample Fedora Server Package Information File
#
# Components: lists the components to be installed as specified
# in subsequent sections. If the section or the ComponentInfoFile
# does note exist the setup program will ignore the component
[General]
Name = @capbrand@ Server Products
Vendor = @capbrand@ Project
Description = @capbrand@ Server Products Installation
Version = @PACKAGE_VERSION@
Brand = @capbrand@
NormBrand = @brand@
--- setup.inf DELETED ---
16 years, 10 months
[Fedora-directory-commits] ldapserver/ldap/cm/newinst slapd.inf.in, NONE, 1.1 slapd.inf, 1.8, NONE
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/cm/newinst
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29421/ldap/cm/newinst
Added Files:
slapd.inf.in
Removed Files:
slapd.inf
Log Message:
Resolves: 237356
Summary: Move DS Admin Code into Admin Server (Comment #62)
Description: providing slapd.inf having the DS static info for the setup/config
--- 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= @BUILDNUM@
Expires= 0
Security= domestic
Vendor= @vendor@
Description= @capbrand@ Directory Server
ProductName=Directory Server
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
--- slapd.inf DELETED ---
16 years, 10 months