Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/openldap: Support configuring the log level #51624

Merged
merged 1 commit into from Dec 14, 2018
Merged

nixos/openldap: Support configuring the log level #51624

merged 1 commit into from Dec 14, 2018

Conversation

dasJ
Copy link
Member

@dasJ dasJ commented Dec 6, 2018

Motivation for this change

I wanted to troubleshoot startup problems.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@@ -54,6 +54,12 @@ in
description = "The database directory.";
};

logLevel = mkOption {
type = types.int;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this types.string, and add a link to https://www.openldap.org/doc/admin24/slapdconfig.html#loglevel%20%3Clevel%3E in the description?

Being able to set logLevel = "acl trace"; seems a bit more clear than 129.

@dasJ
Copy link
Member Author

dasJ commented Dec 9, 2018

@flokli Fixed and rebased

@@ -139,7 +146,7 @@ in
chown -R "${cfg.user}:${cfg.group}" "${cfg.dataDir}"
'';
serviceConfig.ExecStart =
"${openldap.out}/libexec/slapd -d 0 " +
"${openldap.out}/libexec/slapd -d ${toString cfg.logLevel} " +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need toString here anymore, as it already is a string now.

@dasJ
Copy link
Member Author

dasJ commented Dec 13, 2018

@flokli Fixed and rebased again

@flokli
Copy link
Contributor

flokli commented Dec 14, 2018

Thanks, looking good!

Ran nixosTests.openldap, works :-)

By any chance, could you take a look at nss-pam-ldapd, which is currently broken on master?
I guess you need that too :-)

We have a more complete nixosTests.ldap, which can then be run, too.

@flokli flokli merged commit da6a327 into NixOS:master Dec 14, 2018
@dasJ dasJ deleted the slapd-log branch December 14, 2018 13:22
@dasJ
Copy link
Member Author

dasJ commented Dec 14, 2018

@flokli No, I don't do LDAP auth with pam right now neither am I planning to, sorry :/

@flokli
Copy link
Contributor

flokli commented Dec 14, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants