Page MenuHome GnuPG

ldapserver configuration option duplicated
Open, NormalPublic

Description

It seems that adding the same LDAP server in kleopatra is possible and, worse, the entry is then saved to the conf file and the next time a third copy is shown. Test was done using an ldap server in the global config and one in the local config.

Do we have a problem with --ldapserver vs. the legacy ldapserver-file thing here? Or is this due to an gpgconf option parser oddity

Event Timeline

werner triaged this task as Normal priority.Wed, Oct 22, 5:17 PM
werner added a project: vsd34.

I guess this is easy to explain:

  1. gpgconf/gpgme reads the LDAP server from the global config
  2. You add a second LDAP server (I don't think it matters if it's the same as the one from the global config or different one)
  3. When you save the LDAP server then gpgme/gpgconf writes both LDAP servers to the local config
  4. When you now read the LDAP servers you get one from the global config and two from the local config

The problem might be even worse:
Each time you save changes on the Directory Services page of Kleopatra's config dialog copies of all LDAP servers configured in the global config are added to the local config. This happens in gpgme via gpgconf.

I think this is a general problem of list entries. gpgconf simply prints them as comma separated list. Hence, users of this output are totally unaware if an entry is defined in the global config or the local config.

I think gpgconf needs to
a) not write an LDAP server to the local config if an identical entry is already in the global config
and/or
b) consolidate LDAP servers read from the global config and the local config before passing the list of LDAP servers to its callers.

gpgconf does not know about the global config files. Nor does it known about things like gpg.conf-2 etc.

Then I don't see how we can avoid this. It should be easy to reproduce this with gpgconf alone if you know how to use --change-options manually. Simply set the LDAP server that's already configured in the global config file.

ikloecker mentioned this in Unknown Object (Maniphest Task).Mon, Oct 27, 9:29 AM