summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2009-10-01 15:56:20 -0600
committerRich Megginson <rmeggins@redhat.com>2009-10-07 09:06:21 -0600
commitd1214317ca2bcefd18db4e1a7414ac2a8408e5a9 (patch)
tree59081a1417b3445dc67f92db2b297b4c71398750
parent6eb6e4b521357fa28ed85ad58c7ecd6bd26a7a32 (diff)
downloadds-389-ds-base-1.2.3.tar.gz
ds-389-ds-base-1.2.3.tar.xz
ds-389-ds-base-1.2.3.zip
more updates - add missing rundir - remove ldapiautodnsuffix389-ds-base-1.2.3
Some older releases did not have nsslapd-rundir - upgrading from those releases will cause the server not to start - we must add nsslapd-rundir if it is missing We also got rid of nsslapd-ldapiautodnsuffix, so remove that from the config - it doesn't hurt anything to leave it, but the error message is annoying I also added back a mostly truncated version of 28pilot.ldif because some apps still use pilotObject - those apps should change to use a different objectclass ASAP. Tested on Fedora 11 i386 and x86_64 Reviewed by: nkinder (Thanks!)
-rw-r--r--Makefile.am3
-rw-r--r--Makefile.in3
-rw-r--r--ldap/admin/src/scripts/10delautodnsuffix.pl23
-rw-r--r--ldap/admin/src/scripts/10fixrundir.pl28
-rw-r--r--ldap/schema/28pilot.ldif58
-rw-r--r--ldap/servers/slapd/main.c2
6 files changed, 116 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index b8724cad..c34e6fe3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -246,6 +246,7 @@ schema_DATA = $(srcdir)/ldap/schema/00core.ldif \
$(srcdir)/ldap/schema/10rfc2307.ldif \
$(srcdir)/ldap/schema/20subscriber.ldif \
$(srcdir)/ldap/schema/25java-object.ldif \
+ $(srcdir)/ldap/schema/28pilot.ldif \
$(srcdir)/ldap/schema/30ns-common.ldif \
$(srcdir)/ldap/schema/50ns-admin.ldif \
$(srcdir)/ldap/schema/50ns-certificate.ldif \
@@ -394,6 +395,8 @@ dist_man_MANS = man/man1/dbscan.1 \
#------------------------
update_DATA = ldap/admin/src/scripts/exampleupdate.pl \
ldap/admin/src/scripts/exampleupdate.ldif \
+ ldap/admin/src/scripts/10delautodnsuffix.pl \
+ ldap/admin/src/scripts/10fixrundir.pl \
ldap/admin/src/scripts/50addchainingsaslpwroles.ldif \
ldap/admin/src/scripts/50memberofindex.ldif \
ldap/admin/src/scripts/50bitstringsyntaxplugin.ldif \
diff --git a/Makefile.in b/Makefile.in
index 49cde44f..4de1cfea 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1291,6 +1291,7 @@ schema_DATA = $(srcdir)/ldap/schema/00core.ldif \
$(srcdir)/ldap/schema/10rfc2307.ldif \
$(srcdir)/ldap/schema/20subscriber.ldif \
$(srcdir)/ldap/schema/25java-object.ldif \
+ $(srcdir)/ldap/schema/28pilot.ldif \
$(srcdir)/ldap/schema/30ns-common.ldif \
$(srcdir)/ldap/schema/50ns-admin.ldif \
$(srcdir)/ldap/schema/50ns-certificate.ldif \
@@ -1441,6 +1442,8 @@ dist_man_MANS = man/man1/dbscan.1 \
#------------------------
update_DATA = ldap/admin/src/scripts/exampleupdate.pl \
ldap/admin/src/scripts/exampleupdate.ldif \
+ ldap/admin/src/scripts/10delautodnsuffix.pl \
+ ldap/admin/src/scripts/10fixrundir.pl \
ldap/admin/src/scripts/50addchainingsaslpwroles.ldif \
ldap/admin/src/scripts/50memberofindex.ldif \
ldap/admin/src/scripts/50bitstringsyntaxplugin.ldif \
diff --git a/ldap/admin/src/scripts/10delautodnsuffix.pl b/ldap/admin/src/scripts/10delautodnsuffix.pl
new file mode 100644
index 00000000..548a2d13
--- /dev/null
+++ b/ldap/admin/src/scripts/10delautodnsuffix.pl
@@ -0,0 +1,23 @@
+use Mozilla::LDAP::Conn;
+use Mozilla::LDAP::Utils qw(normalizeDN);
+use Mozilla::LDAP::API qw(:constant ldap_url_parse ldap_explode_dn);
+
+sub runinst {
+ my ($inf, $inst, $dseldif, $conn) = @_;
+
+ my @errs;
+
+ # see if nsslapd-ldapiautodnsuffix is defined
+ my $ent = $conn->search("cn=config", "base", "(objectclass=*)");
+ if (!$ent) {
+ return ('error_finding_config_entry', 'cn=config', $conn->getErrorString());
+ }
+
+ if ($ent->getValues('nsslapd-ldapiautodnsuffix')) {
+ $ent->remove('nsslapd-ldapiautodnsuffix');
+ $conn->update($ent);
+ # ignore errors - cn=config attr deletion not allowed over ldap
+ }
+
+ return ();
+}
diff --git a/ldap/admin/src/scripts/10fixrundir.pl b/ldap/admin/src/scripts/10fixrundir.pl
new file mode 100644
index 00000000..a1e75240
--- /dev/null
+++ b/ldap/admin/src/scripts/10fixrundir.pl
@@ -0,0 +1,28 @@
+use Mozilla::LDAP::Conn;
+use Mozilla::LDAP::Utils qw(normalizeDN);
+use Mozilla::LDAP::API qw(:constant ldap_url_parse ldap_explode_dn);
+
+sub runinst {
+ my ($inf, $inst, $dseldif, $conn) = @_;
+
+ my @errs;
+
+ # see if nsslapd-rundir is defined
+ my $ent = $conn->search("cn=config", "base", "(objectclass=*)");
+ if (!$ent) {
+ return ('error_finding_config_entry', 'cn=config', $conn->getErrorString());
+ }
+
+ if (!$ent->getValues('nsslapd-rundir')) {
+ $ent->setValues('nsslapd-rundir', $inf->{slapd}->{run_dir});
+ # mark as modified so update will use a replace instead of an add
+ $ent->attrModified('nsslapd-rundir');
+ $conn->update($ent);
+ my $rc = $conn->getErrorCode();
+ if ($rc) {
+ return ('error_updating_entry', 'cn=config', $conn->getErrorString());
+ }
+ }
+
+ return ();
+}
diff --git a/ldap/schema/28pilot.ldif b/ldap/schema/28pilot.ldif
new file mode 100644
index 00000000..0e9bcb6e
--- /dev/null
+++ b/ldap/schema/28pilot.ldif
@@ -0,0 +1,58 @@
+#
+# 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) 2005 Red Hat, Inc.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+#
+# This is deprecated and will be removed ASAP. Some applications still
+# use the pilotObject objectclass, but nothing else, so the contents
+# of this file have been removed except for that definition. Applications
+# must migrate away from the use of this objectclass.
+# The objectclass also uses the attribute type ditRedirect, which is not
+# used or defined anywhere else.
+# The other attributes are defined in other standard schema like the
+# inetorgperson schema, et. al.
+#
+# Schema from the pilot RFCs, especially RFC 1274, that is no longer
+# recommended by Netscape for use in new deployments. Please be aware
+# that future RFCs that succeed RFC 1274 may deprecate some or all of
+# these attribute types and classes.
+#
+dn: cn=schema
+attributeTypes: ( 0.9.2342.19200300.100.1.54 NAME 'ditRedirect' DESC 'Standard LDAP attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 X-ORIGIN 'RFC 1274' )
+attributeTypes: ( 0.9.2342.19200300.100.1.24 NAME 'lastModifiedBy' DESC 'old variant of modifiersName' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 X-ORIGIN 'RFC 1274' )
+attributeTypes: ( 0.9.2342.19200300.100.1.23 NAME 'lastModifiedTime' DESC 'old variant of modifyTimestamp' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'RFC 1274' )
+objectClasses: ( 0.9.2342.19200300.100.4.3 NAME 'pilotObject' DESC 'Standard LDAP objectclass' SUP top MAY ( audio $ dITRedirect $ info $ jpegPhoto $ lastModifiedBy $ lastModifiedTime $ manager $ photo $ uniqueIdentifier ) X-ORIGIN 'RFC 1274' )
diff --git a/ldap/servers/slapd/main.c b/ldap/servers/slapd/main.c
index 33e6e11e..1d820f33 100644
--- a/ldap/servers/slapd/main.c
+++ b/ldap/servers/slapd/main.c
@@ -999,7 +999,7 @@ main( int argc, char **argv)
/* Ensure that we can read from and write to our rundir */
if (access(rundir, R_OK | W_OK)) {
- LDAPDebug(LDAP_DEBUG_ANY, "Unable to access nsslapd-rundir: %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, "Unable to access " CONFIG_RUNDIR_ATTRIBUTE ": %s\n",
slapd_system_strerror(errno), 0, 0);
LDAPDebug(LDAP_DEBUG_ANY, "Ensure that user \"%s\" has read and write "
"permissions on %s\n",