summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/ldap/ns_ldap/idsconfig.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/usr/src/cmd/ldap/ns_ldap/idsconfig.sh b/usr/src/cmd/ldap/ns_ldap/idsconfig.sh
index d435e8f1a7..b0f04ffe7e 100644
--- a/usr/src/cmd/ldap/ns_ldap/idsconfig.sh
+++ b/usr/src/cmd/ldap/ns_ldap/idsconfig.sh
@@ -982,6 +982,7 @@ init()
WC="/usr/bin/wc"
CAT="/usr/bin/cat"
SED="/usr/bin/sed"
+ MV="/usr/bin/mv"
DOM="" # Set to NULL
# If DNS domain (resolv.conf) exists use that, otherwise use domainname.
@@ -4209,6 +4210,30 @@ EOF
fi
}
+#
+# keep_backward_compatibility(): Modify schema for the backward compatibility if
+# there are the incompatible attributes already
+#
+keep_backward_compatibility()
+{
+ ${EVAL} "${LDAPSEARCH} ${SERVER_ARGS} -b cn=schema -s base \
+ \"objectclass=*\" attributeTypes | ${GREP} -i memberGid-oid ${VERB}"
+ if [ $? -eq 0 ]; then
+ ${SED} -e 's/1\.3\.6\.1\.4\.1\.42\.2\.27\.5\.1\.30\ /memberGid-oid\ /' \
+ ${TMPDIR}/schema_attr > ${TMPDIR}/schema_attr.new
+ ${MV} ${TMPDIR}/schema_attr.new ${TMPDIR}/schema_attr
+ fi
+
+ ${EVAL} "${LDAPSEARCH} ${SERVER_ARGS} -b cn=schema -s base \
+ \"objectclass=*\" attributeTypes | ${GREP} -i rfc822mailMember-oid \
+ ${VERB}"
+ if [ $? -eq 0 ]; then
+ ${SED} -e \
+ 's/1\.3\.6\.1\.4\.1\.42\.2\.27\.2\.1\.15\ /rfc822mailMember-oid\ /' \
+ ${TMPDIR}/schema_attr > ${TMPDIR}/schema_attr.new
+ ${MV} ${TMPDIR}/schema_attr.new ${TMPDIR}/schema_attr
+ fi
+}
#
# update_schema_attr(): Update Schema to support Naming.
@@ -4319,6 +4344,8 @@ attributetypes: ( 1.3.6.1.4.1.42.2.27.5.1.68 NAME 'ipTnetNumber' DESC 'Trusted S
EOF
) > ${TMPDIR}/schema_attr
+ keep_backward_compatibility
+
# Add the entry.
${EVAL} "${LDAPMODIFY} ${LDAP_ARGS} -f ${TMPDIR}/schema_attr ${VERB}"
if [ $? -ne 0 ]; then