Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 159187 Details for
Bug 248145
Replace ds_newinst binary with perl script
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
diffs for ldapserver
cvsdiffs (text/plain), 48.47 KB, created by
Rich Megginson
on 2007-07-13 14:04:42 UTC
(
hide
)
Description:
diffs for ldapserver
Filename:
MIME Type:
Creator:
Rich Megginson
Created:
2007-07-13 14:04:42 UTC
Size:
48.47 KB
patch
obsolete
>Index: ldapserver/Makefile.am >=================================================================== >RCS file: /cvs/dirsec/ldapserver/Makefile.am,v >retrieving revision 1.48 >diff -u -8 -r1.48 Makefile.am >--- ldapserver/Makefile.am 4 Jul 2007 01:28:17 -0000 1.48 >+++ ldapserver/Makefile.am 13 Jul 2007 13:48:38 -0000 >@@ -93,23 +93,26 @@ > bin_PROGRAMS = dbscan-bin ds_newinst-bin dsktune-bin infadd-bin ldap-agent-bin \ > ldclt-bin ldif-bin migratecred-bin mmldif-bin pwdhash-bin rsearch-bin > > server_LTLIBRARIES = libslapd.la libds_admin.la libns-dshttpd.la > > # this is how to add optional plugins > if enable_pam_passthru > LIBPAM_PASSTHRU_PLUGIN = libpam-passthru-plugin.la >+enable_pam_passthru = 1 > endif > if enable_dna > LIBDNA_PLUGIN = libdna-plugin.la >+enable_dna = 1 > endif > > if enable_bitwise > LIBBITWISE_PLUGIN = libbitwise-plugin.la >+enable_bitwise = 1 > endif > > 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 \ >@@ -140,16 +143,24 @@ > ldap/ldif/template-dse.ldif \ > ldap/ldif/template-suffix-db.ldif \ > ldap/ldif/template-ldapi.ldif \ > ldap/ldif/template-ldapi-default.ldif \ > ldap/ldif/template-ldapi-autobind.ldif \ > ldap/ldif/template-pampta.ldif \ > ldap/ldif/template-dnaplugin.ldif \ > ldap/ldif/template-bitwise.ldif \ >+ ldap/ldif/template-dse.ldif \ >+ ldap/ldif/template-org.ldif \ >+ ldap/ldif/template-domain.ldif \ >+ ldap/ldif/template-state.ldif \ >+ ldap/ldif/template-locality.ldif \ >+ ldap/ldif/template-country.ldif \ >+ ldap/ldif/template-orgunit.ldif \ >+ ldap/ldif/template-baseacis.ldif \ > $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-FamilyNames \ > $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-GivenNames \ > $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-OrgUnits > > schema_DATA = $(srcdir)/ldap/schema/00core.ldif \ > $(srcdir)/ldap/schema/01common.ldif \ > $(srcdir)/ldap/schema/05rfc2247.ldif \ > $(srcdir)/ldap/schema/05rfc2927.ldif \ >@@ -196,32 +207,34 @@ > ldap/admin/src/scripts/SetupDialogs.pm \ > ldap/admin/src/scripts/Inf.pm \ > ldap/admin/src/scripts/DialogManager.pm \ > ldap/admin/src/scripts/Dialog.pm \ > ldap/admin/src/scripts/DSDialogs.pm \ > ldap/admin/src/scripts/Setup.pm \ > ldap/admin/src/scripts/Migration.pm \ > ldap/admin/src/scripts/DSMigration.pm \ >- ldap/admin/src/scripts/FileConn.pm >+ ldap/admin/src/scripts/FileConn.pm \ >+ ldap/admin/src/scripts/DSCreate.pm > > property_DATA = ldap/admin/src/scripts/setup-ds.res \ > ldap/admin/src/scripts/migrate-ds.res > > task_SCRIPTS = ldap/admin/src/scripts/template-bak2db \ > ldap/admin/src/scripts/template-db2bak \ > ldap/admin/src/scripts/template-db2index \ > ldap/admin/src/scripts/template-db2ldif \ > ldap/admin/src/scripts/template-ldif2db \ > ldap/admin/src/scripts/template-ldif2ldap \ > ldap/admin/src/scripts/template-monitor \ > ldap/admin/src/scripts/template-restoreconfig \ > ldap/admin/src/scripts/template-saveconfig \ > ldap/admin/src/scripts/template-start-slapd \ > ldap/admin/src/scripts/template-stop-slapd \ >+ ldap/admin/src/scripts/template-restart-slapd \ > ldap/admin/src/scripts/template-suffix2instance \ > ldap/admin/src/scripts/template-vlvindex \ > ldap/admin/src/scripts/template-bak2db.pl \ > ldap/admin/src/scripts/template-db2bak.pl \ > ldap/admin/src/scripts/template-db2index.pl \ > ldap/admin/src/scripts/template-db2ldif.pl \ > ldap/admin/src/scripts/template-ldif2db.pl \ > ldap/admin/src/scripts/template-ns-accountstatus.pl \ >@@ -231,17 +244,19 @@ > ldap/admin/src/scripts/template-verify-db.pl \ > $(srcdir)/ldap/admin/src/scripts/template-migrate5to7 \ > $(srcdir)/ldap/admin/src/scripts/template-migrate6to7 \ > $(srcdir)/ldap/admin/src/scripts/template-migrateInstance7 \ > $(srcdir)/ldap/admin/src/scripts/template-migrateTo7 > > init_SCRIPTS = wrappers/$(PACKAGE_NAME) > >-inf_DATA = ldap/admin/src/slapd.inf >+inf_DATA = ldap/admin/src/slapd.inf \ >+ ldap/admin/src/scripts/dscreate.map \ >+ ldap/admin/src/scripts/dsorgentries.map > > #//////////////////////////////////////////////////////////////// > # > # Server Strings > # > #//////////////////////////////////////////////////////////////// > #------------------------ > # makstrdb >@@ -933,16 +948,17 @@ > mmldif_bin_CPPFLAGS = $(AM_CPPFLAGS) @ldapsdk_inc@ @nss_inc@ @nspr_inc@ > mmldif_bin_LDADD = libslapd.la $(NSPR_LINK) $(NSS_LINK) $(SVRCORE_LINK) $(LDAPSDK_LINK) $(SASL_LINK) > > #------------------------ > # ns-slapd > #------------------------ > if enable_ldapi > GETSOCKETPEER=ldap/servers/slapd/getsocketpeer.c >+ enable_ldapi = 1 > endif > > ns_slapd_SOURCES = ldap/servers/slapd/abandon.c \ > ldap/servers/slapd/auth.c \ > ldap/servers/slapd/bind.c \ > ldap/servers/slapd/compare.c \ > ldap/servers/slapd/config.c \ > ldap/servers/slapd/configdse.c \ >@@ -1029,30 +1045,39 @@ > -e 's,@datadir\@,$(datadir),g' \ > -e 's,@schemadir\@,$(schemadir),g' \ > -e 's,@serverdir\@,$(serverdir),g' \ > -e 's,@serverplugindir\@,$(serverplugindir),g' \ > -e 's,@taskdir\@,$(taskdir),g' \ > -e 's,@configdir\@,$(configdir),g' \ > -e 's,@sysconfdir\@,$(sysconfdir),g' \ > -e 's,@localstatedir\@,$(localstatedir),g' \ >+ -e 's,@infdir\@,$(infdir),g' \ >+ -e 's,@templatedir\@,$(sampledatadir),g' \ > -e 's,@package_name\@,$(PACKAGE_NAME),g' \ > -e 's,@instconfigdir\@,$(instconfigdir),g' \ >+ -e 's,@enable_ldapi\@,$(enable_ldapi),g' \ >+ -e 's,@enable_pam_passthru\@,$(enable_pam_passthru),g' \ >+ -e 's,@enable_bitwise\@,$(enable_bitwise),g' \ >+ -e 's,@enable_dna\@,$(enable_dna),g' \ >+ -e 's,@enable_autobind\@,$(enable_autobind),g' \ > -e 's,@ECHO_N\@,$(ECHO_N),g' \ > -e 's,@ECHO_C\@,$(ECHO_C),g' \ > -e 's,@brand\@,$(brand),g' \ > -e 's,@capbrand\@,$(capbrand),g' \ > -e 's,@vendor\@,$(vendor),g' \ >+ -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \ > -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \ > -e 's,@PACKAGE_BASE_VERSION\@,$(PACKAGE_BASE_VERSION),g' \ > -e 's,@BUILDNUM\@,$(BUILDNUM),g' \ > -e 's,@NQBUILD_NUM\@,$(NQBUILDNUM),g' \ > -e 's,@perldir\@,$(perldir),g' \ > -e 's,@defaultuser\@,$(defaultuser),g' \ >- -e 's,@defaultgroup\@,$(defaultgroup),g' >+ -e 's,@defaultgroup\@,$(defaultgroup),g' \ >+ -e 's,@with_fhs_opt\@,@with_fhs_opt@,g' > else > fixupcmd = sed \ > -e 's,@bindir\@,$(bindir),g' \ > -e 's,@sbindir\@,$(sbindir),g' \ > -e 's,@libdir\@,$(libdir),g' \ > -e 's,@nspr_libdir\@,$(nspr_libdir),g' \ > -e 's,@nss_libdir\@,$(nss_libdir),g' \ > -e 's,@ldapsdk_libdir\@,$(ldapsdk_libdir),g' \ >@@ -1065,30 +1090,39 @@ > -e 's,@datadir\@,$(datadir),g' \ > -e 's,@schemadir\@,$(schemadir),g' \ > -e 's,@serverdir\@,$(serverdir),g' \ > -e 's,@serverplugindir\@,$(serverplugindir),g' \ > -e 's,@taskdir\@,$(taskdir),g' \ > -e 's,@configdir\@,$(configdir),g' \ > -e 's,@sysconfdir\@,$(sysconfdir),g' \ > -e 's,@localstatedir\@,$(localstatedir),g' \ >+ -e 's,@infdir\@,$(infdir),g' \ >+ -e 's,@templatedir\@,$(sampledatadir),g' \ > -e 's,@package_name\@,$(PACKAGE_NAME),g' \ > -e 's,@instconfigdir\@,$(instconfigdir),g' \ >+ -e 's,@enable_ldapi\@,$(enable_ldapi),g' \ >+ -e 's,@enable_pam_passthru\@,$(enable_pam_passthru),g' \ >+ -e 's,@enable_bitwise\@,$(enable_bitwise),g' \ >+ -e 's,@enable_dna\@,$(enable_dna),g' \ >+ -e 's,@enable_autobind\@,$(enable_autobind),g' \ > -e 's,@ECHO_N\@,$(ECHO_N),g' \ > -e 's,@ECHO_C\@,$(ECHO_C),g' \ > -e 's,@brand\@,$(brand),g' \ > -e 's,@capbrand\@,$(capbrand),g' \ > -e 's,@vendor\@,$(vendor),g' \ >+ -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \ > -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \ > -e 's,@PACKAGE_BASE_VERSION\@,$(PACKAGE_BASE_VERSION),g' \ > -e 's,@BUILDNUM\@,$(BUILDNUM),g' \ > -e 's,@NQBUILD_NUM\@,$(NQBUILDNUM),g' \ > -e 's,@perldir\@,$(perldir),g' \ > -e 's,@defaultuser\@,$(defaultuser),g' \ >- -e 's,@defaultgroup\@,$(defaultgroup),g' >+ -e 's,@defaultgroup\@,$(defaultgroup),g' \ >+ -e 's,@with_fhs_opt\@,@with_fhs_opt@,g' > endif > > %: %.in > mkdir -p $(dir $@) > $(fixupcmd) $^ > $@ > > %/$(PACKAGE_NAME): %/initscript.in > $(fixupcmd) $^ > $@ >Index: ldapserver/configure.ac >=================================================================== >RCS file: /cvs/dirsec/ldapserver/configure.ac,v >retrieving revision 1.33 >diff -u -8 -r1.33 configure.ac >--- ldapserver/configure.ac 21 Jun 2007 21:57:22 -0000 1.33 >+++ ldapserver/configure.ac 13 Jul 2007 13:48:38 -0000 >@@ -1,13 +1,13 @@ > # -*- Autoconf -*- > # Process this file with autoconf to produce a configure script. > AC_PREREQ(2.59) > # This version is the version returned by ns-slapd -v >-AC_INIT([fedora-ds], [1.1.0a3], [http://bugzilla.redhat.com/]) >+AC_INIT([fedora-ds], [1.1.0a4], [http://bugzilla.redhat.com/]) > # AC_CONFIG_HEADER must be called right after AC_INIT. > AC_CONFIG_HEADERS([config.h]) > AM_INIT_AUTOMAKE([1.9 foreign subdir-objects]) > AM_MAINTAINER_MODE > AC_CANONICAL_HOST > > # Checks for programs. > AC_PROG_CXX >Index: ldapserver/ldap/admin/src/scripts/DSMigration.pm.in >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSMigration.pm.in,v >retrieving revision 1.3 >diff -u -8 -r1.3 DSMigration.pm.in >--- ldapserver/ldap/admin/src/scripts/DSMigration.pm.in 12 Jul 2007 13:52:42 -0000 1.3 >+++ ldapserver/ldap/admin/src/scripts/DSMigration.pm.in 13 Jul 2007 13:48:38 -0000 >@@ -45,16 +45,17 @@ > # dsktune, then run the usual setup pre and post installers. > # > ########################## > > package DSMigration; > use Migration; > use Util; > use Inf; >+use DSCreate; > > # tempfiles > use File::Temp qw(tempfile tempdir); > use File::Basename qw(basename); > > # load perldap > use Mozilla::LDAP::Conn; > use Mozilla::LDAP::Utils qw(normalizeDN); >@@ -86,16 +87,17 @@ > 'nsslapd-plugin-depends-on-named' => 'nsslapd-plugin-depends-on-named', > # these are new attrs that we should just pass through > 'nsslapd-schemadir' => 'nsslapd-schemadir', > 'nsslapd-lockdir' => 'nsslapd-lockdir', > 'nsslapd-tmpdir' => 'nsslapd-tmpdir', > 'nsslapd-certdir' => 'nsslapd-certdir', > 'nsslapd-ldifdir' => 'nsslapd-ldifdir', > 'nsslapd-bakdir' => 'nsslapd-bakdir', >+ 'nsslapd-instancedir' => 'nsslapd-instancedir', > 'nsslapd-ldapifilepath' => 'nsslapd-ldapifilepath', > 'nsslapd-ldapilisten' => 'nsslapd-ldapilisten', > 'nsslapd-ldapiautobind' => 'nsslapd-ldapiautobind', > 'nsslapd-ldapimaprootdn' => 'nsslapd-ldapimaprootdn', > 'nsslapd-ldapimaptoentries' => 'nsslapd-ldapimaptoentries', > 'nsslapd-ldapiuidnumbertype' => 'nsslapd-ldapiuidnumbertype', > 'nsslapd-ldapigidnumbertype' => 'nsslapd-ldapigidnumbertype', > 'nsslapd-ldapientrysearchbase' => 'nsslapd-ldapientrysearchbase', >@@ -182,50 +184,62 @@ > debug(1, "Copying database directory $srcdir to $destdir\n"); > if (system ("cp -p -r $srcdir $destdir")) { > return ('error_copying_dbdir', $srcdir, $destdir, $?); > } > } elsif (! -d $srcdir) { > return ("error_dbsrcdir_not_exist", $srcdir); > } else { > debug(1, "The destination directory $destdir already exists, copying files/dirs individually\n"); >+ $! = 0; >+ debug(1, "Removing any existing db files in $destdir\n"); >+ unlink glob("$destdir/*"); >+ if ($!) { >+ return ("error_removing_temp_db_files", $destdir, $!); >+ } > foreach my $file (glob("$srcdir/*")) { >- debug(3, "Copying $file to $destdir\n"); > if (-f $file) { >+ debug(3, "Copying $file to $destdir\n"); > if (system ("cp -p $file $destdir")) { > return ('error_copying_dbfile', $file, $destdir, $?); > } > } elsif (-d $file && !$filesonly) { >+ debug(3, "Copying $file to $destdir\n"); > if (system ("cp -p -r $file $destdir")) { > return ('error_copying_dbdir', $file, $destdir, $?); > } > } > } > } >+ >+ return (); > } > > # migrate all of the databases in an instance > sub migrateDatabases { > my $mig = shift; # the Migration object > my $inst = shift; # the instance name (e.g. slapd-instance) > my $src = shift; # a Conn to the source > my $dest = shift; # a Conn to the dest > my $olddefault = "$mig->{actualsroot}/$inst/db"; # old default db home directory > my @errs; > > # first, look for an LDIF file in that directory with the same name as the > # database > my $foundldif; > for (glob("$mig->{oldsroot}/$inst/db/*.ldif")) { > my $dbname = basename($_, '.ldif'); >- my @cmd = ("@serverdir@/$inst/ldif2db", "-n", $dbname, "-i", $_); >- debug(1, "migrateDatabases: executing command ", @cmd); >- if (system(@cmd)) { >- return ('error_importing_migrated_db', $_, $?); >+ my $cmd = "@serverdir@/$inst/ldif2db -n \"$dbname\" -i \"$_\""; >+ debug(1, "migrateDatabases: executing command $cmd\n"); >+ $? = 0; # clear error condition >+ my $output = `$cmd 2>&1`; >+ if ($?) { >+ return ('error_importing_migrated_db', $_, $?, $output); > } >+ debug(1, $output); > $foundldif = 1; > } > > if ($foundldif) { > return (); # done - can do nothing else for cross-platform > } > > # if no LDIF files, just copy over the database directories >@@ -279,23 +293,23 @@ > debug(1, "Found ldbm database instance entry ", $ent->getDN(), "\n"); > my $dir = $ent->getValues('nsslapd-directory'); > # the default db instance directory is > # $oldroot/$inst/$cn > debug(1, "old instance $cn dbdir $dir\n"); > my $srcdir = $dir || "$olddefault/db/$cn"; > my $newent = $dest->search($ent->getDN(), "base", "(objectclass=*)"); > my $newdbdir = $newent->getValues('nsslapd-directory') || >- "@localstatedir@/lib/$mig->{pkgname}/$inst/db"; >+ "@localstatedir@/lib/$mig->{pkgname}/$inst/db/$cn"; > if (-d $srcdir and ($srcdir !~ /^$olddefault/)) { > debug(2, "Not copying database indexes from [$srcdir]\n"); > } else { > # replace the old sroot value with the actual physical location on the target/dest > $srcdir =~ s/^$mig->{actualsroot}/$mig->{oldsroot}/; >- if (@errs = copyDatabaseDirs($srcdir, "$newdbdir/$cn")) { >+ if (@errs = copyDatabaseDirs($srcdir, "$newdbdir")) { > return @errs; > } > } > } > } while ($ent = $src->nextEntry()); > > return (); > } >@@ -312,19 +326,24 @@ > if ($oldent and $newent) { # changelog configured > my $oldcldir = $oldent->getValues('nsslapd-changelogdir'); > if (-d $oldcldir and ($oldcldir !~ /^$olddefault/)) { > debug(2, "Not copying changelogdb from [$oldcldir]\n"); > } else { > # replace the old sroot value with the actual physical location on the target/dest > $oldcldir =~ s/^$mig->{actualsroot}/$mig->{oldsroot}/; > my $newcldir = $newent->getValues('nsslapd-changelogdir'); >- copyDatabaseDirs($oldcldir, $newcldir); >+ my @errs = copyDatabaseDirs($oldcldir, $newcldir); >+ if (@errs) { >+ return @errs; >+ } > } > } >+ >+ return (); > } > > sub fixAttrsInEntry { > my ($ent, $mig, $inst) = @_; > for my $attr (keys %{$ent}) { > my $lcattr = lc $attr; > if ($transformAttr{$lcattr}) { > $ent->setValues($attr, &{$transformAttr{$lcattr}}($ent, $attr, $mig, $inst)); >@@ -353,37 +372,47 @@ > if (! $old->exists($attr)) { > $innewonly{$attr} = $attr; > } > } > > # iterate through the attr lists > my $cn = lc $new->getValues("cn"); > foreach my $attr (keys %inoldonly, keys %innewonly, @attrs) { >+ debug(3, "mergeEntries: merging entry ", $old->getDN(), " attr $attr\n"); > my $lcattr = lc $attr; > if ($ignoreOld{$lcattr}) { >+ debug(3, "mergeEntries: ignoring old invalid or obsolete attr $attr\n"); > next; # use new value or just omit if attr is obsolete > } elsif ($transformAttr{$lcattr}) { > # only transform if the value is in the old entry > if (!$innewonly{$attr}) { >- $new->setValues($attr, &{$transformAttr{$lcattr}}($old, $attr, $mig, $inst)); >+ my $oldval = $old->getValues($attr); >+ my $newval = &{$transformAttr{$lcattr}}($old, $attr, $mig, $inst); >+ $new->setValues($attr, $newval); >+ debug(3, "mergeEntries: transformed old value $oldval to $newval\n"); > } > } elsif ($cn eq "internationalization plugin" and $lcattr eq "nsslapd-pluginarg0") { >+ debug(3, "mergeEntries: using new value of internationalization plugin nsslapd-pluginarg0\n"); > next; # use the new value of this path name > } elsif ($cn eq "referential integrity postoperation" and $lcattr eq "nsslapd-pluginarg1") { >+ debug(3, "mergeEntries: using new value of referential integrity postoperation nsslapd-pluginarg1\n"); > next; # use the new value of this path name > } elsif ($innewonly{$attr}) { >+ debug(3, "mergeEntries: removing attr $attr from new entry\n"); > $new->remove($attr); # in new but not old - just remove it > } else { >+ my $oldval = $old->getValues($attr); >+ my $newval = $new->getValues($attr); > $new->setValues($attr, $old->getValues($attr)); # use old value >+ debug(3, "mergeEntries: using old val $oldval instead of new val $newval\n"); > } > } > } > >- > my @allattrlist = ('*', 'aci', 'createTimestamp', 'creatorsName', > 'modifyTimestamp', 'modifiersName'); > > sub getAllEntries { > my $conn = shift; > my $href = shift; > my $aref = shift; > >@@ -593,24 +622,24 @@ > my $inf = createInfFromConfig($oldconfigdir, $inst, \@errs); > debug(2, "Using inffile $inf->{filename} created from $oldconfigdir\n"); > if (@errs) { > $mig->msg(@errs); > return 0; > } > > # create the new instance >- my ($rc, $output) = createDSInstance($inf, \@errs); >+ @errs = createDSInstance($inf); > unlink($inf->{filename}); >- if ($rc) { >+ if (@errs) { > $mig->msg(@errs); >- $mig->msg($FATAL, 'error_creating_dsinstance', $rc, $output); >+ $mig->msg($FATAL, 'error_creating_dsinstance', $inst); > return 0; > } else { >- $mig->msg('created_dsinstance', $output); >+ $mig->msg('created_dsinstance', $inst); > } > > my $src = new FileConn("$oldconfigdir/dse.ldif", 1); # read-only > my $dest = new FileConn("$mig->{configdir}/$inst/dse.ldif"); > > @errs = migrateDSInstance($mig, $inst, $src, $dest); > $src->close(); > $dest->close(); >@@ -622,8 +651,15 @@ > > return 1; > } > > ############################################################################# > # Mandatory TRUE return value. > # > 1; >+ >+# emacs settings >+# Local Variables: >+# mode:perl >+# indent-tabs-mode: nil >+# tab-width: 4 >+# End: >Index: ldapserver/ldap/admin/src/scripts/FileConn.pm >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/FileConn.pm,v >retrieving revision 1.2 >diff -u -8 -r1.2 FileConn.pm >--- ldapserver/ldap/admin/src/scripts/FileConn.pm 12 Jul 2007 13:52:42 -0000 1.2 >+++ ldapserver/ldap/admin/src/scripts/FileConn.pm 13 Jul 2007 13:48:38 -0000 >@@ -41,30 +41,37 @@ > # > package FileConn; > > use Mozilla::LDAP::Conn; > use Mozilla::LDAP::API qw(:constant ldap_explode_dn ldap_err2string); # Direct access to C API > use Mozilla::LDAP::Utils qw(normalizeDN); > use Mozilla::LDAP::LDIF; > >+use Carp; >+ > require Exporter; > @ISA = qw(Exporter Mozilla::LDAP::Conn); > @EXPORT = qw(); > @EXPORT_OK = qw(); > > sub new { > my $class = shift; > my $filename = shift; > my $readonly = shift; >+ my @namingContexts = @_; > my $self = {}; > > $self = bless $self, $class; > > $self->{readonly} = $readonly; >+ for (@namingContexts) { >+ $self->setNamingContext($_); >+ } >+ $self->setNamingContext(""); # root DSE > $self->read($filename); > > return $self; > } > > sub getParentDN { > my $dn = shift; > my @rdns = ldap_explode_dn($dn, 0); >@@ -81,26 +88,41 @@ > } else { > $filename = $self->{filename}; > } > > if (!$self->{filename}) { > return; > } > >- open( MYLDIF, "$filename" ) || die "Can't open $filename: $!"; >+ open( MYLDIF, "$filename" ) || confess "Can't open $filename: $!"; > my $in = new Mozilla::LDAP::LDIF(*MYLDIF); >+ $self->{reading} = 1; > while ($ent = readOneEntry $in) { > if (!$self->add($ent)) { >- die "Error: could not add entry ", $ent->getDN(), ":", $self->getErrorString(); >+ confess "Error: could not add entry ", $ent->getDN(), ":", $self->getErrorString(); > } > } >+ delete $self->{reading}; > close( MYLDIF ); > } > >+sub setNamingContext { >+ my $self = shift; >+ my $nc = shift; >+ my $ndn = normalizeDN($nc); >+ $self->{namingContexts}->{$ndn} = $ndn; >+} >+ >+sub isNamingContext { >+ my $self = shift; >+ my $ndn = shift; >+ return exists($self->{namingContexts}->{$ndn}); >+} >+ > # return all nodes below the given node > sub iterate { > my $self = shift; > my $dn = shift; > my $scope = shift; > my $callback = shift; > my $context = shift; > my $suppress = shift; >@@ -147,22 +169,26 @@ > my $filename = shift; > > if ($filename) { > $self->{filename} = $filename; > } else { > $filename = $self->{filename}; > } > >- if (!$self->{filename} or $self->{readonly}) { >+ if (!$self->{filename} or $self->{readonly} or $self->{reading}) { > return; > } > >- open( MYLDIF, ">$filename" ) || die "Can't write $filename: $!"; >+ open( MYLDIF, ">$filename" ) || confess "Can't write $filename: $!"; > $self->iterate("", LDAP_SCOPE_SUBTREE, \&writecb, \*MYLDIF); >+ for (keys %{$self->{namingContexts}}) { >+ next if (!$_); # skip "" - we already did that >+ $self->iterate($_, LDAP_SCOPE_SUBTREE, \&writecb, \*MYLDIF); >+ } > close( MYLDIF ); > } > > sub setErrorCode { > my $self = shift; > $self->{lastErrorCode} = shift; > } > >@@ -302,33 +328,53 @@ > $self->iterate($basedn, $scope, \&searchcb, [$self, $filter, $attrsonly]); > } else { > $self->filterToMatchSub($basedn, $scope, $filter, $attrsonly); > } > > return $self->nextEntry(); > } > >+sub cloneEntry { >+ my $src = shift; >+ if (!$src) { >+ return undef; >+ } >+ my $dest = new Mozilla::LDAP::Entry(); >+ $dest->setDN($src->getDN()); >+ for (keys %{$src}) { >+ if (ref($src->{$_})) { >+ my @copyary = @{$src->{$_}}; >+ $dest->{$_} = [ @copyary ]; # make a deep copy >+ } else { >+ $dest->{$_} = $src->{$_}; >+ } >+ } >+ >+ return $dest; >+} >+ >+# have to return a copy of the entry - disallow inplace updates > sub nextEntry { > my $self = shift; >- return shift @{$self->{entries}}; >+ my $ent = shift @{$self->{entries}}; >+ return cloneEntry($ent); > } > > sub add { > my $self = shift; > my $entry = shift; > my $dn = $entry->getDN(); > my $ndn = normalizeDN($dn); > my $parentdn = getParentDN($dn); > my $nparentdn = normalizeDN($parentdn); > >- > $self->setErrorCode(0); >- # special case of root DSE >- if (!$ndn and exists($self->{$ndn}) and >+ # special case of naming context - has no parent >+ if ($self->isNamingContext($ndn) and > !exists($self->{$ndn}->{data})) { > $self->{$ndn}->{data} = $entry; > $self->write(); > return 1; > } > > if (exists($self->{$ndn})) { > $self->setErrorCode(LDAP_ALREADY_EXISTS); >@@ -352,32 +398,36 @@ > } > > sub update { > my $self = shift; > my $entry = shift; > my $dn = $entry->getDN(); > my $ndn = normalizeDN($dn); > >+ confess "Attempt to modify read only $self->{filename} entry $dn" if ($self->{readonly}); >+ > $self->setErrorCode(0); > if (!exists($self->{$ndn})) { > $self->setErrorCode(LDAP_NO_SUCH_OBJECT); > return 0; > } > > $self->{$ndn}->{data} = $entry; > $self->write(); > > return 1; > } > > sub delete { > my $self = shift; > my $dn = shift; > >+ confess "Attempt to modify read only $self->{filename} entry $dn" if ($self->{readonly}); >+ > if (ref($dn)) { > $dn = $dn->getDN(); # an Entry > } > my $ndn = normalizeDN($dn); > > $self->setErrorCode(0); > if (!exists($self->{$ndn})) { > $self->setErrorCode(LDAP_NO_SUCH_OBJECT); >Index: ldapserver/ldap/admin/src/scripts/Migration.pm.in >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Migration.pm.in,v >retrieving revision 1.2 >diff -u -8 -r1.2 Migration.pm.in >--- ldapserver/ldap/admin/src/scripts/Migration.pm.in 12 Jul 2007 13:52:42 -0000 1.2 >+++ ldapserver/ldap/admin/src/scripts/Migration.pm.in 13 Jul 2007 13:48:38 -0000 >@@ -212,17 +212,17 @@ > # fedora-ds-base - we have to strip off the -suffix > if ($pkgname =~ /-(core|base)$/) { > $pkgname =~ s/-(core|base)$//; > } > my $oldpkgname = $pkgname; > > $self->{pkgname} = $pkgname; > $self->{oldsroot} = $oldsroot || "/opt/$oldpkgname"; >- $self->{actualsroot} = $actualsroot || $oldsroot; >+ $self->{actualsroot} = $actualsroot || $self->{oldsroot}; > $self->{silent} = $silent; > $self->{inffile} = $inffile; > $self->{keep} = $keep; > $self->{preonly} = $preonly; > $self->{logfile} = $logfile; > $self->{crossplatform} = $crossplatform; > $self->{log} = new SetupLog($self->{logfile}, "migrate"); > # if user supplied inf file, use that to initialize >Index: ldapserver/ldap/admin/src/scripts/Util.pm.in >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Util.pm.in,v >retrieving revision 1.7 >diff -u -8 -r1.7 Util.pm.in >--- ldapserver/ldap/admin/src/scripts/Util.pm.in 12 Jul 2007 13:52:42 -0000 1.7 >+++ ldapserver/ldap/admin/src/scripts/Util.pm.in 13 Jul 2007 13:48:38 -0000 >@@ -42,28 +42,29 @@ > 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 addSuffix getMappedEntries > process_maptbl check_and_add_entry getMappedEntries >- getHashedPassword debug createDSInstance createInfFromConfig >- isValidServerID); >+ getHashedPassword debug createInfFromConfig >+ isValidServerID isValidUser makePaths); > @EXPORT_OK = qw(portAvailable getAvailablePort isValidDN addSuffix getMappedEntries > process_maptbl check_and_add_entry getMappedEntries >- getHashedPassword debug createDSInstance createInfFromConfig >- isValidServerID); >+ getHashedPassword debug createInfFromConfig >+ isValidServerID isValidUser makePaths); > > use strict; > > use Socket; > > use File::Temp qw(tempfile tempdir); >+use File::Basename qw(dirname); > > $Util::debuglevel = 0; > # use like this: > # debug(3, "message"); > # this will only print "message" if $debuglevel is 3 or higher (-ddd on the command line) > sub debug { > my ($level, @rest) = @_; > if ($level <= $Util::debuglevel) { >@@ -126,17 +127,17 @@ > return ("dialog_ssuser_must_be_same", $username); > } > } else { # user is root - verify id > my $nuid = getpwnam $strans; > if (!defined($nuid)) { > return ("dialog_ssuser_error", $user); > } > if (!$nuid) { >- return ("dialog_ssuser_root_warning"); >+ debug(0, "Warning: using root as the server user id. You are strongly encouraged to use a non-root user.\n"); > } > } > > return (); > } > > # delete the subtree starting from the passed entry > sub delete_all >@@ -362,23 +363,27 @@ > } > debug(1, "Entry $aentry->{dn} is deleted\n"); > } > elsif ( 0 < $op ) # $sentry exists > { > my $attr; > foreach $attr ( @addtypes ) > { >- debug(3, "Adding attr=$attr values=" . $aentry->getValues($attr) . " to entry $aentry->{dn}\n"); >- $sentry->addValue( $attr, $aentry->getValues($attr) ); >+ foreach my $val ($aentry->getValues($attr)) >+ { >+ debug(3, "Adding attr=$attr value=$val to entry $aentry->{dn}\n"); >+ $sentry->addValue( $attr, $val ); >+ } > } > foreach $attr ( @reptypes ) > { >+ my @vals = $aentry->getValues($attr); > debug(3, "Replacing attr=$attr values=" . $aentry->getValues($attr) . " to entry $aentry->{dn}\n"); >- $sentry->setValues($attr, $aentry->getValues($attr)); >+ $sentry->setValues($attr, @vals); > } > foreach $attr ( @deltypes ) > { > # removeValue takes a single value only > if (!$aentry->size($attr)) > { > debug(3, "Deleting attr=$attr from entry $aentry->{dn}\n"); > $sentry->remove($attr); # just delete the attribute >@@ -756,66 +761,107 @@ > } > $cmd .= " \'$pwd\'"; > my $hashedpwd = `$cmd`; > chomp($hashedpwd); > > return $hashedpwd; > } > >-sub createDSInstance { >- my $inf = shift; >- my $errs = shift; # unused for now >-# find ds_newinst.pl - in same directory as this script or in PATH >- my $ds_newinst; >- ($ds_newinst = $0) =~ s|/[^/]+$|/ds_newinst.pl|; >- if (! -x $ds_newinst) { >- $ds_newinst = "@bindir@/ds_newinst.pl"; >- } >- if (! -x $ds_newinst) { >- $ds_newinst = "ds_newinst.pl"; # just get from path >- } >- $? = 0; # clear error condition >- my $output = `$ds_newinst $inf->{filename}`; >- return ($?, $output); >-} >- > # this creates an Inf suitable for passing to createDSInstance > # except that it has a bogus suffix > sub createInfFromConfig { > my $configdir = shift; > my $inst = shift; > my $errs = shift; > my $fname = "$configdir/dse.ldif"; > my $id; > ($id = $inst) =~ s/^slapd-//; >- if (!open( DSELDIF, "$fname" )) { >+ if (! -f $fname) { > push @{$errs}, "error_opening_dseldif", $fname, $!; > return 0; > } >+ my $conn = new FileConn($fname, 1); >+ >+ my $ent = $conn->search("cn=config", "base", "(objectclass=*)"); >+ if (!$ent) { >+ push @{$errs}, "error_opening_dseldif", $fname, $!; >+ return 0; >+ } >+ > my ($outfh, $inffile) = tempfile(SUFFIX => '.inf'); >- my $in = new Mozilla::LDAP::LDIF(*DSELDIF) ; >- while (my $ent = readOneEntry $in) { >- my $dn = $ent->getDN(); >- if ($dn =~ /cn=config/) { >- print $outfh "[General]\n"; >- print $outfh "FullMachineName = ", $ent->getValues('nsslapd-localhost'), "\n"; >- print $outfh "SuiteSpotUserID = ", $ent->getValues('nsslapd-localuser'), "\n"; >- print $outfh "ServerRoot = @serverdir@\n"; >- print $outfh "[slapd]\n"; >- print $outfh "RootDN = ", $ent->getValues('nsslapd-rootdn'), "\n"; >- print $outfh "RootDNPwd = ", $ent->getValues('nsslapd-rootpw'), "\n"; >- print $outfh "ServerPort = ", $ent->getValues('nsslapd-port'), "\n"; >- print $outfh "ServerIdentifier = $id\n"; >- print $outfh "Suffix = o=deleteAfterMigration\n"; >- print $outfh "start_server= 0\n"; >- last; >- } >+ print $outfh "[General]\n"; >+ print $outfh "FullMachineName = ", $ent->getValues('nsslapd-localhost'), "\n"; >+ print $outfh "SuiteSpotUserID = ", $ent->getValues('nsslapd-localuser'), "\n"; >+ print $outfh "[slapd]\n"; >+ print $outfh "RootDN = ", $ent->getValues('nsslapd-rootdn'), "\n"; >+ print $outfh "RootDNPwd = ", $ent->getValues('nsslapd-rootpw'), "\n"; >+ print $outfh "ServerPort = ", $ent->getValues('nsslapd-port'), "\n"; >+ print $outfh "ServerIdentifier = $id\n"; >+ print $outfh "start_server= 0\n"; >+ >+ my $suffix; >+ my $ent = $conn->search("cn=ldbm database,cn=plugins,cn=config", >+ "one", "(objectclass=*)"); >+ if (!$ent) { >+ push @{$errs}, "error_opening_dseldif", $fname, $!; >+ close $outfh; >+ $conn->close(); >+ return 0; >+ } >+ # use the userRoot suffix if available >+ while ($ent) { >+ $suffix = $ent->getValues('nsslapd-suffix'); >+ last if ($ent->hasValue('cn', 'userRoot', 1)); >+ $ent = $conn->nextEntry(); > } >+ $conn->close(); >+ >+ print $outfh "Suffix = $suffix\n"; > close $outfh; >- close DSELDIF; > > my $inf = new Inf($inffile); > > return $inf; > } > >+# like File::Path mkpath, except we can set the owner and perm >+# of each new path and parent path created >+sub makePaths { >+ my ($path, $mode, $user, $group) = @_; >+ my $uid = getpwnam $user; >+ my $gid = -1; # default to leave it alone >+ >+ if ($group) { >+ $gid = getgrnam $group; >+ } >+ my @dirnames = ($path); >+ my $parent = $path; >+ for ($parent = dirname($parent); >+ $parent and ($parent ne "/"); >+ $parent = dirname($parent)) { >+ unshift @dirnames, $parent; >+ } >+ for (@dirnames) { >+ next if (-d $_); >+ $! = 0; # clear >+ mkdir $_, $mode; >+ if ($!) { >+ return ('error_creating_directory', $_, $!); >+ } >+ chown $uid, $gid, $_; >+ if ($!) { >+ return ('error_chowning_directory', $_, $!); >+ } >+ debug(1, "makePaths: created directory $_ mode $mode user $user group $group\n"); >+ } >+ >+ return (); >+} >+ > 1; >+ >+# emacs settings >+# Local Variables: >+# mode:perl >+# indent-tabs-mode: nil >+# tab-width: 4 >+# End: >Index: ldapserver/ldap/admin/src/scripts/migrate-ds.pl.in >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/migrate-ds.pl.in,v >retrieving revision 1.1 >diff -u -8 -r1.1 migrate-ds.pl.in >--- ldapserver/ldap/admin/src/scripts/migrate-ds.pl.in 29 Jun 2007 21:12:21 -0000 1.1 >+++ ldapserver/ldap/admin/src/scripts/migrate-ds.pl.in 13 Jul 2007 13:48:38 -0000 >@@ -56,10 +56,22 @@ > use Resource; > > my $res = new Resource("@propertydir@/migrate-ds.res", > "@propertydir@/setup-ds.res"); > > my $mig = new Migration($res); > > $mig->msg('begin_ds_migration', $mig->{oldsroot}); >-migrateDS($mig); >+if (!migrateDS($mig)) { >+ exit 1; >+} > $mig->msg('end_ds_migration'); >+ >+END { >+ if ($mig) { >+ if (!$mig->{keep}) { >+ unlink $mig->{inffile}; >+ } >+ >+ $mig->doExit(); >+ } >+} >Index: ldapserver/ldap/admin/src/scripts/migrate-ds.res >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/migrate-ds.res,v >retrieving revision 1.2 >diff -u -8 -r1.2 migrate-ds.res >--- ldapserver/ldap/admin/src/scripts/migrate-ds.res 12 Jul 2007 13:52:42 -0000 1.2 >+++ ldapserver/ldap/admin/src/scripts/migrate-ds.res 13 Jul 2007 13:48:38 -0000 >@@ -1,13 +1,14 @@ > begin_ds_migration = Beginning migration of directory server instances in %s . . .\n > end_ds_migration = Directory server migration is complete. Please check output and log files for details.\n > migration_exiting = Exiting . . .\nLog file is '%s'\n\n > instance_already_exists = The target directory server instance already exists at %s. Skipping migration. Note that if you want to migrate the old instance you will have to first remove the new one of the same name.\n\n > error_reading_entry = Could not read the entry '%s'. Error: %s\n > error_updating_merge_entry = Could not %s the migrated entry '%s' in the target directory server. Error: %s\n >-error_importing_migrated_db = Could not import the LDIF file '%s' for the migrated database. Error: %s. Please check the directory server error log for more details.\n >+error_importing_migrated_db = Could not import the LDIF file '%s' for the migrated database. Error: %s. Output: %s\n > error_reading_olddbconfig = Could not read the old database configuration information. Error: %s\n > error_migrating_schema = Could not copy old schema file '%s'. Error: %s\n > error_copying_dbdir = Could not copy database directory '%s' to '%s'. Error: %s\n > error_copying_dbfile = Could not copy database file '%s' to '%s'. Error: %s\n > error_dbsrcdir_not_exist = Could not copy from the database source directory '%s' because it does not exist. Please check your configuration.\n > error_no_instances = Could not find any instances in the old directory '%s' to migrate.\n >+error_removing_temp_db_files = Could not remove the temporary db files in '%s' to clear the directory in preparation for the migrated db files. Error: %s\n >Index: ldapserver/ldap/admin/src/scripts/setup-ds.pl.in >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/setup-ds.pl.in,v >retrieving revision 1.5 >diff -u -8 -r1.5 setup-ds.pl.in >--- ldapserver/ldap/admin/src/scripts/setup-ds.pl.in 12 Jul 2007 13:52:42 -0000 1.5 >+++ ldapserver/ldap/admin/src/scripts/setup-ds.pl.in 13 Jul 2007 13:48:38 -0000 >@@ -42,16 +42,17 @@ > use strict; > > use Setup; > use SetupLog; > use Inf; > use Resource; > use DialogManager; > use Util; >+use DSCreate; > > my $res = new Resource("@propertydir@/setup-ds.res"); > > my $setup = new Setup($res); > > if (!$setup->{silent}) { > my $dialogmgr = new DialogManager($setup, $res, $TYPICAL); > >@@ -65,23 +66,24 @@ > > my $rc = $dialogmgr->run(); > if ($rc) { > $setup->doExit(); > } > $setup->{inf}->write(); > } > >-my @errs; >-my ($rc, $output) = createDSInstance($setup->{inf}, \@errs); >-if ($rc) { >+my @errs = createDSInstance($setup->{inf}); >+if (@errs) { > $setup->msg(@errs); >- $setup->msg($FATAL, 'error_creating_dsinstance', $rc, $output); >+ $setup->msg($FATAL, 'error_creating_dsinstance', >+ $setup->{inf}->{slapd}->{ServerIdentifier}); > } else { >- $setup->msg('created_dsinstance', $output); >+ $setup->msg('created_dsinstance', >+ $setup->{inf}->{slapd}->{ServerIdentifier}); > } > > END { > if ($setup) { > if (!$setup->{keep}) { > unlink $setup->{inffile}; > } > >Index: ldapserver/ldap/admin/src/scripts/setup-ds.res.in >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/setup-ds.res.in,v >retrieving revision 1.7 >diff -u -8 -r1.7 setup-ds.res.in >--- ldapserver/ldap/admin/src/scripts/setup-ds.res.in 12 Jul 2007 13:52:42 -0000 1.7 >+++ ldapserver/ldap/admin/src/scripts/setup-ds.res.in 13 Jul 2007 13:48:38 -0000 >@@ -82,25 +82,40 @@ > > # ----------- 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 > > setup_exiting = Exiting . . .\nLog file is '%s'\n\n >-error_creating_dsinstance = Error: Could not create directory server instance. Error code %s. Output:\n%s\n >-created_dsinstance = Your new DS instance was successfully created. Output:\n%s\n >+error_creating_dsinstance = Error: Could not create directory server instance '%s'.\n >+created_dsinstance = Your new DS instance '%s' was successfully created.\n > no_mapvalue_for_key = The map value '%s' for key '%s' did not map to a value in any of the given information files.\n > error_opening_ldiftmpl = Could not open the LDIF template file '%s'. Error: %s\n > error_mapping_token_ldiftmpl = The entry '%s' in LDIF file '%s' contains a token '%s' for which there is no mapper.\nPlease check the file and your mapper to make sure all tokens are handled correctly.\n > error_deleteall_entries = Error deleting entry '%s' and all children. Error: %s\n > error_adding_entry = Error adding entry '%s'. Error: %s\n > error_updating_entry = Error updating entry '%s'. Error: %s\n > >- > error_invalid_param = The parameter '%s' has an invalid value '%s'.\n > error_port_available = The port number '%s' is not available for use. This may be due to an\ > invalid port number, or the port already being in use by another\ > program, or low port restriction. Please choose another value for\ > ServerPort. Error: $!\n > error_invalid_serverid = The ServerIdentifier '%s' contains invalid characters. It must\ > contain only alphanumeric characters and the following: #%,.:@_-\n >+error_opening_scripttmpl = Could not open the script template file '%s'. Error: %s\n >+error_creating_directory = Could not create directory '%s'. Error: %s\n >+error_chowning_directory = Could not change ownership of directory '%s' to userid '%s': Error: %s\n >+error_chowning_file = Could not change ownership of '%s' to userid '%s': Error: %s\n >+error_chmoding_file = Could not change permissions of '%s': Error: %s\n >+error_chgrping_directory = Could not change group of directory '%s' to group '%s': Error: %s\n >+error_creating_file = Could not create file '%s'. Error: %s\n >+error_copying_file = Could not copy file '%s' to '%s'. Error: %s\n >+error_enabling_feature = Could not enable the directory server feature '%s'. Error: %s\n >+error_importing_ldif = Could not import LDIF file '%s'. Error: %s. Output: %s\n >+error_starting_server = Could not start the directory server using command '%s'. The last line from the error log was '%s'. Error: %s\n >+error_missing_port_and_ldapi = Either ServerPort or ldapifilepath must be specified. The server must listen to something.\n >+error_missing_port = No ServerPort specified. The server must have a port number to listen to (default 389).\n >+error_server_already_exists = Error: the server already exists at '%s'\ >+Please remove it first if you really want to recreate it,\ >+or use a different ServerIdentifier to create another instance.\n >Index: ldapserver/ldap/ldif/template-dse.ldif.in >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/ldif/template-dse.ldif.in,v >retrieving revision 1.2 >diff -u -8 -r1.2 template-dse.ldif.in >--- ldapserver/ldap/ldif/template-dse.ldif.in 29 Jun 2007 21:59:13 -0000 1.2 >+++ ldapserver/ldap/ldif/template-dse.ldif.in 13 Jul 2007 13:48:38 -0000 >@@ -4,30 +4,30 @@ > objectclass:extensibleObject > objectclass:nsslapdConfig > nsslapd-schemadir: %schema_dir% > nsslapd-lockdir: %lock_dir% > nsslapd-tmpdir: %tmp_dir% > nsslapd-certdir: %cert_dir% > nsslapd-ldifdir: %ldif_dir% > nsslapd-bakdir: %bak_dir% >-nsslapd-saslpath: %sasl_path% >+nsslapd-instancedir: %inst_dir% > nsslapd-accesslog-logging-enabled: on > nsslapd-accesslog-maxlogsperdir: 10 > nsslapd-accesslog-mode: 600 > nsslapd-accesslog-maxlogsize: 100 > nsslapd-accesslog-logrotationtime: 1 > nsslapd-accesslog-logrotationtimeunit: day > nsslapd-accesslog-logrotationsync-enabled: off > nsslapd-accesslog-logrotationsynchour: 0 > nsslapd-accesslog-logrotationsyncmin: 0 > nsslapd-accesslog: %log_dir%/access > nsslapd-enquote-sup-oc: off > nsslapd-localhost: %fqdn% >-nsslapd-schemacheck: 1 >+nsslapd-schemacheck: on > nsslapd-rewrite-rfc1274: off > nsslapd-return-exact-case: on > nsslapd-ssl-check-hostname: on > nsslapd-port: %ds_port% > nsslapd-localuser: %ds_user% > nsslapd-errorlog-logging-enabled: on > nsslapd-errorlog-mode: 600 > nsslapd-errorlog-maxlogsperdir: 2 >@@ -488,17 +488,17 @@ > objectclass: top > objectclass: nsSlapdPlugin > objectclass: extensibleObject > cn: Internationalization Plugin > nsslapd-pluginpath: libcollation-plugin > nsslapd-plugininitfunc: orderingRule_init > nsslapd-plugintype: matchingRule > nsslapd-pluginenabled: on >-nsslapd-pluginarg0: @configdir@/slapd-collations.conf >+nsslapd-pluginarg0: %config_dir%/slapd-collations.conf > > dn: cn=HTTP Client,cn=plugins,cn=config > objectclass: top > objectclass: nsSlapdPlugin > objectclass: extensibleObject > cn: HTTP Client > nsslapd-pluginpath: libhttp-client-plugin > nsslapd-plugininitfunc: http_client_init >Index: ldapserver/ldap/ldif/template.ldif >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/ldif/template.ldif,v >retrieving revision 1.5 >diff -u -8 -r1.5 template.ldif >--- ldapserver/ldap/ldif/template.ldif 18 Apr 2006 17:39:57 -0000 1.5 >+++ ldapserver/ldap/ldif/template.ldif 13 Jul 2007 13:48:38 -0000 >@@ -32,84 +32,82 @@ > # exception. > # > # > # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. > # Copyright (C) 2005 Red Hat, Inc. > # All rights reserved. > # END COPYRIGHT BLOCK > # >-dn: %%%SUFFIX%%% >-objectclass: top >-aci: (targetattr ="*")(version 3.0; >- acl "Configuration Administrators Group";allow (all) (groupdn = "ldap:/// >- cn=Configuration Administrators, ou=Groups, ou=TopologyManagement, o=NetscapeRoot");) >+dn: %ds_suffix% >+changetype: modify >+add: aci > aci: (targetattr ="*")(version 3.0; > acl "Directory Administrators Group";allow (all) (groupdn = "ldap:/// >- cn=Directory Administrators, %%%SUFFIX%%%");) >+ cn=Directory Administrators, %ds_suffix%");) > >-dn: cn=Directory Administrators, %%%SUFFIX%%% >+dn: cn=Directory Administrators, %ds_suffix% > objectClass: top > objectClass: groupofuniquenames > cn: Directory Administrators > >-dn: ou=Groups, %%%SUFFIX%%% >+dn: ou=Groups, %ds_suffix% > objectclass: top > objectclass: organizationalunit > ou: Groups > >-dn: ou=People, %%%SUFFIX%%% >+dn: ou=People, %ds_suffix% > objectclass: top > objectclass: organizationalunit > ou: People > aci: (targetattr ="userpassword || te > lephonenumber || facsimiletelephonenumber")(version 3.0;acl "Allow self entry > modification";allow (write)(userdn = "ldap:///self");) > aci: (targetattr !="cn || sn || uid")(t > argetfilter ="(ou=Accounting)")(version 3.0;acl "Accounting Managers G > roup Permissions";allow (write)(groupdn = "ldap:///cn=Accounting Managers,ou >- =groups,%%%SUFFIX%%%");) >+ =groups,%ds_suffix%");) > aci: (targetattr !="cn || sn || uid")(t > argetfilter ="(ou=Human Resources)")(version 3.0;acl "HR Group Permiss >- ions";allow (write)(groupdn = "ldap:///cn=HR Managers,ou=groups,%%%SUFFIX%%% >+ ions";allow (write)(groupdn = "ldap:///cn=HR Managers,ou=groups,%ds_suffix% > ");) > aci: (targetattr !="cn ||sn || uid")(t > argetfilter ="(ou=Product Testing)")(version 3.0;acl "QA Group Permiss >- ions";allow (write)(groupdn = "ldap:///cn=QA Managers,ou=groups,%%%SUFFIX%%% >+ ions";allow (write)(groupdn = "ldap:///cn=QA Managers,ou=groups,%ds_suffix% > ");) > aci: (targetattr !="cn || sn || uid")(t > argetfilter ="(ou=Product Development)")(version 3.0;acl "Engineering > Group Permissions";allow (write)(groupdn = "ldap:///cn=PD Managers,ou=groups >- ,%%%SUFFIX%%%");) >+ ,%ds_suffix%");) > >-dn: ou=Special Users,%%%SUFFIX%%% >+dn: ou=Special Users,%ds_suffix% > objectclass: top > objectclass: organizationalUnit > ou: Special Users > description: Special Administrative Accounts > >-dn: cn=Accounting Managers,ou=groups,%%%SUFFIX%%% >+dn: cn=Accounting Managers,ou=groups,%ds_suffix% > objectclass: top > objectclass: groupOfUniqueNames > cn: Accounting Managers > ou: groups > description: People who can manage accounting entries > >-dn: cn=HR Managers,ou=groups,%%%SUFFIX%%% >+dn: cn=HR Managers,ou=groups,%ds_suffix% > objectclass: top > objectclass: groupOfUniqueNames > cn: HR Managers > ou: groups > description: People who can manage HR entries > >-dn: cn=QA Managers,ou=groups,%%%SUFFIX%%% >+dn: cn=QA Managers,ou=groups,%ds_suffix% > objectclass: top > objectclass: groupOfUniqueNames > cn: QA Managers > ou: groups > description: People who can manage QA entries > >-dn: cn=PD Managers,ou=groups,%%%SUFFIX%%% >+dn: cn=PD Managers,ou=groups,%ds_suffix% > objectclass: top > objectclass: groupOfUniqueNames > cn: PD Managers > ou: groups > description: People who can manage engineer entries >Index: ldapserver/m4/fhs.m4 >=================================================================== >RCS file: /cvs/dirsec/ldapserver/m4/fhs.m4,v >retrieving revision 1.3 >diff -u -8 -r1.3 fhs.m4 >--- ldapserver/m4/fhs.m4 26 Apr 2007 02:37:54 -0000 1.3 >+++ ldapserver/m4/fhs.m4 13 Jul 2007 13:48:38 -0000 >@@ -34,16 +34,17 @@ > fi > > # check for --with-fhs-opt > AC_MSG_CHECKING(for --with-fhs-opt) > AC_ARG_WITH(fhs-opt, [ --with-fhs-opt Use FHS optional layout], > [ > with_fhs_opt=yes > AC_MSG_RESULT(yes) >+ AC_SUBST(with_fhs_opt) > ], > AC_MSG_RESULT(no)) > > if test "$with_fhs_opt" = "yes"; then > AC_DEFINE([IS_FHS_OPT], [1], [Use FHS optional layout]) > fi > > if test "$with_fhs" = "yes" -a "$with_fhs_opt" = "yes"; then
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 248145
:
159175
|
159176
|
159177
|
159178
|
159179
|
159181
|
159182
|
159183
|
159184
|
159185
|
159186
| 159187 |
159188
|
159227
|
159228
|
159230
|
159234
|
159235
|
159550
|
159551
|
159552
|
159558