Skip to content

Openldap clients ignore system-wide LDAP client configuraiton in /etc/ldap.conf #181937

@danc86

Description

@danc86

Describe the bug

The system-wide LDAP client configuration in /etc/ldap.conf is ignored by Openldap client programs.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Put settings into /etc/ldap.conf via config.settings.ldap.*
  2. Run ldapsearch or any other Openldap client

Expected behavior

Openldap client programs should obey the system-wide configuration file in /etc/ldap.conf.

Additional context

strace shows it's reading the example configuration from the package instead:

$ strace -e file ldapsearch
[...]
openat(AT_FDCWD, "/nix/store/j8mm1wgsx4vmxaxbf6ximq59ry5qj7yl-openldap-2.6.2/etc/ldap.conf", O_RDONLY) = 3
newfstatat(3, "", {st_mode=S_IFREG|0444, st_size=247, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/home/dan/ldaprc", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/dan/.ldaprc", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ldaprc", O_RDONLY)    = -1 ENOENT (No such file or directory)
[...]

Since commit 39ef632 the openldap package no longer passes --sysconfdir=/etc to configure, it only passes sysconfdir=${placeholder "out"}/etc to make instead.

Notify maintainers

@ajs124 @das_j @Hexa

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-linux"`
 - host os: `Linux 5.15.32, NixOS, 22.05 (Quokka), 22.05.git.c88aa8fd317M`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.8.1`
 - channels(root): `""`
 - nixpkgs: `/home/dan/nixpkgs`

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions