openldap/MigrationTools-26-suffix.patch

36 lines
1.0 KiB
Diff
Raw Normal View History

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
auto-import changelog data from openldap-2.0.7-14.src.rpm * Fri Mar 02 2001 Nalin Dahyabhai <nalin@redhat.com> - rebuild in new environment * Thu Feb 08 2001 Nalin Dahyabhai <nalin@redhat.com> - back out pidfile patches, which interact weirdly with Linux threads - mark non-standard schema as such by moving them to a different directory * Mon Feb 05 2001 Nalin Dahyabhai <nalin@redhat.com> - update to MigrationTools 36, adds netgroup support * Mon Jan 29 2001 Nalin Dahyabhai <nalin@redhat.com> - fix thinko in that last patch * Thu Jan 25 2001 Nalin Dahyabhai <nalin@redhat.com> - try to work around some buffering problems * Tue Jan 23 2001 Nalin Dahyabhai <nalin@redhat.com> - gettextize the init script * Thu Jan 18 2001 Nalin Dahyabhai <nalin@redhat.com> - gettextize the init script * Fri Jan 12 2001 Nalin Dahyabhai <nalin@redhat.com> - move the RFCs to the base package (#21701) - update to MigrationTools 34 * Wed Jan 10 2001 Nalin Dahyabhai <nalin@redhat.com> - add support for additional OPTIONS, SLAPD_OPTIONS, and SLURPD_OPTIONS in a /etc/sysconfig/ldap file (#23549) * Fri Dec 29 2000 Nalin Dahyabhai <nalin@redhat.com> - change automount object OID from 1.3.6.1.1.1.2.9 to 1.3.6.1.1.1.2.13, per mail from the ldap-nis mailing list * Tue Dec 05 2000 Nalin Dahyabhai <nalin@redhat.com> - force -fPIC so that shared libraries don't fall over * Mon Dec 04 2000 Nalin Dahyabhai <nalin@redhat.com> - add Norbert Klasen's patch (via Del) to fix searches using ldaps URLs (OpenLDAP ITS #889) - add "-h ldaps:///" to server init when TLS is enabled, in order to support ldaps in addition to the regular STARTTLS (suggested by Del) * Mon Nov 27 2000 Nalin Dahyabhai <nalin@redhat.com> - correct mismatched-dn-cn bug in migrate_automount.pl * Mon Nov 20 2000 Nalin Dahyabhai <nalin@redhat.com> - update to the correct OIDs for automount and automountInformation - add notes on upgrading * Tue Nov 07 2000 Nalin Dahyabhai <nalin@redhat.com> - update to 2.0.7 - drop chdir patch (went mainstream) * Thu Nov 02 2000 Nalin Dahyabhai <nalin@redhat.com> - change automount object classes from auxiliary to structural * Tue Oct 31 2000 Nalin Dahyabhai <nalin@redhat.com> - update to Migration Tools 27 - change the sense of the last simple patch * Wed Oct 25 2000 Nalin Dahyabhai <nalin@redhat.com> - reorganize the patch list to separate MigrationTools and OpenLDAP patches - switch to Luke Howard's rfc822MailMember schema instead of the aliases.schema - configure slapd to run as the non-root user "ldap" (#19370) - chdir() before chroot() (we don't use chroot, though) (#19369) - disable saving of the pid file because the parent thread which saves it and the child thread which listens have different pids
2004-09-09 09:28:35 +00:00
+++ MigrationTools-26/migrate_all_online.sh Wed Oct 25 16:30:11 2000
@@ -179,5 +179,30 @@
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 usually missing.
+TYPE=`echo $LDAP_BASEDN | cut -f1 -d=`
+TOP=`echo $LDAP_BASEDN | cut -f1 -d, | cut -f2 -d=`
+CLASS=$TYPE
+if [ "$CLASS" = "dc" ] ; then
+ CLASS=domain
+elif [ "$CLASS" = "o" ] ; then
+ CLASS=organization
+elif [ "$CLASS" = "l" ] ; then
+ CLASS=locality
+elif [ "$CLASS" = "c" ] ; then
+ CLASS=country
+elif [ "$CLASS" = "nismapname" ] ; then
+ CLASS=nisMap
+elif [ "$CLASS" = "cn" ] ; then
+ CLASS=container
+fi
+
+cat << EOF | $LDAPADD -h $LDAPHOST -D "$LDAP_BINDDN" -x -w "$LDAP_BINDCRED"
+dn: $LDAP_BASEDN
+$TYPE: $TOP
+objectClass: top
+objectClass: $CLASS
+EOF
+
echo "Importing into LDAP..."