From ba57c5030d2e08bc68c1e580a58141a0a0065698 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 24 Jan 2007 12:23:42 +0000 Subject: r20999: - update the list of attributes for classSchema and atttributeSchema objects - use ${SCHEMADN} instead of CN=Schema,CN=Configuration,${BASEDN} - do not include autogenerated values: instanceType, cn and name in the ldif output - take care of the systemOnly attribute and a resulting NO-USER-MODIFICATION metze (This used to be commit 30a0e8b26e4b49927d733ac05e6032350fe22e9f) --- testprogs/ejs/minschema.js | 102 ++++++++++++++++++++++++++++++++------------- 1 file changed, 74 insertions(+), 28 deletions(-) diff --git a/testprogs/ejs/minschema.js b/testprogs/ejs/minschema.js index c51caaca84..299cd11aa0 100755 --- a/testprogs/ejs/minschema.js +++ b/testprogs/ejs/minschema.js @@ -40,22 +40,69 @@ rootDse = new Object(); objectclasses_expanded = new Object(); /* the attributes we need for objectclasses */ -class_attrs = new Array("objectClass", - "auxiliaryClass", "systemAuxiliaryClass", - "possSuperiors", "systemPossSuperiors", - "lDAPDisplayName", "governsID", - "rDNAttID", "mustContain", "systemMustContain", - "mayContain", "systemMayContain", - "objectClassCategory", "subClassOf", - "defaultObjectCategory", "defaultHidingValue", - "systemFlags", "systemOnly", "defaultSecurityDescriptor", - "objectCategory", "possibleInferiors", "displaySpecification", - "schemaIDGUID"); - -attrib_attrs = new Array("objectClass", "lDAPDisplayName", - "isSingleValued", "linkID", "systemFlags", "systemOnly", - "schemaIDGUID", "adminDisplayName", "attributeID", - "attributeSyntax", "oMSyntax", "oMObjectClass"); +class_attrs = new Array("objectClass", + "subClassOf", + "governsID", + "possSuperiors", + "mayContain", + "mustContain", + "auxiliaryClass", + "rDNAttID", + "showInAdvancedViewOnly", + "adminDisplayName", + "adminDescription", + "objectClassCategory", + "lDAPDisplayName", + "schemaIDGUID", + "systemOnly", + "systemPossSuperiors", + "systemMayContain", + "systemMustContain", + "systemAuxiliaryClass", + "defaultSecurityDescriptor", + "systemFlags", + "defaultHidingValue", + "objectCategory", + "defaultObjectCategory", + + /* this attributes are not used by w2k3 */ + "schemaFlagsEx", + "msDs-IntId", + "msDs-Schema-Extensions", + "classDisplayName", + "isDefunct"); + + +attrib_attrs = new Array("objectClass", + "attributeID", + "attributeSyntax", + "isSingleValued", + "rangeLower", + "rangeUpper", + "mAPIID", + "linkID", + "showInAdvancedViewOnly", + "adminDisplayName", + "oMObjectClass", + "adminDescription", + "oMSyntax", + "searchFlags", + "extendedCharsAllowed", + "lDAPDisplayName", + "schemaIDGUID", + "attributeSecurityGUID", + "systemOnly", + "systemFlags", + "isMemberOfPartialAttributeSet", + "objectCategory", + + /* this attributes are not used by w2k3 */ + "schemaFlagsEx", + "msDs-IntId", + "msDs-Schema-Extensions", + "classDisplayName", + "isEphemeral", + "isDefunct"); /* notes: @@ -144,14 +191,14 @@ function map_attribute_syntax(s) { /* - fix a string DN to use ${BASEDN} + fix a string DN to use ${SCHEMADN} */ function fix_dn(dn) { - var s = strstr(dn, rootDse.defaultNamingContext); + var s = strstr(dn, rootDse.schemaNamingContext); if (s == NULL) { return dn; } - return substr(dn, 0, strlen(dn) - strlen(s)) + "${BASEDN}"; + return substr(dn, 0, strlen(dn) - strlen(s)) + "${SCHEMADN}"; } /* @@ -159,9 +206,7 @@ function fix_dn(dn) { */ function write_ldif_one(o, attrs) { var i; - printf("dn: CN=%s,CN=Schema,CN=Configuration,${BASEDN}\n", o.cn); - printf("cn: %s\n", o.cn); - printf("name: %s\n", o.cn); + printf("dn: CN=%s,${SCHEMADN}\n", o.cn); for (i=0;i