Hi!
I thought I had explained my thoughts:
I understand that braces are needed to _order_ multi-valued attributes (the
"entries" within the parent), but I don't understand wha the braces are needed
for an attribute that is single-valued (thus there is no ordering possible).
For example: olcOverlay is SINGLE-VALUE (there may be only one overlay in an
olcOverlayConfig object).
So why is this wrong then?:
dn: olcOverlay={1}accesslog,olcDatabase={0}config,cn=config
objectClass: olcOverlayConfig
objectClass: olcAccessLogConfig
olcOverlay: accesslog
...
Kind regards,
Ulrich Windl
> -----Original Message-----
> From: Ondřej Kuzník <[email protected]>
> Sent: Thursday, March 27, 2025 11:00 AM
> To: Windl, Ulrich <[email protected]>
> Cc: [email protected]
> Subject: [EXT] Re: Re: Q: "olcDatabase: {1}mdb" from slapcat: why "{1}"?
>
> On Thu, Mar 27, 2025 at 09:40:45AM +0000, Windl, Ulrich wrote:
> >> From: Ondřej Kuzník <[email protected]>
> >>
> >> On Tue, Mar 25, 2025 at 10:57:11AM +0000, Windl, Ulrich wrote:
> >>> Considering
> >>> dn: olcDatabase={1}mdb,cn=config
> >>> objectClass: olcDatabaseConfig
> >>> objectClass: olcMdbConfig
> >>> olcDatabase: {1}mdb
> >>> # ...
> >>>
> >>> I wonder why olcDatabase needs the "{1}" when olcDatabase is a
> >>> single- valued attribute. I understand that "olcDatabase={1}mdb" is
> >>> needed for ordering the databases within cn=config, But why is the
> >>> "{1}" repeated for the actual attribute?
> >>
> >> It is a "naming attribute" and it has to be present in the entry as per
> >> the RFC451x series[0].
> >>
> >> [0]. e.g. https://datatracker.ietf.org/doc/html/rfc4512#section-2.3.1
> >
> > Actually it's not explained clearly there: I had been looking for
> > "brace" and "curly", and it only talks about string length to be
> > specified using curly braces...
>
> Hi Ulrich,
> you said you understand why the {1} exists (keep the entries ordered
> under their parent, look up "X-ORDERED 'SIBLINGS'" for details) but
> don't understand why that exact value has to be in the entry (because it
> is a naming attribute - as defined in the RFCs), now you're asking why
> it exists again? You'll have to explain what you actually mean if it's
> neither of the above.
>
> Regards,
>
> --
> Ondřej Kuzník
> Senior Software Engineer
> Symas Corporation http://www.symas.com
> Packaged, certified, and supported LDAP solutions powered by OpenLDAP