Hi,

Thanks Quanah. Just to follow-up:

Yes, with an ldap listener on 0.0.0.0, openldap is *still* able to
determine it's own serverID when multiple are configured, based on the
above-mentioned code.

In my config I do:

serverID 1 ldaps://my.ldapserver1.com
serverID 2 ldaps://my.ldapserver2.com

(nota bene FQDN)

and the local hostname is obviously NOT a FQDN but just a (short) hostname.

But it is still matched correctly, which is phenomenal, and not something I
could read / understand from the docs! :-)

I also tested, by changing the config to a non-existing "serverID 2 ldaps://
my.ldapserver5.com <http://my.ldapserver2.com>", and then we do get the
"read_config: no serverID / URL match found. Check slapd -h arguments."

Impressed by openldap's cleverness. :-)

Regards!



On Tue, 27 Jun 2023 at 17:40, Quanah Gibson-Mount <qua...@fast-mail.org>
wrote:

>
>
> --On Monday, June 26, 2023 10:18 PM +0200 cYuSeDfZfb cYuSeDfZfb
> <cyusedf...@gmail.com> wrote:
>
> > Now we wonder if the serverID is determined and set correctly or
> > not....  and even with loglevel -1 the auto-determined "local serverID"
> > is not logged on start.
> >
> >
> > Does anyone know?
> >
> >
> > Can the serverID also be determined from the local hostname? Or is there
> > any other magic going on?
>
>
> This is determined in the following code block in servers/slapd/config.c:
>
> <
> https://git.openldap.org/openldap/openldap/-/blob/master/servers/slapd/config.c#L2311
> >
>
> So that's the magic you are looking for.
>
> Regards,
> Quanah
>

Reply via email to