Hi! I wonder: Is the output of slapcat expected to be stable (assuming the database did not change)? I know that LDAP attributes are considered to be sets that have no implicit ordering, but diff-wise it would be rather nice to have a stable output ordering. Here is an example of non-stable output ordering (sdiff output, only first 18 columns for confidentiality):
# sdiff b0 b1
dn: olcDatabase={1 dn:
olcDatabase={1
objectClass: olcDa objectClass:
olcDa
objectClass: olcHd objectClass:
olcHd
olcDatabase: {1}hd olcDatabase:
{1}hd
olcDbDirectory: /v olcDbDirectory:
/v
olcSuffix: dc=sap, olcSuffix:
dc=sap,
olcAccess: {0}to * <
olcAccess: {1}to d <
olcAccess: {2}to a <
olcAccess: {3}to a <
olcAccess: {4}to a <
olcAccess: {5}to * <
olcLimits: {0}dn.e olcLimits:
{0}dn.e
olcRootDN: cn=Admi olcRootDN:
cn=Admi
olcRootPW: {SSHA}y olcRootPW:
{SSHA}y
olcSecurity: ssf=1 olcSecurity:
ssf=1
olcSyncrepl: {0}ri olcSyncrepl:
{0}ri
olcSyncrepl: {1}ri olcSyncrepl:
{1}ri
olcSyncrepl: {2}ri olcSyncrepl:
{2}ri
olcUpdateRef: ldap olcUpdateRef:
ldap
olcUpdateRef: ldap olcUpdateRef:
ldap
olcUpdateRef: ldap olcUpdateRef:
ldap
olcMirrorMode: TRU olcMirrorMode:
TRU
olcDbCacheSize: 10 olcDbCacheSize:
10
olcDbCheckpoint: 1
olcDbCheckpoint: 1
olcDbConfig: {0}se olcDbConfig:
{0}se
olcDbConfig: {1}se olcDbConfig:
{1}se
olcDbConfig: {2}se olcDbConfig:
{2}se
olcDbConfig: {3}se olcDbConfig:
{3}se
olcDbConfig: {4}se olcDbConfig:
{4}se
olcDbConfig: {5}se olcDbConfig:
{5}se
olcDbIDLcacheSize:
olcDbIDLcacheSize:
olcDbIndex: object olcDbIndex:
object
olcDbIndex: uidNum olcDbIndex:
uidNum
olcDbIndex: gidNum olcDbIndex:
gidNum
olcDbIndex: member olcDbIndex:
member
olcDbIndex: member olcDbIndex:
member
olcDbIndex: cn eq, olcDbIndex: cn
eq,
olcDbIndex: uid eq olcDbIndex: uid
eq
olcDbIndex: sn eq, olcDbIndex: sn
eq,
olcDbIndex: givenN olcDbIndex:
givenN
olcDbIndex: entryU olcDbIndex:
entryU
olcDbIndex: entryC olcDbIndex:
entryC
olcDbIndex: ipServ olcDbIndex:
ipServ
olcDbIndex: ipServ olcDbIndex:
ipServ
olcDbIndex: roleOc olcDbIndex:
roleOc
olcDbIndex: mail e olcDbIndex:
mail e
olcDbIndex: displa olcDbIndex:
displa
olcDbIndex: modify olcDbIndex:
modify
structuralObjectCl
structuralObjectCl
entryUUID: db3ffe4 entryUUID:
db3ffe4
creatorsName: cn=c creatorsName:
cn=c
createTimestamp: 2
createTimestamp: 2
entryCSN: 20170706 | olcAccess:
{0}to *
> olcAccess:
{1}to d
> olcAccess:
{2}to a
> olcAccess:
{3}to a
> olcAccess:
{4}to a
> olcAccess:
{5}to *
> entryCSN:
20200114
modifiersName: cn= modifiersName:
cn=
modifyTimestamp: 2
modifyTimestamp: 2
So is the order of output given by some hash functions in slapcat, or is it the
order in which the database returns the attributes?
What would I have to do to sort the attribute types in the same order as they
are listed in the schema (one possible stable output)?
Regards,
Ulrich
