# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
## Copyright 2019-2021 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted only as authorized by the OpenLDAP
## Public License.
##
## A copy of this license is available in the file LICENSE in the
## top-level directory of the distribution or, alternatively, at
## <http://www.OpenLDAP.org/license.html>.

# This file is provided for informational purposes only.

# These definitions are from Sun DSEE 7's cn=schema subentry.
# None of the attributes had matching rules defined; we've
# inserted usable ones as needed.

# Some of these attributes are defined with NO-USER-MODIFICATION,
# but slapd won't load such definitions from user-modifiable schema
# files. So that designation has been removed, and commented accordingly.

objectidentifier NetscapeRoot 2.16.840.1.113730
objectidentifier NetscapeDS NetscapeRoot:3
objectidentifier NSDSat	NetscapeDS:1
objectidentifier NSDSoc NetscapeDS:2
objectidentifier SunRoot 1.3.6.1.4.1.42
objectidentifier SunDS SunRoot:2.27

attributetype ( NSDSat:5
	NAME 'changeNumber'
	DESC 'Changelog attribute type'
	EQUALITY integerMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
	X-ORIGIN 'Changelog Internet Draft' )

attributetype ( NSDSat:6
	NAME 'targetDn'
	DESC 'Changelog attribute type'
	EQUALITY distinguishedNameMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.12
	X-ORIGIN 'Changelog Internet Draft' )

attributetype ( NSDSat:7
	NAME 'changeType'
	DESC 'Changelog attribute type'
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
	X-ORIGIN 'Changelog Internet Draft' )

# They claim Binary syntax but it's really octetString
attributetype ( NSDSat:8
	NAME 'changes'
	DESC 'Changelog attribute type'
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.5
	X-ORIGIN 'Changelog Internet Draft' )

attributetype ( NSDSat:9
	NAME 'newRdn'
	DESC 'Changelog attribute type'
	EQUALITY distinguishedNameMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.12
	X-ORIGIN 'Changelog Internet Draft' )

attributetype ( NSDSat:10
	NAME 'deleteOldRdn'
	DESC 'Changelog attribute type'
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
	X-ORIGIN 'Changelog Internet Draft' )

attributetype ( NSDSat:11
	NAME 'newSuperior'
	DESC 'Changelog attribute type'
	EQUALITY distinguishedNameMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.12
	X-ORIGIN 'Changelog Internet Draft' )

# should be generalizedTime, but they used directoryString instead...
attributeType ( NSDSat:77
	NAME 'changeTime'
	DESC 'Sun ONE defined attribute type'
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
	X-ORIGIN 'Sun ONE Directory Server' )

# These are UUIDs, but (of course) hyphenated differently than ours.
# NO-USER-MODIFICATION
attributetype ( NSDSat:542
	NAME 'nsUniqueId'
	DESC 'Sun ONE defined attribute type'
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
	SINGLE-VALUE
	X-ORIGIN 'Sun ONE Directory Server' )

# NO-USER-MODIFICATION
attributeype ( SunDS:9.1.596
	NAME 'targetUniqueId'
	DESC 'RetroChangelog attribute type'
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
	SINGLE-VALUE
	X-ORIGIN 'Sun Directory Server' )

objectclass ( NSDSoc:1
	NAME 'changeLogEntry'
	DESC 'LDAP changelog objectclass'
	SUP top STRUCTURAL
	MUST ( targetDn $ changeTime $ changeNumber $ changeType )
	MAY ( changes $ newRdn $ deleteOldRdn $ newSuperior )
	X-ORIGIN 'Changelog Internet Draft' )
