Skip to content

nixos/pam: fix infinite recursion#460035

Merged
LordGrimmauld merged 1 commit intoNixOS:masterfrom
gkleen:fix/wtmp-recursion
Nov 9, 2025
Merged

nixos/pam: fix infinite recursion#460035
LordGrimmauld merged 1 commit intoNixOS:masterfrom
gkleen:fix/wtmp-recursion

Conversation

@gkleen
Copy link
Contributor

@gkleen gkleen commented Nov 9, 2025

#429203 introduced an infinite recursion on my machine.

Use of optionalAttrs instead of mkIf seemed dubious anyways.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@gkleen gkleen requested a review from LordGrimmauld November 9, 2025 12:04
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Nov 9, 2025
@LordGrimmauld
Copy link
Contributor

Do you have a log of that infinite recursion? I am not really opposed to the changes here, but i am somewhat surprised that supposed infinite recursion did not surface earlier (e.g. in the VM test)

@gkleen
Copy link
Contributor Author

gkleen commented Nov 9, 2025

Do you have a log of that infinite recursion? I am not really opposed to the changes here, but i am somewhat surprised that supposed infinite recursion did not surface earlier (e.g. in the VM test)

I've attached a stack trace which I found entirely unhelpful – I just bisected and made an educated guess 🤷

trace.txt

@gkleen gkleen force-pushed the fix/wtmp-recursion branch from 9dcdf62 to f94eec2 Compare November 9, 2025 12:58
@LordGrimmauld
Copy link
Contributor

Right, this is a weird one!
I guess the test doesn't break because it explicitly sets security.pam.services.systemd-run0 = { ... };, so the evaluator doesn't need to check the systemd package version. And other people are either not running lastlog, or also setting the run0 pam service unconditionally and explicitly. That trace does make some sense. I am still surprised you are the first one to report this, but oh well!

Copy link
Contributor

@LordGrimmauld LordGrimmauld left a comment

Choose a reason for hiding this comment

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

thank you

@LordGrimmauld LordGrimmauld added this pull request to the merge queue Nov 9, 2025
Merged via the queue into NixOS:master with commit ffd468f Nov 9, 2025
28 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants