r17662: some more enhancements to our schema extraction tool,
authorSimo Sorce <idra@samba.org>
Mon, 21 Aug 2006 13:04:14 +0000 (13:04 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:16:21 +0000 (14:16 -0500)
with a nasty hack in minschema.js that I really hate
(This used to be commit 74c40719f2965e2bc055e539f0933d95df070fbf)

source4/setup/schema.ldif
testprogs/ejs/minschema.js

index b84f16225839f6d63ff8eb6280880fb7ce496cbd..3a583faf2e8902a741c7ff324a22d9f7df966578 100644 (file)
@@ -2094,6 +2094,21 @@ attributeID: 1.2.840.113556.1.4.39
 attributeSyntax: 2.5.5.16
 oMSyntax: 65
 
+dn: CN=Move-Tree-State,CN=Schema,CN=Configuration,${BASEDN}
+cn: Move-Tree-State
+name: Move-Tree-State
+objectClass: top
+objectClass: attributeSchema
+lDAPDisplayName: moveTreeState
+isSingleValued: FALSE
+systemFlags: 16
+systemOnly: FALSE
+schemaIDGUID: 1f2ac2c8-3b71-11d2-90cc-00c04fd91ab1
+adminDisplayName: Move-Tree-State
+attributeID: 1.2.840.113556.1.4.1305
+attributeSyntax: 2.5.5.10
+oMSyntax: 4
+
 dn: CN=ms-DS-Allowed-To-Delegate-To,CN=Schema,CN=Configuration,${BASEDN}
 cn: ms-DS-Allowed-To-Delegate-To
 name: ms-DS-Allowed-To-Delegate-To
@@ -7555,6 +7570,194 @@ possibleInferiors: mSMQMigratedUser
 possibleInferiors: ipsecISAKMPPolicy
 schemaIDGUID: bf967aa5-0de6-11d0-a285-00aa003049e2
 
+dn: CN=Lost-And-Found,CN=Schema,CN=Configuration,${BASEDN}
+cn: Lost-And-Found
+name: Lost-And-Found
+objectClass: top
+objectClass: classSchema
+systemPossSuperiors: configuration
+systemPossSuperiors: domainDNS
+systemPossSuperiors: dMD
+lDAPDisplayName: lostAndFound
+governsID: 1.2.840.113556.1.5.139
+rDNAttID: cn
+systemMayContain: moveTreeState
+objectClassCategory: 1
+subClassOf: top
+defaultObjectCategory: CN=Lost-And-Found,CN=Schema,CN=Configuration,${BASEDN}
+defaultHidingValue: TRUE
+systemFlags: 16
+systemOnly: FALSE
+defaultSecurityDescriptor: D:(A;;RPWPCRCCDCLCLORCWOWDSDDTSW;;;DA)(A;;RPWPCRCCDCLCLORCWOWDSDDTSW;;;SY)(A;;RPLCLORC;;;AU)
+objectCategory: CN=Class-Schema,CN=Schema,CN=Configuration,${BASEDN}
+possibleInferiors: applicationEntity
+possibleInferiors: msWMI-RangeParam
+possibleInferiors: pKIEnrollmentService
+possibleInferiors: mSMQEnterpriseSettings
+possibleInferiors: serviceInstance
+possibleInferiors: samServer
+possibleInferiors: group
+possibleInferiors: msWMI-UnknownRangeParam
+possibleInferiors: applicationVersion
+possibleInferiors: msPKI-Key-Recovery-Agent
+possibleInferiors: msDS-AzApplication
+possibleInferiors: lostAndFound
+possibleInferiors: rpcProfile
+possibleInferiors: nTDSSiteSettings
+possibleInferiors: linkTrackOMTEntry
+possibleInferiors: meeting
+possibleInferiors: trustedDomain
+possibleInferiors: linkTrackObjectMoveTable
+possibleInferiors: fTDfs
+possibleInferiors: mS-SQL-SQLRepository
+possibleInferiors: msWMI-ShadowObject
+possibleInferiors: rpcProfileElement
+possibleInferiors: rpcContainer
+possibleInferiors: dSUISettings
+possibleInferiors: subnetContainer
+possibleInferiors: interSiteTransport
+possibleInferiors: msieee80211-Policy
+possibleInferiors: builtinDomain
+possibleInferiors: msMQ-Custom-Recipient
+possibleInferiors: mSMQSiteLink
+possibleInferiors: msWMI-PolicyTemplate
+possibleInferiors: documentSeries
+possibleInferiors: msCOM-Partition
+possibleInferiors: device
+possibleInferiors: friendlyCountry
+possibleInferiors: sitesContainer
+possibleInferiors: msWMI-PolicyType
+possibleInferiors: linkTrackVolEntry
+possibleInferiors: msCOM-PartitionSet
+possibleInferiors: serversContainer
+possibleInferiors: attributeSchema
+possibleInferiors: serviceClass
+possibleInferiors: serviceAdministrationPoint
+possibleInferiors: packageRegistration
+possibleInferiors: msWMI-StringSetParam
+possibleInferiors: classSchema
+possibleInferiors: computer
+possibleInferiors: fileLinkTracking
+possibleInferiors: rRASAdministrationConnectionPoint
+possibleInferiors: organizationalRole
+possibleInferiors: certificationAuthority
+possibleInferiors: residentialPerson
+possibleInferiors: msWMI-ObjectEncoding
+possibleInferiors: mS-SQL-OLAPServer
+possibleInferiors: mSMQQueue
+possibleInferiors: fileLinkTrackingEntry
+possibleInferiors: msWMI-UintRangeParam
+possibleInferiors: foreignSecurityPrincipal
+possibleInferiors: user
+possibleInferiors: nTDSConnection
+possibleInferiors: msWMI-UintSetParam
+possibleInferiors: addressBookContainer
+possibleInferiors: mS-SQL-OLAPCube
+possibleInferiors: document
+possibleInferiors: container
+possibleInferiors: comConnectionPoint
+possibleInferiors: rFC822LocalPart
+possibleInferiors: msDS-AzScope
+possibleInferiors: nTFRSMember
+possibleInferiors: dHCPClass
+possibleInferiors: siteLinkBridge
+possibleInferiors: dnsNode
+possibleInferiors: groupPolicyContainer
+possibleInferiors: remoteStorageServicePoint
+possibleInferiors: mS-SQL-SQLPublication
+possibleInferiors: nTFRSSubscriptions
+possibleInferiors: site
+possibleInferiors: organization
+possibleInferiors: msDS-AppData
+possibleInferiors: inetOrgPerson
+possibleInferiors: domainDNS
+possibleInferiors: siteLink
+possibleInferiors: licensingSiteSettings
+possibleInferiors: rpcServer
+possibleInferiors: groupOfNames
+possibleInferiors: nTFRSSubscriber
+possibleInferiors: mS-SQL-SQLDatabase
+possibleInferiors: person
+possibleInferiors: intellimirrorSCP
+possibleInferiors: msWMI-WMIGPO
+possibleInferiors: aCSResourceLimits
+possibleInferiors: interSiteTransportContainer
+possibleInferiors: printQueue
+possibleInferiors: msTAPI-RtPerson
+possibleInferiors: volume
+possibleInferiors: ipsecNFA
+possibleInferiors: queryPolicy
+possibleInferiors: msDS-AzTask
+possibleInferiors: msPKI-Enterprise-Oid
+possibleInferiors: msDS-AzRole
+possibleInferiors: mS-SQL-OLAPDatabase
+possibleInferiors: dfsConfiguration
+possibleInferiors: aCSPolicy
+possibleInferiors: typeLibrary
+possibleInferiors: rpcGroup
+possibleInferiors: locality
+possibleInferiors: msDS-App-Configuration
+possibleInferiors: serviceConnectionPoint
+possibleInferiors: rpcServerElement
+possibleInferiors: intellimirrorGroup
+possibleInferiors: mSMQConfiguration
+possibleInferiors: msPKI-PrivateKeyRecoveryAgent
+possibleInferiors: msWMI-IntRangeParam
+possibleInferiors: physicalLocation
+possibleInferiors: msWMI-MergeablePolicyTemplate
+possibleInferiors: ipsecNegotiationPolicy
+possibleInferiors: subnet
+possibleInferiors: msDS-AzAdminManager
+possibleInferiors: mS-SQL-SQLServer
+possibleInferiors: msWMI-RealRangeParam
+possibleInferiors: crossRef
+possibleInferiors: mSMQSettings
+possibleInferiors: controlAccessRight
+possibleInferiors: displaySpecifier
+possibleInferiors: nTDSService
+possibleInferiors: indexServerCatalog
+possibleInferiors: displayTemplate
+possibleInferiors: msExchConfigurationContainer
+possibleInferiors: msDS-QuotaContainer
+possibleInferiors: groupOfUniqueNames
+possibleInferiors: country
+possibleInferiors: addressTemplate
+possibleInferiors: msWMI-Rule
+possibleInferiors: msWMI-IntSetParam
+possibleInferiors: nTFRSSettings
+possibleInferiors: msWMI-SimplePolicyTemplate
+possibleInferiors: pKICertificateTemplate
+possibleInferiors: rRASAdministrationDictionary
+possibleInferiors: organizationalUnit
+possibleInferiors: msTAPI-RtConference
+possibleInferiors: linkTrackVolumeTable
+possibleInferiors: msWMI-Som
+possibleInferiors: secret
+possibleInferiors: room
+possibleInferiors: aCSSubnet
+possibleInferiors: msMQ-Group
+possibleInferiors: remoteMailRecipient
+possibleInferiors: classStore
+possibleInferiors: ipsecPolicy
+possibleInferiors: dSA
+possibleInferiors: categoryRegistration
+possibleInferiors: msDS-AzOperation
+possibleInferiors: ipsecFilter
+possibleInferiors: organizationalPerson
+possibleInferiors: account
+possibleInferiors: storage
+possibleInferiors: domainPolicy
+possibleInferiors: server
+possibleInferiors: classRegistration
+possibleInferiors: nTFRSReplicaSet
+possibleInferiors: cRLDistributionPoint
+possibleInferiors: dnsZone
+possibleInferiors: contact
+possibleInferiors: msDS-QuotaControl
+possibleInferiors: mSMQMigratedUser
+possibleInferiors: ipsecISAKMPPolicy
+schemaIDGUID: 52ab8671-5709-11d1-a9c6-0000f80367c1
+
 dn: CN=Organizational-Person,CN=Schema,CN=Configuration,${BASEDN}
 cn: Organizational-Person
 name: Organizational-Person
@@ -8584,6 +8787,7 @@ objectClasses: ( 1.2.840.113556.1.5.3 NAME 'samDomain' SUP top AUXILIARY MAY ( t
 objectClasses: ( 1.2.840.113556.1.5.2 NAME 'samDomainBase' SUP top AUXILIARY MAY ( uASCompat $ serverState $ serverRole $ revision $ pwdProperties $ pwdHistoryLength $ oEMInformation $ objectSid $ nTSecurityDescriptor $ nextRid $ modifiedCountAtLastProm $ modifiedCount $ minPwdLength $ minPwdAge $ maxPwdAge $ lockoutThreshold $ lockoutDuration $ lockOutObservationWindow $ forceLogoff $ domainReplica $ creationTime ) )
 objectClasses: ( 2.5.6.2 NAME 'country' SUP top MUST ( c ) MAY ( co $ searchGuide ) )
 objectClasses: ( 2.5.6.5 NAME 'organizationalUnit' SUP top STRUCTURAL MUST ( ou ) MAY ( x121Address $ userPassword $ uPNSuffixes $ co $ telexNumber $ teletexTerminalIdentifier $ telephoneNumber $ street $ st $ seeAlso $ searchGuide $ registeredAddress $ preferredDeliveryMethod $ postalCode $ postalAddress $ postOfficeBox $ physicalDeliveryOfficeName $ msCOM-UserPartitionSetLink $ managedBy $ thumbnailLogo $ l $ internationalISDNNumber $ gPOptions $ gPLink $ facsimileTelephoneNumber $ destinationIndicator $ desktopProfile $ defaultGroup $ countryCode $ c $ businessCategory ) )
+objectClasses: ( 1.2.840.113556.1.5.139 NAME 'lostAndFound' SUP top STRUCTURAL MAY ( moveTreeState ) )
 objectClasses: ( 2.5.6.7 NAME 'organizationalPerson' SUP person MAY ( x121Address $ comment $ title $ co $ primaryTelexNumber $ telexNumber $ teletexTerminalIdentifier $ street $ st $ registeredAddress $ preferredDeliveryMethod $ postalCode $ postalAddress $ postOfficeBox $ thumbnailPhoto $ physicalDeliveryOfficeName $ pager $ otherPager $ otherTelephone $ mobile $ otherMobile $ primaryInternationalISDNNumber $ ipPhone $ otherIpPhone $ otherHomePhone $ homePhone $ otherFacsimileTelephoneNumber $ personalTitle $ middleName $ otherMailbox $ ou $ o $ mhsORAddress $ msDS-AllowedToDelegateTo $ manager $ thumbnailLogo $ l $ internationalISDNNumber $ initials $ givenName $ generationQualifier $ facsimileTelephoneNumber $ employeeID $ mail $ division $ destinationIndicator $ department $ c $ countryCode $ company $ assistant $ streetAddress $ houseIdentifier $ msExchHouseIdentifier $ homePostalAddress ) )
 objectClasses: ( 1.2.840.113556.1.5.72 NAME 'nTDSService' SUP top STRUCTURAL MAY ( tombstoneLifetime $ sPNMappings $ replTopologyStayOfExecution $ msDS-Other-Settings $ garbageCollPeriod $ dSHeuristics ) )
 objectClasses: ( 1.2.840.113556.1.5.7000.48 NAME 'serversContainer' SUP top STRUCTURAL )
@@ -8746,6 +8950,7 @@ attributeTypes: ( 1.2.840.113556.1.2.14 NAME 'hasMasterNCs' SYNTAX '1.3.6.1.4.1.
 attributeTypes: ( 1.2.840.113556.1.4.81 NAME 'modifiedCountAtLastProm' SYNTAX '1.2.840.113556.1.4.906' SINGLE-VALUE )
 attributeTypes: ( 1.2.840.113556.1.4.78 NAME 'minPwdAge' SYNTAX '1.2.840.113556.1.4.906' SINGLE-VALUE )
 attributeTypes: ( 1.2.840.113556.1.4.39 NAME 'forceLogoff' SYNTAX '1.2.840.113556.1.4.906' SINGLE-VALUE )
+attributeTypes: ( 1.2.840.113556.1.4.1305 NAME 'moveTreeState' SYNTAX '1.3.6.1.4.1.1466.115.121.1.40' )
 attributeTypes: ( 1.2.840.113556.1.4.1787 NAME 'msDS-AllowedToDelegateTo' SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' )
 attributeTypes: ( 1.2.840.113556.1.4.619 NAME 'dNSHostName' SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' SINGLE-VALUE )
 attributeTypes: ( 1.2.840.113556.1.4.1825 NAME 'msDS-AzMinorVersion' SYNTAX '1.3.6.1.4.1.1466.115.121.1.27' SINGLE-VALUE )
index 31084ac326f4b3db826ba740bb63f2f11e9a35f0..9ad39827ac8b6708b17ee26c25ccb48293a067b8 100755 (executable)
@@ -37,6 +37,7 @@ objectclasses = new Object();
 attributes = new Object();
 rootDse = new Object();
 
+objectclasses_expanded = new Object();
 
 /* the attributes we need for objectclasses */
 class_attrs = new Array("objectClass", 
@@ -599,8 +600,33 @@ for (i=0;i<classes.length;i++) {
 /*
   expand the objectclass list as needed
 */
+var num_classes = 0;
+var expanded = 0;
+/* calculate the actual number of classes */
 for (i in objectclasses) {
-       expand_objectclass(ldb, objectclasses[i]);
+       num_classes++;
+}
+/* so EJS do not have while nor the break statement
+   can't find any other way than doing more loops
+   than necessary to recursively expand all classes
+ */
+var inf;
+for (inf = 0;inf < 500; inf++) {
+       if (expanded < num_classes) {
+               for (i in objectclasses) {
+                       var n = objectclasses[i];
+                       if (objectclasses_expanded[i] != "DONE") {
+                               expand_objectclass(ldb, objectclasses[i]);
+                               objectclasses_expanded[i] = "DONE";
+                               expanded++;
+                       }
+               }
+               /* recalculate the actual number of classes */
+               num_classes = 0;
+               for (i in objectclasses) {
+                       num_classes++;
+               }
+       }
 }
 
 /*