Conversation
|
Thanks for the PR! However, this needs to target staging due to the amount of rebuilds. Can this be rebased on staging? (Please check the contribution guideline on how to rebase this on staging without causing a mass ping) |
This is recommended to enable in conjunction with systemd-homed.
As a start, it's not very configurable, but works pretty well.
| "service": "io.systemd.Multiplexer", | ||
| "userName": name | ||
| }) | ||
| return json.loads(machine.succeed(f"varlink call {Interface}.GetUserRecord {quote(payload)}")) |
There was a problem hiding this comment.
Can you add some tests usinggetent here, to make sure the NSS side of things also works?
Or could this potentially be folded into nixos/tests/nscd.nix, having one machine config with and one without userdbd enabled?
There was a problem hiding this comment.
I can add a getent test but I'm not sure if it will do a lot.
nss-systemd have a fallback system so if it can't query the varlink interface it will just use the internal implementation instead.
There was a problem hiding this comment.
Hmmh, we could hide /etc/userdb/test-user-dropin.user for the getent process with libredirect, like we hide /etc/hosts (so these lookups can only succeed if they go via ns(n)cd).
But it's a bit ugly indeed, and the current whoami check is probably fine to ensure it gets the user id somehow?! WDYT?
There was a problem hiding this comment.
Hmmh, we could hide
/etc/userdb/test-user-dropin.userfor the getent process with libredirect, like we hide/etc/hosts(so these lookups can only succeed if they go via ns(n)cd).
Yea but all lookup using nss-systemd has to go through nscd which can see all files anyway :p
I think for userdbd this simple check is enough.
|
Alright, let's cook this in staging :-) Thanks for the PR! :-) |
Description of changes
Fixes #91243 #79263
This change involves two new modules, one for
userdbdand another forhomed.I've been daily driving this for awhile, and I can verify that it works with
fprintdas well.Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes