summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-01-24 12:23:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:44:19 -0500
commitba57c5030d2e08bc68c1e580a58141a0a0065698 (patch)
treea43678d8c32156be33e3a6fe3428c364fec3607b /testprogs
parent0eea5a66b4f92ec2a2f557dd2f658d89e81ccd7c (diff)
downloadsamba-ba57c5030d2e08bc68c1e580a58141a0a0065698.tar.gz
samba-ba57c5030d2e08bc68c1e580a58141a0a0065698.tar.bz2
samba-ba57c5030d2e08bc68c1e580a58141a0a0065698.zip
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)
Diffstat (limited to 'testprogs')
-rwxr-xr-xtestprogs/ejs/minschema.js102
1 files 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<attrs.length;i++) {
var a = attrs[i];
if (o[a] == undefined) {
@@ -616,6 +661,10 @@ function write_aggregate_attribute(attrib) {
if (attrib['isSingleValued'] == "TRUE") {
printf("SINGLE-VALUE ");
}
+ if (attrib['systemOnly'] == "TRUE") {
+ printf("NO-USER-MODIFICATION ");
+ }
+
printf(")\n");
}
@@ -624,13 +673,10 @@ function write_aggregate_attribute(attrib) {
write the aggregate record
*/
function write_aggregate() {
- printf("dn: CN=Aggregate,CN=Schema,CN=Configuration,${BASEDN}\n");
+ printf("dn: CN=Aggregate,${SCHEMADN}\n");
print("objectClass: top
objectClass: subSchema
-cn: Aggregate
-instanceType: 4
-name: Aggregate
-objectCategory: CN=SubSchema,CN=Schema,CN=Configuration,${BASEDN}
+objectCategory: CN=SubSchema,${SCHEMADN}
");
for (i in objectclasses) {
write_aggregate_objectclass(objectclasses[i]);
@@ -679,7 +725,7 @@ for (i in objectclasses) {
num_classes++;
}
/* so EJS do not have while nor the break statement
- can't find any other way than doing more loops
+ cannot find any other way than doing more loops
than necessary to recursively expand all classes
*/
var inf;