openldap/MigrationTools-26-suffix.patch
cvsdist fa9c485527 auto-import changelog data from openldap-2.1.22-8.src.rpm
* Thu Oct 23 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.22-8
- add another section to the ABI note for the TLS libdb so that it's marked as
  not needing an executable stack (from Arjan Van de Ven)

* Thu Oct 16 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.22-7
- force bundled libdb to not use O_DIRECT by making it forget that we have it

* Wed Oct 15 2003 Nalin Dahyabhai <nalin@redhat.com>
- build bundled libdb for slapd dynamically to make the package smaller,
  among other things
- on tls-capable arches, build libdb both with and without shared posix
  mutexes, otherwise just without
- disable posix mutexes unconditionally for db 4.0, which shouldn't need
  them for the migration cases where it's used
- update to MigrationTools 45

* Fri Sep 12 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.22-6
- drop rfc822-MailMember.schema, merged into upstream misc.schema at some point

* Wed Aug 27 2003 Nalin Dahyabhai <nalin@redhat.com>
- actually require newer libtool, as was intended back in 2.1.22-0, noted as
  missed by Jim Richardson

* Fri Jul 25 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.22-5
- enable rlookups, they don't cost anything unless also enabled in slapd's
  configuration file

* Tue Jul 22 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.22-4
- rebuild

* Thu Jul 17 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.22-3
- rebuild

* Wed Jul 16 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.22-2
- rebuild

* Tue Jul 15 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.22-1
- build

* Mon Jul 14 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.22-0
- 2.1.22 now badged stable
- be more aggressive in what we index by default
- use/require libtool 1.5

* Mon Jun 30 2003 Nalin Dahyabhai <nalin@redhat.com>
- update to 2.1.22

* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Tue Jun 03 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.21-1
- update to 2.1.21
- enable ldap, meta, monitor, null, rewrite in slapd

* Mon May 19 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.20-1
- update to 2.1.20

* Thu May 08 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.19-1
- update to 2.1.19

* Mon May 05 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.17-1
- switch to db with crypto

* Fri May 02 2003 Nalin Dahyabhai <nalin@redhat.com>
- install the db utils for the bundled libdb as %{_sbindir}/slapd_db_*
- install slapcat/slapadd from 2.0.x for migration purposes

* Wed Apr 30 2003 Nalin Dahyabhai <nalin@redhat.com>
- update to 2.1.17
- disable the shell backend, not expected to work well with threads
- drop the kerberosSecurityObject schema, the krbName attribute it
  contains is only used if slapd is built with v2 kbind support
2004-09-09 09:39:22 +00:00

37 lines
1.1 KiB
Diff

Try adding the top-level object, which may be missing, but don't worry if
the add operation fails.
--- MigrationTools-26/migrate_all_online.sh Wed Oct 25 16:27:02 2000
+++ MigrationTools-26/migrate_all_online.sh Wed Oct 25 16:30:11 2000
@@ -179,5 +179,31 @@
echo "Migrating netgroups (by host)..."
$PERL -I${INSTDIR} ${INSTDIR}migrate_netgroup_byhost.pl $ETC_NETGROUP >> $DB
+# Try to add the top-level object, because it's frequently missing.
+NAMINGATTRNAME=`echo $LDAP_BASEDN | cut -f1 -d=`
+NAMINGATTRVALUE=`echo $LDAP_BASEDN | cut -f1 -d, | cut -f2 -d=`
+OBJECTCLASS=
+case "$NAMINGATTRNAME" in
+ dc) OBJECTCLASS=domain;;
+ o) OBJECTCLASS=organization;;
+ l) OBJECTCLASS=locality;;
+ c) OBJECTCLASS=country;;
+ nismapname) OBJECTCLASS=nisMap;;
+ cn) OBJECTCLASS=container;;
+esac
+
+if test -n "$NAMINGATTRNAME" ; then
+if test -n "$NAMINGATTRVALUE" ; then
+if test -n "$OBJECTCLASS" ; then
+cat << EOF | $LDAPADD -h $LDAPHOST -D "$LDAP_BINDDN" -x -w "$LDAP_BINDCRED"
+dn: $LDAP_BASEDN
+$NAMINGATTRNAME: $NAMINGATTRVALUE
+objectClass: top
+objectClass: $OBJECTCLASS
+EOF
+fi
+fi
+fi
+
echo "Importing into LDAP..."