Author: nhosoi
Update of /cvs/dirsec/adminserver/admserv/newinst/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12280/admserv/newinst/src
Modified Files:
AdminUtil.pm.in dirserver.map.in register_param.map.in
setup-ds-admin.pl.in
Log Message:
Resolves: #244749
Summary: Configure Pass Thru Auth (comment #27)
Adding "cn=pass through authentication" to the subordinative DS instances
(createSubDS in AdminUtil.pm) as well as the calling point to
setup-ds-admin.pl.in in case the new server is non-configuration DS.
Index: AdminUtil.pm.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/AdminUtil.pm.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- AdminUtil.pm.in 27 Jun 2007 18:32:46 -0000 1.5
+++ AdminUtil.pm.in 28 Jun 2007 16:24:41 -0000 1.6
@@ -39,10 +39,10 @@
package AdminUtil;
require Exporter;
@ISA = qw(Exporter);
-@EXPORT = qw(getAdmConf getConfigDSConn createConfigDS updateAdmConf
- updateAdmpw updateLocalConf importCACert);
-@EXPORT_OK = qw(getAdmConf getConfigDSConn createConfigDS updateAdmConf
- updateAdmpw updateLocalConf importCACert);
+@EXPORT = qw(getAdmConf getConfigDSConn createConfigDS createSubDS
+ updateAdmConf updateAdmpw updateLocalConf importCACert);
+@EXPORT_OK = qw(getAdmConf getConfigDSConn createConfigDS createSubDS
+ updateAdmConf updateAdmpw updateLocalConf importCACert);
# load perldap
use Mozilla::LDAP::Conn;
@@ -276,6 +276,45 @@
return 1;
}
+# Take the slapd server instance specified in the slapd section of the given inf
+# and make it into a subordinative directory server
+# (no o=netscaperoot, with PTA setup)
+sub createSubDS {
+ my $inf = shift;
+ my $errs = shift;
+
+ # open a connection to the directory server
+ my $conn = new Mozilla::LDAP::Conn($inf->{General}->{FullMachineName},
+ $inf->{slapd}->{ServerPort},
+ $inf->{slapd}->{RootDN},
+ $inf->{slapd}->{RootDNPwd},
+ $inf->{General}->{certdir});
+
+ # add the o=NetscapeRoot tree using the mapper and ldif templates
+ my @ldiffiles = ('@ldifdir(a)/12dsconfig.mod.tmpl',
+ '@ldifdir(a)/13dsschema.mod.tmpl',
+ '@ldifdir(a)/14dsmonitor.mod.tmpl',
+ '@ldifdir(a)/15dspta.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)/dirserver.map");
+
+ $mapper = process_maptbl($mapper, ($inf, $dsinf, $admininf, $setupinf));
+ if (!$mapper) {
+ $conn->close();
+ @{$errs} = ('error_creating_configds_maptbl');
+ return 0;
+ }
+
+ getMappedEntries($mapper, \@ldiffiles, \&check_and_add_entry,
+ [$conn]);
+
+ $conn->close();
+ return 1;
+}
+
sub updateAdmConf {
my $params = shift; # hashref
my $configdir = shift || "@configdir@";
Index: dirserver.map.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/dirserver.map.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dirserver.map.in 25 Jun 2007 18:23:53 -0000 1.4
+++ dirserver.map.in 28 Jun 2007 16:24:41 -0000 1.5
@@ -67,9 +67,10 @@
dsid = ServerIdentifier
ds_user = SuiteSpotUserID
ds_port = ServerPort
-ds_secure_port ="636"
+ds_secure_port = "636"
rootdn = RootDN
ds_suffix = Suffix
ds_buildnum = BuildNumber
ds_console_jar ="%normbrand%-ds-%ds_baseversion%.jar"
ds_sie = "cn=slapd-%dsid%, cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%,
ou=%domain%, o=NetscapeRoot"
+config_ds_url = ConfigDirectoryLdapURL
Index: register_param.map.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/register_param.map.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- register_param.map.in 25 Jun 2007 18:23:53 -0000 1.4
+++ register_param.map.in 28 Jun 2007 16:24:41 -0000 1.5
@@ -84,10 +84,11 @@
dsid = ServerIdentifier
ds_user = SuiteSpotUserID
ds_port = ServerPort
-ds_secure_port ="636"
+ds_secure_port = "636"
rootdn = RootDN
ds_suffix = Suffix
ds_buildnum = BuildNumber
ds_passwd = RootDNPwd
ds_console_jar ="%normbrand%-ds-%ds_baseversion%.jar"
ds_sie = "cn=slapd-%dsid%, cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%,
ou=%domain%, o=NetscapeRoot"
+config_ds_url = ConfigDirectoryLdapURL
Index: setup-ds-admin.pl.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/setup-ds-admin.pl.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- setup-ds-admin.pl.in 20 Jun 2007 16:35:02 -0000 1.4
+++ setup-ds-admin.pl.in 28 Jun 2007 16:24:41 -0000 1.5
@@ -162,6 +162,16 @@
exit 1;
}
}
+else
+{
+ my @errs = ();
+ $setup->msg('create_configds');
+ if (!createSubDS($setup->{inf}, \@errs)) {
+ $setup->msg($FATAL, @errs);
+ $setup->msg($FATAL, 'error_create_configds');
+ exit 1;
+ }
+}
# register ds instances with config DS
if (!registerDSWithConfigDS($setup)) {
Show replies by date